html/conf.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import subprocess, os, sys
4 def sh(command):
5  print("+ {}".format(command))
6  print(subprocess.check_output(command, shell=True))
7 
8 # install latex2html
9 sh("mkdir -p tmp")
10 sh("apt-get download libnetpbm10")
11 sh("dpkg-deb -x libnetpbm10_*.deb tmp")
12 sh("apt-get download netpbm")
13 sh("dpkg-deb -x netpbm_*.deb tmp")
14 sh("apt-get download latex2html")
15 sh("dpkg-deb -x latex2html_*.deb tmp")
16 sh("cd tmp/usr/share/latex2html; ln -sf ../../../etc/latex2html.conf l2hconf.pm")
17 
18 sh("sed -i 's@PERL /usr@PERL {}/tmp/usr@' tmp/etc/latex2html.conf".format(os.getcwd()))
19 sh("sed -i 's@/usr/bin/pnm@{}/tmp/usr/bin/pnm@' tmp/etc/latex2html.conf".format(os.getcwd()))
20 sh("sed -i 's@/usr/bin/pnm@{}/tmp/usr/bin/pnm@' tmp/usr/bin/pstoimg".format(os.getcwd()))
21 sh("sed -i 's@/usr/bin/ppm@{}/tmp/usr/bin/ppm@' tmp/usr/bin/pstoimg".format(os.getcwd()))
22 sh("sed -i 's@/usr/bin/pbm@{}/tmp/usr/bin/pbm@' tmp/usr/bin/pstoimg".format(os.getcwd()))
23 
24 # run make html
25 sh("export CURDIR=`pwd`; cd ../latex/; LATEX2HTMLDIR=$CURDIR/tmp/usr/share/latex2html LERL5LIB=$LATEX2HTMLDIR LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CURDIR/tmp/usr/lib/ PATH=$PATH:$CURDIR/tmp/usr/bin/ make html")
26 sh("export CURDIR=`pwd`; cd ../jlatex/; LATEX2HTMLDIR=$CURDIR/tmp/usr/share/latex2html LERL5LIB=$LATEX2HTMLDIR LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CURDIR/tmp/usr/lib/ PATH=$PATH:$CURDIR/tmp/usr/bin/ make html")
27 
28 # copy result to docs and _build/html
29 sh("cd ../../; ln -sf doc/html docs")
30 sh("mkdir -p _build/html; cp * _build/html/; echo 'ok'")
31 
32 # custom settings conf.py
33 master_doc = 'index'
34 
def sh(command)
Definition: html/conf.py:4


euslisp
Author(s): Toshihiro Matsui
autogenerated on Fri Feb 21 2020 03:20:54