GIGO: words unreadable aloud
Mishrogo Weedapeval
 

 

  Tuesday 21 May 2002
Cheap Python HTML Templater

A few months ago, I was organizing some tables of handy links, and was frustrated because I wanted to organize my tables by column (list column 1, then column 2, etc.), but I don't know of a way to get HTML to invert tables. So I wrote a cheap Python HTML template processor.

Here is a raw directory of what I have now. Not really in a distributable form for anyone who isn't ready to do a fair amount of customization.

Even cheaper documentation:

index.template --
the HTML shell, input to the python script
index_guts.py --
the python script itself, including the contents of all of the tables
index_new.html --
example output from running index_guts.py
addURL --
a shell script (Rated R, language) that adds stuff to the Additions.html file.

And, yeah, I know that makes about 57 varieties of Cheap Python HTML Templaters out there. You might want to check out the one Alex Martelli put into the ASPN Python Cookbook instead of this one.

Ah, crap. Ran into Radio's weird restrictive notions about file types again. So I renamed the files with faked out .txt endings.
12:34:37 AM   comment/     



Click here to visit the Radio UserLand website. Click to see the XML version of this web page. © Copyright 2007 Doug Landauer .
Last update: 07/2/6; 12:07:59 .
Click here to send an email to the editor of this weblog.

May 2002
Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
Apr   Jun

Previous/Next