utilisation du paramètre BUILDDIR plutôt qu'une valeur hard-codée
This commit is contained in:
parent
71587e16d9
commit
923d5c4be7
2 changed files with 11 additions and 10 deletions
16
Makefile
16
Makefile
|
|
@ -28,11 +28,11 @@ help:
|
|||
# Finally, we generate the final PDF by adding the bookmarks (for easier navigation in the PDF)
|
||||
# After all, clean up
|
||||
pdf: weasyprint
|
||||
weasyprint build/weasyprint/index.html build/weasyprint/index.pdf -s source/css/print-theme.css
|
||||
python3 sphinx-tools/count_pdf_pages.py
|
||||
weasyprint build/weasyprint/index.html build/weasyprint/index.pdf -s source/css/print-theme.css
|
||||
./pdftoc-to-latex build/weasyprint/index.pdf > build/weasyprint/toc.tex
|
||||
- pdflatex -interaction nonstopmode -output-directory=build/weasyprint build/weasyprint/toc.tex
|
||||
pdftk A=build/weasyprint/index.pdf B=build/weasyprint/toc.pdf cat A1 B A2-end output build/weasyprint/vheliotech-without-bookmarks.pdf
|
||||
python3 sphinx-tools/update_pdf_bookmarks.py build/weasyprint/index.pdf build/weasyprint/vheliotech-without-bookmarks.pdf build/weasyprint/vheliotech.pdf
|
||||
#rm build/weasyprint/index.pdf build/weasyprint/toc.tex build/weasyprint/toc.pdf build/weasyprint/GuidedemontageVheliotech.pdf
|
||||
weasyprint "$(BUILDDIR)/weasyprint/index.html" "$(BUILDDIR)/weasyprint/index.pdf" -s "$(SOURCEDIR)/css/print-theme.css"
|
||||
python3 sphinx-tools/count_pdf_pages.py "$(BUILDDIR)/weasyprint/index.pdf" "$(SOURCEDIR)/css/print-theme.css"
|
||||
weasyprint "$(BUILDDIR)/weasyprint/index.html" "$(BUILDDIR)/weasyprint/index.pdf" -s "$(SOURCEDIR)/css/print-theme.css"
|
||||
./pdftoc-to-latex "$(BUILDDIR)/weasyprint/index.pdf" > "$(BUILDDIR)/weasyprint/toc.tex"
|
||||
- pdflatex -interaction nonstopmode "-output-directory=$(BUILDDIR)/weasyprint" "$(BUILDDIR)/weasyprint/toc.tex"
|
||||
pdftk "A=$(BUILDDIR)/weasyprint/index.pdf" "B=$(BUILDDIR)/weasyprint/toc.pdf" cat A1 B A2-end output "$(BUILDDIR)/weasyprint/vheliotech-without-bookmarks.pdf"
|
||||
python3 sphinx-tools/update_pdf_bookmarks.py "$(BUILDDIR)/weasyprint/index.pdf" "$(BUILDDIR)/weasyprint/vheliotech-without-bookmarks.pdf" "$(BUILDDIR)/weasyprint/vheliotech.pdf"
|
||||
#rm "$(BUILDDIR)/weasyprint/index.pdf" "$(BUILDDIR)/weasyprint/toc.tex" "$(BUILDDIR)/weasyprint/toc.pdf" "$(BUILDDIR)/weasyprint/GuidedemontageVheliotech.pdf"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
import subprocess
|
||||
import re
|
||||
import sys
|
||||
|
||||
pdf_filename = 'build/weasyprint/index.pdf'
|
||||
css_filename = 'source/css/print-theme.css'
|
||||
pdf_filename = sys.argv[1]
|
||||
css_filename = sys.argv[2]
|
||||
additional_pages = 2
|
||||
|
||||
# count pages in index.pdf
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue