Then the other day I was talking to a coworker known for doing technical talks and mentioned the honing of presentation skills. He suggested a podcast that had a series of episodes about giving professional presentations, and forwarded me the link with the "presentation" tag filtering results.
Instead of subscribing to the podcasts' main feed, I downloaded the MP3's. Now I had the podcasts I wanted to listen to, but only as audio files.
The easy way to listen to them would be to import them to iTunes as music, then create a playlist just for those audio files and then telling iTunes to sync that playlist with my iPhone for later listening on the go.
While this would work, it meant that the "songs" end up getting shuffled in with other songs as any other audio track, and it would be played separately from the rest of my podcasts. I was also bugged by the fact that this interrupted my usual podcast workflow; listening to the podcast audio wouldn't mark it for "deletion" so it would be taken out of the listening rotation.
First, it seems that iTunes needs to grab the files from a web server. OS X happens to come with a web server, but the old way of turning on "web sharing" has been removed. To enable a simple Apache setup, open a terminal and create a conf file for your user:
sudo nano /etc/apache2/users/username.conf
...where "username" is obviously your username. In that file add the following block.
<Directory "/Users/username/Sites/">
Options Indexes Multiviews
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
</Directory>
...where again the "username" is your username. Then start the web server.
sudo apachectl start
At this point opening your web browser and entering "http://127.0.0.1" in the address bar should give you an "it works" message. If you go to http://127.0.0.1/~username" it should give you a little intro ditty to web page serving. Neat, huh?
This is a very limited web server; no database stuff, no bells and whistles, just a very bare-bones configuration. But I'm not looking to host a world-class website. I just wanted to turn those podcast audio files into an RSS feed for iTunes.
Next I created a subdirectory in ~/Sites called presentation_mp3 and copied the MP3 files to it. Now opening http://127.0.0.1/~bsilver/presentation_mp3 in my browser gave me a list of MP3 files.
Now the fun part, XML! I created a file called ~/Sites/podcast.xml. In it, I placed the following:
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
<channel>
<title>Podcast Presentations</title>
<description>Tips and Tricks for Delivering Killer Presentations</description>
<link>http://127.0.0.1/~username/presentation_mp3</link>
<language>en-us</language>
<copyright>Copyright 2013</copyright>
<lastBuildDate>Wed, 9 Jan 2013 11:30:00 -0501</lastBuildDate>
<pubDate>Wed, 9 Jan 2013 11:30:00 -0500</pubDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<webMaster>MyEmail@myemail.com</webMaster>
<item>
<title>Killer Presentations</title>
<link>http://127.0.0.1/~username</link>
<guid>http://127.0.0.1/~username/presentation_mp3/Killer_presentation.mp3</guid>
<description> How to give a killer presentation!</description>
<enclosure url="http://127.0.0.1/~username/presentation_mp3/Killer_presentation.mp3" length="24308496" type="audio/mpeg"/>
<category>Podcasts</category>
<pubDate>Wed, 9 Jan 2012 11:30:00 -0500</pubDate>
</item>
</channel>
</rss>
I based this off a template from this website, although for simplicity I didn't include the nice iTunes-compatible yet optional bits. I used the above as a template, adding a new <item> for each MP3 file, altering the "length" to correspond to the size of the file in the directory and the pubDate and description as necessary. You should be able to puzzle out from the above what things would need to be customized, at least to a point where it would work. The file was saved to ~/Sites/podcast.xml.
Once these were set, I opened iTunes and clicked File -> Subscribe to Podcast.
In the URL box I entered, "http://127.0.0.1/~username/podcast.xml", without the quotes.
Then I told iTunes to update the podcast and it downloaded them. Ta-da!
I should note that activating Apache means that others can connect to your machine's web server, so beware of taking it onto untrusted networks (if you're worried, use
sudo apachectl stop
to stop the server when going out.) Always keep your system up to date, kids! The open port 80 doesn't seem to show up under the sharing system preference, and it is accessible even with the firewall on. If you're worried, you may want to change the accessibility in the conf file.In the off chance that someone else will read this and cringe at how horrible my XML file was, or get irritated that I didn't include particular options or any of a half-dozen other things I neglected to do properly, keep in mind that this was a quick-and-dirty way to get a series of audio files inserted into my podcast feed. If I were working on an actual podcast meant for public consumption I would have taken far more time prettifying everything and making each episode have more than a rudimentary description, not to mention hosting it on an actual podcast service.
Any suggestions for improvements?
No comments:
Post a Comment