#!/bin/sh

# python sytax highlighter
# http://pygments.org/
# Pygments version 0.10, (c) 2006-2007 by Georg Brandl <g.brandl@gmx.net>

STYLE=colorful

for i in `ls *.c`
do

	echo "======================================================================"
	echo $i

	LINENOSTART=`head -1 $i`

	sed '1d' $i > $$.tmp.c

	pygmentize -O full,style=$STYLE,linenos=1,linenostart=$LINENOSTART -o $i.html $$.tmp.c
	#pygmentize -O full,style=$STYLE,line_numbers=0,font_size=10 -o $i.png $$.tmp.c
	pygmentize -O full,style=$STYLE,fontface="DejaVu Sans Mono" -o $i.rtf $$.tmp.c

done

rm $$.tmp.c
