Jadoo, a would-be blog system for geeks

URL: http://www.poirrier.be/~jean-etienne/software/jadoo/index.php

Text written on February 13rd, 2007 (last modification: none yet)

Preliminary note: this page is about a simple blog system - Jadoo - that I no longer maintain (reasons here).
Feel free to grab the code and continue the work if you want.

Introduction

Personnally, I was not very satisfied with current common blog systems. They are based on a huge collection of PHP scripts and MySQL but web providers couldn't certify that service will have all the ressources needed. I was looking for something simpler, even if this solution is not (will not become) a major blog system ;-)

Because Alexandre Dulaunoy changed his blog system (and I couln't retrieve the old posts), here is a quote from him, sharing his ideas about a new blog system:

My (we)blog needs to be refreshed but I'm still looking for a simple free software to do the job. I tested various without finding a simple software backend. My requirements :

  • A vty (or at least an XML-RPC interface) interface to update the blog remotely
  • The software backend must be able to produce static pages without too much code or configuration
  • The ability to avoid spam in an efficient way (ok, the requirement moved to static pages, it would permit to avoid the spam problem ;-)
  • The ability to customize the full look-and-feel of the blog via CSS. This seems pretty simple in theory but in practise, that's another story.

At the end of the evaluation, I came with two possible software : Emacs Muse or Oddmuse wiki engine. I'm already using Oddmuse for my messy working place. I would be very happy to get any information about possible alternative.

From that I gave a beginning of solution ... You simply write your entries with your favorite text editor and save it in an ad hoc directory. Every x minute/hour/day, a cron job launch the blog software. This simple software (C/Perl/Ruby/whatever) then parses the ad hoc directory. It finds small texts creation/modification date + time and rename files if needed (YYYYMMDDHHMMSS). There is a very small chance that two posts are posted at the very same second. Then it parses the files there for their content, build basic HTML files, apply a style (skeleton for HTML and CSS for style) and publish the pages to a FTP server.

So, it's not a common blog tool, i.e. it's not web-based at all (although it could be possible to write a web interface if one whishes). It is especially well suited:

  • if you don't care too much about your blog visual aspect (this point can be changed by adding new CSS);
  • if you have a website without PHP/MySQL and/or your website provider is too slow to process exhaustive, beautiful and huge blog engines
  • if you have access to console on a GNU/Linux computer but you don't want to host your blog there (too little time for proper real world, secured servers configuration, not much bandwidth quota each months).

So, practically, my goals were:

  • Simplicity
  • No PHP nor any script for the client
  • All the processing done un Python, offline
  • No DB

Practically ...

You need Python. I use version 2.4. It will surely work on higher versions. I don't know about lower versions. It should work on any platform with Python ; I tested it under GNU/Linux and MS-Windows.

In order to build the html pages, you will need a "header" page, containing everything up to the posts (example). You'll also need a "footer" page, containing everything after the posts (example).

It is strongly recommended to use a CSS stylesheet since Jadoo will output correctly-formated posts with some CSS tags (example). The main tag for post is a ... post class.

Once you want to write an entry, just launch jadwrite.py: this simple script will create a file whose filename is actually a timestamp. You can edit this file in your favorite texte editor. The first line will contain the main title. The second one will contain "tags" separated by spaces (these tags will be used to link to Technocrati). Do not edit the thirs line since it's giving the same time as the timestamp/filename. Finally, you can type your entry in normal HTML from the fifth line. That's all!

Here are an example of blank/default entry and a completed entry.

Then, in order to buil the final html page, just launch jadpub.py: this script will take the header and footer, list the entry files created with jadwrite.py and then put the 10 last ones in an index.html file (example). A RSS file is also created but, for some reason (I didn't investigate), it is incorrect. Voilà!

Now you can take your favorite export tool (FTP, SCP, etc.) and upload your blog on your website.

Software

Download the latest version of Jadoo scripts with example files (tar.gz file, 15ko)

This software is released under the GNU General Public Licence (GPL).
Copyright (C) belongs to Jean-Etienne Poirrier. You can contact me at jepoirrier "at" gmail.com. Please report if you have any problem, comment or if you would like new features in this software (although I don't maintain it anymore).

Current limitations

I am aware of the following limitations:

  • Only the last 10 posts/entries are displayed on the build HTML file
  • There is no archive system (although all the original entries are still stored - in the original .txt format)
  • I certainly missed other important features!

Why "Jadoo"?

I was watching "Koi Mil Gaya" while thinking about this system. Jadoo (meaning "Magic" in Hindi) is the name of E.T. in this film.