Converts the System Programming wiki markdown files into a single PDF or EPUB book, ordered by the course table of contents.
- Python 3.6+
- Pandoc (tested with 3.6+)
- For PDF output:
xelatex(installtexlive-xetexand related font packages)
# Generate PDF
python3 build_book.py --pdf
# Generate EPUB
python3 build_book.py --epub
# Generate both
python3 build_book.py --pdf --epubOutput files are written to the current directory as SystemProgramming.pdf and/or SystemProgramming.epub.
- Concatenates all wiki markdown files in table-of-contents order (12 chapters)
- Cleans up wiki-style links, HTML tags, broken remote images, and invalid characters
- Structures headings into a chapter/section hierarchy
- Generates a table of contents
- For PDF: applies LaTeX-specific escaping and page breaks via
xelatex - For EPUB: produces a clean EPUB3 with chapter-level splitting