galumphing

 

This page demonstrates using DirectRSS to post to an RSS blogBrowser archive, and using the template system to display it, creating a small weblog. It's currently more of an experiment than a large-scale weblogging solution, even though I'm using it for my own weblog, because as presented here it doesn't generate automatic HTML archives. (The simple code I'm using for my own weblog's automatic archives is present behind the scenes, but it isn't complete or particularly efficient, and I'd like to gauge interest in a better solution first.)

To try this out, configure a weblog posting client, such as NetNewsWire (full version) or w.bloggar, with the following settings, which are correct for the sample site as it shipped. If there is a preset for “Radio Userland”, select that, and you will only have to change the port number.

Weblog API: If there is a preset for Radio Userland, choose that.
Otherwise, select as many of the following APIs as your software allows.
First choice: MetaWeblog API
Second choice: b2 API
Third choice: Blogger API
RPC URL:http://127.0.0.1:8000/RPC2

Some tools separate the RPC URL into the following three fields:
Hostname:127.0.0.1
Path:/RPC2
Port:8000

Username:jdoe
Password:password
Blog ID:home
Home Page URL:http://127.0.0.1:8000/cgi-bin/shearersite.py?path=/weblog/blogBrowser/

Now you should be able to post to your weblog. (The home page URL setting just makes it easier to jump straight to the administration screen to update your pages.)

After making a posting, jump back into the template system through the Home Page URL link and click Update Pages. The template system will read the modified RSS file and pour the new content into your web page.

How this is done: a link in the head element of this page tells the system where to find the RSS files. In fact, we have two links for demonstration, one for the rss-recent.xml file (which DirectRSS generates for the benefit of aggregators) and one for the full archive. There isn't as much performance difference between them as you might expect, because the system only reads as many files from the RSS archive as are necessary. You would normally need only need one link tag. The strange-looking content of the second link, ./, is relative URL syntax meaning the current directory. Directories mean blogBrowser format.

<link rel="alternate" type="application/rss+xml" title="recent-weblog" href="rss-recent.xml">
<link rel="alternate" type="application/rss+xml" title="full-weblog" href="./">

(The title attributes are for reference later.) The following code examples show two variants of weblog item display.

 

Last 15 Items from Recent Archive

<div id="template_rss_count_15_data_recent-weblog_template_weblogitem">
</div>
June 13, 2003
Test Posting
This is a test posting, not in any categories.
  06/13/03 01:24 AM  

June 13, 2003
Test Posting
This is a test posting, in the Technology category.
  06/13/03 01:23 AM  Technology

 

All Technology Category Postings from the Full Archive

<div id="template_rss_data_full-weblog_template_weblogitem_category_technology">
</div>
June 13, 2003
Test Posting
This is a test posting, in the Technology category.
  06/13/03 01:23 AM  Technology