Experimenting with Tinderbox XML

After I sucessfully imported some parts of my old weblog I reconsidered the idea to publish with Tinderbox to a database instead of using it to render HTML. Here is the current idea:

  • A Python script will read the Tinderbox file and publish this into a MySQL database
  • The database will be synchronized with a copy on the server
  • The server uses Zope to publish content (but can use anything that works with MySQL)
  • Server will use meta data, link data and possibly other things to create the site

Some advantages:

  • No need for agents anymore, the searching/collecting is done entirely on the server
  • No need for export and rendering from Tinderbox
  • A wider range of possibilities when translating data to HTML (full scripting)
  • Agents and HTML export is still possible – e.g. to keep a “internal work site”
  • Can possibly be extended to work for other environments
  • Possibly opens a way to use other ways of translating ASCII text to HTML (e.g. ReStructuredText or Textile)
  • Could allow many authors to contribute to one site (but not edit content created by others)

Some disadvantages:

  • Obviously there is code needed
  • Needs Python and MySQL on the client and MySQL on the server
  • Concept for a database structure and content specifications needed (how to use actually information from the Tinderbox file in the site)
  • A great deal of development needed on the server to turn the database into a site
  • Changing the Tinderbox file a lot could break the system
  • It is a one-way process – so no edits on the server travel back to Tinderbox

I investigated PyXML and elementtree which I found via Uche Ogbujis article on XML.com. I also found this XML & Python tutorial by Alexandre Fyolle very helpful. This Devshed tutorial on MySQL & Python reminded me about how to connect to the database. All this worked pretty well in first experiments.

The translation script will have to do some heavy work:

  • Translate Tinderbox commands (or invent own)
  • Maybe convert links and styles
  • manage images that are inside the Tinderbox file

Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.