Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 28 additions & 25 deletions 2.0/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,70 +17,73 @@ PDFFLAGS = -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress \
ps2pdf $(PDFFLAGS) $<

all: book.tex
makeindex book
pdflatex book
mv book.pdf thinkpython.pdf
evince thinkpython.pdf
makeindex book.idx
pdflatex book
mv book.pdf thinkpython_italian.pdf

hevea: book.tex header.html footer.html
# replace the pdfs with eps
sed s/.pdf/.eps/g book.tex > thinkpython.tex
latex thinkpython
sed s/.pdf/.eps/g book.tex > thinkpython_italian.tex
latex thinkpython_italian
rm -rf html
mkdir html
hevea -fix -O -e latexonly htmlonly thinkpython
hevea -fix -O -e latexonly htmlonly thinkpython_italian
# the following greps are a kludge to prevent imagen from seeing
# the definitions in latexonly, and to avoid headers on the images
grep -v latexonly thinkpython.image.tex > a; mv a thinkpython.image.tex
grep -v fancyhdr thinkpython.image.tex > a; mv a thinkpython.image.tex
imagen -png thinkpython
hacha thinkpython.html
grep -v latexonly thinkpython_italian.image.tex > a; mv a thinkpython_italian.image.tex
sed s/\\\\usepackage{fancyhdr}// < thinkpython_italian.image.tex > a; mv a thinkpython_italian.image.tex
imagen -png thinkpython_italian
hacha thinkpython_italian.html
cp up.png next.png back.png html
mv index.html thinkpython.css thinkpython*.html thinkpython*.png *motif.gif html
mv index.html thinkpython_italian.css thinkpython_italian*.html thinkpython_italian*.png *motif.gif html

DEST = /home/downey/public_html/greent/thinkpython
DEST = /home/downey/public_html/greent/thinkpython_italian

epub:
cd html; ebook-convert index.html thinkpython.epub
cd html; ebook-convert index.html thinkpython_italian.epub

distrib:
rm -rf dist
mkdir dist dist/tex dist/tex/figs
rsync -a thinkpython.pdf html dist
rsync -a Makefile book.tex latexonly htmlonly dist/tex
rsync -a figs/*.fig figs/*.pdf dist/tex/figs
cd dist; zip -r thinkpython.tex.zip tex
cd dist; zip -r thinkpython.html.zip html
rsync -a thinkpython_italian.pdf html dist
rsync -a dist/* $(DEST)
chmod -R o+r $(DEST)/*
cd $(DEST)/..; sh back

# UPDATE THE PATHS BELOW BEFORE RUNNING PLASTEX

plastex:
# Before running plastex, we need the current directory in PYTHONPATH
# export PYTHONPATH=$PYTHONPATH:.
python Filist.py book.tex > book.plastex
rm -rf /home/downey/thinkpython/trunk/book
rm -rf /home/downey/thinkpython_italian/trunk/book
plastex --renderer=DocBook --theme=book --image-resolution=300 --filename=book.xml book.plastex
rm -rf /home/downey/thinkpython/trunk/book/.svn
rm -rf /home/downey/thinkpython_italian/trunk/book/.svn

plastest:
# Before running plastex, we need the current directory in PYTHONPATH
# export PYTHONPATH=$PYTHONPATH:.
python Filist.py test.tex > test.plastex
rm -rf /home/downey/thinkpython/trunk/test
rm -rf /home/downey/thinkpython_italian/trunk/test
plastex --renderer=DocBook --theme=test --filename=test.xml test.plastex
rm -rf /home/downey/thinkpython/trunk/test/.svn
rm -rf /home/downey/thinkpython_italian/trunk/test/.svn

xxe:
~/Downloads/xxe-perso-4_8_0/bin/xxe book/book.xml
xmlcopyeditor ~/ThinkPython2/book/book/book.xml &

lint:
xmllint -noout book/book.xml

OREILLY = /home/downey/oreilly/thinkpython
OREILLY = atlas

oreilly:
rsync -a book.tex $(OREILLY)
rsync -a book/ $(OREILLY)
rsync -a figs/* $(OREILLY)/figs
rsync -a thinkpython.pdf $(OREILLY)/pdf
cd $(OREILLY); git add .
cd $(OREILLY); git commit -m "Automated check in."
cd $(OREILLY); git push

clean:
rm -f *~ *.aux *.log *.dvi *.idx *.ilg *.ind *.toc
Expand Down
Binary file added 2.0/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5,828 changes: 5,828 additions & 0 deletions 2.0/figs/TurtleWorld.eps

Large diffs are not rendered by default.

141 changes: 141 additions & 0 deletions 2.0/figs/assign2.eps

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading