#!/bin/sh
# pydoc generator. note that i use python2 for debian, so pydoc is pydoc2
# here. pydoc and inspect were pinched from python2.1b1 because they're too
# damn useful and backward-compatible with 1.5.2 onwards.
#
# TODO:
# using relative paths will only work if reading doc in doc/ dir within
# package, not anywhere else, so an installation will have to undo some of
# doc.sed's work.
# maybe this should be a makefile?

# $Revision: 1.4 $

PYTHONPATH=.
SRC="cipher coltrans nihilsub ecipher vigenere playfair caesar porta gronsfeld autokey"

for i in $SRC;
do
	PYTHONPATH=$PYTHONPATH pydoc2 -w $i;
	mv $i.html doc/;
	cd doc/;
	cp $i.html $i.html.tmp;
	sed -f doc.sed $i.html.tmp > $i.html;
	rm -f *.tmp;
	cd ..
done

#cd doc/
#for i in $SRC;
#do
#	cp $i.html $i.html.tmp;
#	sed -f doc.sed $i.html.tmp > $i.html;
#	rm -f *.tmp;
#done
#cd ..

