Python script to generate static site?

Walter Dörwald walter at livinglogic.de
Thu Aug 12 12:20:04 EDT 2004


Fred wrote:
> Hi,
> 
> I'm sure there are a bunch of them, but googling just returned
> full-fledged CMS that require a DBMS and generate dynamic pages.
> 
> I'd just like a script that would 
> 1. look in a directory for articles in raw HTML,
> 2. generate a cooked output for each page (ie. add header and footer,
> CSS link in HEAD, etc.),
> 3. regenerate the homepage with "Last modified" bit following each
> article's title,
> 4. ready to be uploaded by FTP to a web server that only handles
> static web pages.
> 
> Considering Python's wealth of libraries, it's most likely only a
> couple hours' work, but since I'm pretty much a Python newbie...

You could try XIST (http://www.livinglogic.de/Python/xist/).

The source for this page can be found here:
http://www.livinglogic.de/Python/xist/index.htmlxsc

XIST supports Unicode, XHTML, SVG, XSL-FO, WML etc.

Bye,
    Walter Dörwald





More information about the Python-list mailing list