RadioRadio
Friday, March 22, 2002
[3:51:59 PM]
Post a text file to Radio
Here's a Perl script you can run from the command line to post a text file to Radio as a weblog entry:
Note that it depends on Perl's LWP and URI modules, which might not be on your computer. (They aren't on my OS X box, for example.) You might need to edit the script to set the url, id/password, and/or categories.
What good is this? Well, a lot of people don't like editing in a textarea field in a browser. There are all kinds of ways to work around that. This is one more.
Also, once you're outside of a browser, you can do more scripting. You could use the unix 'at' command or its equivalents to schedule posts. You could enhance this script, then use cron or its equivalents to check a directory once an hour or day and post any text files where the filename matches the date and/or time (for example: 200203230900.txt).
I use Perl because it's available on most platforms, and I'm familiar with it. I presume most every scripting language comes with libraries that let you post to a url. You could probably do this just as easily with Python or AppleScript, or whatever else suits your fancy.
[2:15:26 PM]
I add a category.... What's the url? Radio transforms the category name into a url, but the transformation isn't obvious from the interface.
To find a category's url, look in: Folder->categories
The folder name there matches the directory on the server, so then you can add that to the navigation under: Prefs->Navigator links
*But*, the navigator links don't seem to get updated on the server until you add a new item to the category. After you add a category, I guess you should just add a temporary post to *all* the categories, so the current navigation gets updated. Then delete the temporary post.
Radio seems to take a while before it adds the new category to the archived pages accessible through the calendar. Maybe it would eventually have updated the navigation on the category pages, too.
[2:03:17 PM]
Odd bug: can't have doublequote in story title?
Copyright © 2003 Licentious Radio.
Last update: 9/20/03; 2:53:29 PM.