Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an RSS feed that published PDF files. Although I can subscribe to these in iTunes, I'd like to have them put into iTunes automatically as BOOKS and not as Podcasts.

Rather than manually do this, is there a way to automate this, either with AppleScripts or Automator?

share|improve this question
add comment

1 Answer

iTunes 9 introduced a 'watch folder' feature where if you drop mp3s into a specific folder on your Mac (and iTunes is running) it will almost immediately import the mp3s into your library and delete the source files from the watch/drop folder. (Source link: http://lifehacker.com/5356619/itunes-finally-adds-watched-folder-to-automatically-add-new-music ). On macs by default the watch folder is here:

~/Music/iTunes/iTunes Music/Automatically Add to iTunes/

while on Windows it's here:

C:\Users\Your Username\Music\iTunes\iTunes Media\Automatically Add to iTunes\

I tried dropping PDFs into this folder and iTunes v10 does indeed move the files into the Books section of its library. If this works for you too then you can simplify your problem to just "How do I save RSS articles as files on my hard disk?".

There are many many RSS readers out there and presumably some must have an 'archive article' feature but I don't know of an exact one to recommend. Incidentally, both Thunderbird and Apple Mail will download RSS articles but in these two cases they both save the articles within an mbox file, which would then need further processing to extract the articles, so these programs are not ideal for your needs.

An alternative approach could to just use a simple shell script from the command line to download the files found in the RSS feed. This link: http://stackoverflow.com/questions/443991/how-to-parse-rss-feeds-xml-in-a-shell-script has a preferred answer that describes a solution using wget, however I don't think wget is part of Mac OS X by default (it is available through Fink or Macports though) but there is a similar command that Mac OS X has by default that will also work: curl.

Here is a one line shell script that works on Mac OS X (Snow Leopard) that will download the articles of an RSS feed to the current directory:

curl -L -s 'http://www.howstuffworks.com/podcasts/stuff-you-should-know.rss' | grep -o "<enclosure url='[^']*" | grep -o "[^']*$" | xargs curl -L --remote-name-all -s

However it should be noted that the grep patterns have been tuned a little to fit this exact feed in the example and so may not work 'out the box' for your feed. Also the script will download articles in the RSS XML every time; it isn't sensitive to articles already downloaded on previous occasions.

So I guess this isn't a complete solution but here's hoping there's something here to help you on your way.

share|improve this answer
    
That's a great well-thought out answer. I suspected that I would need to use the "Add to iTunes" folder. That script may be the answer I was looking for. I'll have to check out how the RSS feed is configured. –  Armstrongest Oct 21 '10 at 16:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.