Tuesday May 23, 2006
Automatic Weblog Posting
I produce two weekly memes (writing prompts): ...in other words... (a quote prompt) and Word Beads. Both are updated automated by background tasks.I wanted people who play to be able to leave comments or links to their weblogs. When I started the memes, I installed a guestbook application to handle comments. Unfortunately, the guestbook was attracting far too many spammers! So I looked around for an alternative.
Implementation Plan #1
My initial thought was to install a different guestbook, specifically one that uses a CAPTCHA to try to thwart spamming. Unfortunately, the CAPTCHA capability relies on a few PHP modules that a) are not configured by default and b) don't seem to want to work for me no matter what I try. So, for the time being, I've given up on the guestbook. Sigh.
Implementation Plan #2
When the guestbook program didn't work, I decided instead to use a dedicated weblog to post the current "game" and capture comments. (Well. Duh. :-) However, in order to support the weblog format, I needed a way to post the weekly prompts automatically. An important part of producing these memes, for me, is that they are generated and updated automatically.I did a little research and found some promising code snippets. I improved on those until I had a script that did the job. Then I improved on that some more to allow control from a configuration file. (I use the same configuration file I've been using for my automated weblog notification script.) Note that the current posting script is very simple it handles a title and body and uses the default weblog category.
If you're interested, the scripts are online, linked from my sample code page. If you want to post to a TypePad or Movable Type weblog and you want to specify the category, you should also read Jay Allen's discussion of how to do that.
Automatic Weblog Posting
( in category
Trivial Pursuits
,
WebTech
)
- posted at Tue, 23 May, 00:53 Pacific
| «e»

vlb@cfcl.com