Page-oriented posting from Radio to Movable Type

Last night I started looking at what it will take to enable page-oriented editing of a Movable Type site from Radio’s outliner. Here’s a basic outline of the design:

1. The outline represents a full day’s worth of posts.

2. Each top-level item in the outline becomes one Movable Type post. [Alternatively, we could treat the entire outline as a single Movable Type post but this would make RSS feeds harder to generate.]

3. Items with no children in the outline are title-less. The item text is converted to HTML and shipped to Movable Type as the description.

4. For items having children in the outline, the top-level text is the title. Children are converted to HTML and shipped to Movable Type as the description.

5. Cross-posting is handled via the metaWeblog API. Plenty of sample code in Dave’s Getting started with Radio as a Movable Type Outliner.

6. We will try to be smart about not re-saving items that haven’t changed since the last save. We can do this by saving a copy to the local disk or database in addition to posting via metaWeblog.

I have begun coding this up and have a few questions, which I’ll post to the comments section.

2 thoughts on “Page-oriented posting from Radio to Movable Type”

  1. The tricky part (so far) about this design is converting each description to HTML. The myWeblogOutliner code contains a method that converts an outline to Html (myWeblogOutlinerSuite.outlineToHtml(adroutline)). But in my design, the stuff I want to convert is not a full-fledged outline: each description is basically a “sub outline”.

    I noticed that there’s a op.getSubOutline verb ( but this returns text which I’d still have to convert to Html. I guess I could write a text to HTML converter but then I wouldn’t get the rules processing for free.

    Right? I guess what I need is a getSubOutlineAsOutline method?


  2. Okay I think I’ve figured out how to do it. Too bad I have to go to bed! A high-level summary: walk the outline using op.firstSummit() and op.go(). To get each suboutline, copy the original outline and walk it with target.set(), op.firstSummit() and op.go(), deleting everything but the level you want to keep. At the end of this process, you have an outline object that represents just the stuff you want to convert into a weblog post. Bing!


Comments are closed.

%d bloggers like this: