Converting Chimera Python Code to HTML
The python source code can be converted to appealing HTML using pygments. For example:
export CHIMERASRC=/data/src/chimera-svn export MODULE=StructMeasure cd ${CHIMERASRC}/libs/${MODULE} for py in *.py; do html=$(echo $py | sed s/.py$/.html/) pygmentize -f html -O full,style=colorful,linenos=1 -o $html $py done
To see all the options: pygmentize -L
For a full tree of the Chimera libs, try:
#!/bin/bash export CHIMERAPYGMENTS=/data/src/chimera-pygments export CHIMERASRC=/data/src/chimera-svn export CHIMERALIB=$CHIMERASRC/libs pyfiles=$(find $CHIMERALIB -name "*.py") for py in $pyfiles; do html=$(echo $py | sed -e "s/.py$/.html/" -e "s#${CHIMERALIB}#${CHIMERAPYGMENTS}#g") echo $html mkdir -p $(dirname $html) pygmentize -f html -O full,style=trac,linenos=1 -o $html $py done
Last modified
15 years ago
Last modified on Apr 18, 2011, 10:54:47 AM
Note:
See TracWiki
for help on using the wiki.
![[Chimera Issue Tracking System]](/trac/chimera/chrome/site/chimera_logo.png)