Python script to generate static site?

Harry George harry.g.george at boeing.com
Wed Aug 11 18:54:35 EDT 2004


Fred <fred at acme.com> writes:

> 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...
> 
> Thank you
> Fred.

My Pdx package can do this:
manual: http://www.seanet.com/~hgg9140/comp/pdx-1.6.1/doc/manual.html 
download: http://www.seanet.com/~hgg9140/comp/

You do a template, then do "=include_for html" for the basic datafile
you want to wrap.  Or write directly in Pdx (less verbose than raw
html).

-- 
harry.g.george at boeing.com
6-6M21 BCA CompArch Design Engineering
Phone: (425) 342-0007



More information about the Python-list mailing list