How eliblurr/bitcoinbook works
Project type and purpose
• This is not a traditional full-stack app or microservice; it’s an open-source documentation/book project ("Mastering Bitcoin")
• Primary purpose: maintain source (AsciiDoc chapters, appendices, code examples), build multiple output formats (HTML, PDF, EPUB, MOBI), run CI checks, publish releases, support translations
File structure
• Top-level AsciiDoc files (ch01.asciidoc … ch12.asciidoc, appendices *.asciidoc, book.asciidoc) are the content sources
• code/ folder holds runnable examples in C++, Python, Go, JavaScript for demonstration and CI testing
• theme/ directory contains presentation layers (CSS/layout HTML) for EPUB, PDF, MOBI builds
• tools/ includes helper scripts and reports for figure renaming, intake processing
• build & CI config: .travis.yml drives continuous integration; atlas.json, various HTML files for site structure; bookmarks like toc.html, ix.html for navigation
README for additional insights
• Describes Editions, how to read (book.asciidoc entry point), how to contribute (develop branch on GitHub), licensing
Main components
a. Content Source
– AsciiDoc chapters, appendices, front/back matter (cover.html, titlepage.html, toc.html, etc.)
– Images folder for figures
b. Code Examples
– code/ subfolders containing example scripts (Python, Go, C++, JS)
– tests or usage within chapters
c. Build Toolchain
– AsciiDoctor (or Antora/Asciidoctor PDF, EPUB, Kindle)
– theme templates for each format
– helper scripts in tools/
d. Continuous Integration
– Travis CI (.travis.yml) runs build sanity checks, example code linting/tests
e. Output Artifacts
– HTML website (via GitHub Pages or static host)
– PDF, EPUB, MOBI files (via AsciiDoctor plugins)
– GitHub releases (Edition tags)
f. External Services
– GitHub for source hosting, issues, pull requests, releases
– Transifex for community translations
Relationships and interactions
• Code Examples → CI → Pass/Fail status → Build approval
• GitHub (Repo) ← push (branches/tags) → triggers CI → artifacts deployed to Releases/Pages
• Translations (external) feed into content source via Pull Requests
Architectural patterns and design principles
• Separation of concerns: content vs. presentation (themes) vs. examples vs. build logic
• Extensibility: add new formats by dropping a new theme; add languages via code/ folder
• Reproducibility: CI ensures every commit can generate the same outputs
• Modularity: each chapter is an independent AsciiDoc file, appendices separate