Closed haegemon closed 7 years ago
Hi, there's already a PDF version. It's linked on the main page of the Anti-Pattern book: https://docs.quantifiedcode.com/python-anti-patterns/latex/The-Little-Book-of-Python-Anti-Patterns-1.0.pdf
Thanks
Apologies for the "me too" but is there a single downloadable, readable version for all chapters in this book?
Edit: There is link to prebuilt PDF in README, this comment is obsoleted.
You can build it yourself, all the required files are available here. I managed to build a PDF on Arch. If you use Arch you can use my PKGBUILD
at the end of this comment. I don't use Windows anymore so I don't know how to do this on Windows. Other distros please follow the instructions below.
python-sphinx
, texlive-core
, texlive-latexextra
, check your distro repo for corresponding packages.cd
to docs
directory.make latex
(don't run make latexpdf
as it reports some strange errors).cp logo_qc.png _build/html/python-anti-patterns/latex
to copy the logo to latex directory. I don't know why it is missing in the first place, but for now to make it work just copy it manually.make -C _build/html/python-anti-patterns/latex
to build the PDF.cp _build/html/python-anti-patterns/latex/*.pdf .
to copy the result back to docs
directory.(For Arch only) And here is the PKGBUILD
, create an empty directory and put it inside, then run makepkg -s
in that directory, done. All the steps above are done automatically.
# Maintainer: Duong Do Minh Chau <duongdominhchau@gmail.com>
pkgname=python-anti-patterns
pkgver=20200227
pkgrel=1
pkgdesc="Python anti-pattern book"
arch=(any)
url="https://github.com/quantifiedcode/python-anti-patterns"
license=('CCPL')
makedepends=(python-sphinx texlive-core texlive-latexextra)
source=("${pkgver}.zip::https://github.com/quantifiedcode/python-anti-patterns/archive/master.zip")
sha256sums=(SKIP)
build() {
cd "${pkgname}-master/docs"
make latex
cp logo_qc.png _build/html/python-anti-patterns/latex
make -C _build/html/python-anti-patterns/latex
}
package() {
cd "${pkgname}-master/docs/_build/html/python-anti-patterns/latex"
cp *.pdf "${srcdir}/../The Little Book of Python Anti-Patterns.pdf"
exit
}
Can u create pdf/fb2/... version of book?