Support Forum

You are not logged in.

#1 2008-06-14 22:59:42

wplate
Member

AppleScript examples?

I see that Feeder is AppleScriptable and I purchased a license largely based on this.  I am trying to set up a podcast for myself that has new entries automatically generated by a script.  I'm good and putting together scripts by copy and paste but not so much from scratch, can you point me to examples of Feeder AppleScripts that update an RSS feed?

Offline

 

#2 2008-06-16 16:49:07

steveharris
Developer

Re: AppleScript examples?

I think I replied to this via email, but here it is again for the forum.

Something like this will add a new item to the selected feed and then publish it:

Code:

tell application "Feeder"
    set theFeed to selected feed
    set episodeTitle to "This Episode's Title"
    set episodeLink to "http://example.com/epsiodelink.html"
    set enclosureFile to "Users:yourname:Desktop:Episode1.mp3"
    
    make new feed item at theFeed with properties {feed:theFeed, item title:episodeTitle, item link:episodeLink, enclosure upload file:enclosureFile}
    
    publish theFeed
end tell

-Steve Harris
Reinvented Software

Offline

 

#3 2008-06-16 19:13:54

wplate
Member

Re: AppleScript examples?

Thank you, how would I specify an existing podcast without it being selected?

I tried setting the "theFeed" variable to the name of my test podcast (named "Driveway") and got this error:

Feeder got an error: Can’t make "Driveway" into type location specifier.


Thanks.

Offline

 

#4 2008-06-16 22:28:10

steveharris
Developer

Re: AppleScript examples?

You would have to go through all the feeds until you find the one you want:

Code:

    set theFeed to null
    
    repeat with thisFeed in folder items of root folder
        if name of thisFeed is "The Feed You Want" then
            set theFeed to thisFeed
            exit repeat
        end if
    end repeat

I plan to improve this in the future so you can just use get feed "Driveway".


-Steve Harris
Reinvented Software

Offline

 

#5 2008-06-16 22:55:04

wplate
Member

Re: AppleScript examples?

When you improve this please also include some AppleScript examples so we don't have to bug you.  :-)

Offline

 

#6 2008-10-27 18:08:02

wplate
Member

Re: AppleScript examples?

I am right now trying to set up Feeder to run on another system to generate another RSS feed for me.  The script snippet I was using before based on your suggestion isn't working on this system.  The system in question is running OS 10.4.10, and I notice when I opened the script that the text had changed in the script...

Code:

        repeat with thisFeed in every «class FRim» of «class Arrf»
            --set whatIsTheFeed to thisFeed
            if name of thisFeed is "NewFeedName" then
                set theFeed to thisFeed
                set episodeTitle to (dateSent & " total")
                make new «class FItm» at theFeed with properties {«class FeeD»:theFeed, «class FIti»:episodeTitle, «class FIds»:DollarTotal}
                «event FeedCPub» theFeed

Can I run this older OS with Feeder and AppleScript?

Offline

 

#7 2008-10-28 15:41:47

steveharris
Developer

Re: AppleScript examples?

It should work as long as Feeder is at the same version (1.5.7 is the current version), although I can't test 10.4.10 (10.4.11 is the current version of Tiger), scripts often look like that before Script Editor knows where the application is. Compiling or running the script should cause those things to get resolved.

Try opening Feeder's AppleScript dictionary in Script Editor, if you can things like "feed item" in the Feeder suite, it should work.


-Steve Harris
Reinvented Software

Offline

 

#8 2008-10-28 16:27:09

wplate
Member

Re: AppleScript examples?

Thanks, compiling the script in OS 10.4.10 didn't help.

I will upgrade this particular system to OS 10.5 and try things then.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB