licentious radio

March 2002
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Feb   Apr

   Click here to visit the Radio UserLand website.
   Click to see the XML version of this web page.


"What kind of peace do I mean? What kind of peace do we seek? Not a Pax Americana enforced on the world by American weapons of war. Not the peace of the grave or the security of the slave. I am talking about genuine peace, the kind of peace that makes life on earth worth living, the kind that enables men and nations to grow and to hope and to build a better life for their children - not merely peace for Americans but peace for all men and women - not merely peace in our time but peace for all time." -- JFK
 
Home | Stories | Politics/Humor | Web Usability/Humor | ipaq 3800 Linux | RadioRadio | Typography | About | Contact
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:

radio_post.pl

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.