I've written a python script (attached) to convert lib/CREDITS to a 
web page. See 
http://www.devel.lyx.org/~leeming/www-user/about/credits.php

The script is currently rather clunky because my python skills aren't 
so hot. Creation:

$ recode ISO-8859-1..H4 < CREDITS > tmp
$ python phpcredits.py tmp > credits.php
$ scp credits.php \
  [EMAIL PROTECTED]:public_html/www-user/about/.

Questions for our resident python gurus:
* Is there a python iconv or recode module? It would be nice to do 
this in one step only.
* If not, then how do I modify the script to take its input from STDIN 
so I can use it as

$ recode ISO-8859-1..H4 < CREDITS | ./phpcredits.py > credits.php

The code to parse the contents of the CREDITS file is also rather 
crappy. Is there a python parser module?

Angus (learning new tricks)

ps, I did this originally as a sed script. If you want to see some 
crazy code, then have a look at phpcredits.sh. (Also attached.)

Attachment: phpcredits.py
Description: application/python

Attachment: phpcredits.sh
Description: application/shellscript

Reply via email to