| 1 | # Kindle Scribe reading editions |
| 2 | |
| 3 | The current revision centers clear requirements, established solutions, and constraints across the |
| 4 | complete workflow. It adds a requirements clarification checklist and replaces the novelty |
| 5 | discussion with an adoption rule and a test of the complete system. |
| 6 | |
| 7 | - [Revised EPUB](../the-valley-research-revised.epub), titled **the-valley Research - Requirements |
| 8 | and Composition**. It uses the compatibility layout with adjustable text. |
| 9 | - [Revised Scribe PDF](../the-valley-research-scribe-revised.pdf), with fixed pages and linked |
| 10 | contents. |
| 11 | |
| 12 | Each contains its full report revision and all 106 annotated source entries. Email the chosen file |
| 13 | to the Scribe's Send to Kindle address. See Amazon's |
| 14 | [delivery instructions](https://digprjsurvey.amazon.com/csad/help/node/G5WYD9SAF7PGXRNA). |
| 15 | |
| 16 | The EPUB uses EPUB 2, presents tables as stacked entries, and links to an ordinary repository |
| 17 | reference appendix. The PDF uses pages sized for the Scribe, embedded fonts, and page numbers. |
| 18 | Earlier exports are not included in this submission. |
| 19 | |
| 20 | ## Test locally |
| 21 | |
| 22 | Calibre includes an [ebook viewer](https://manual.calibre-ebook.com/generated/en/ebook-viewer.html). |
| 23 | From the repository root on Nix: |
| 24 | |
| 25 | ```sh |
| 26 | nix shell nixpkgs#calibre --command ebook-viewer \ |
| 27 | research/the-valley-foundations/the-valley-research-revised.epub |
| 28 | ``` |
| 29 | |
| 30 | A successful local test verifies that reader's handling of the file. Amazon performs a separate |
| 31 | conversion for Kindle delivery. |
| 32 | |
| 33 | ## Rebuild the EPUBs |
| 34 | |
| 35 | The Markdown report is the source. With Python 3, Pandoc 3, and EPUBCheck on the path, build and |
| 36 | validate the compatibility edition: |
| 37 | |
| 38 | ```sh |
| 39 | python3 research/the-valley-foundations/reader-edition/build.py --compatibility \ |
| 40 | --output research/the-valley-foundations/the-valley-research-revised.epub \ |
| 41 | --title 'the-valley Research - Requirements and Composition' \ |
| 42 | --identifier urn:uuid:63de45ec-5215-451c-851f-173f083bf142 --epubcheck epubcheck |
| 43 | ``` |
| 44 | |
| 45 | To use this repository's pinned Nix packages: |
| 46 | |
| 47 | ```sh |
| 48 | nix shell --impure --expr ' |
| 49 | let pkgs = (builtins.getFlake (toString ./.)).inputs.nixpkgs.legacyPackages.x86_64-linux; |
| 50 | in [ pkgs.python3 pkgs.pandoc pkgs.librsvg pkgs.epubcheck pkgs.dejavu_fonts ] |
| 51 | ' --command python3 research/the-valley-foundations/reader-edition/build.py --compatibility \ |
| 52 | --output research/the-valley-foundations/the-valley-research-revised.epub \ |
| 53 | --title 'the-valley Research - Requirements and Composition' \ |
| 54 | --identifier urn:uuid:63de45ec-5215-451c-851f-173f083bf142 --epubcheck epubcheck |
| 55 | ``` |
| 56 | |
| 57 | Omit `--compatibility` to build the original layout. That mode also requires `rsvg-convert` for its |
| 58 | cover. The cover uses DejaVu fonts when installed, with generic font fallbacks. The EPUB body leaves |
| 59 | fonts to the reader. |
| 60 | |
| 61 | ## Rebuild the PDF |
| 62 | |
| 63 | With the preceding tools and WeasyPrint available, generate the standard reader HTML and render it: |
| 64 | |
| 65 | ```sh |
| 66 | python3 research/the-valley-foundations/reader-edition/build.py \ |
| 67 | --output /tmp/the-valley-reading.epub --preview /tmp/the-valley-reading.html \ |
| 68 | --title 'the-valley Research - Requirements and Composition' |
| 69 | python3 research/the-valley-foundations/reader-edition/build_pdf.py \ |
| 70 | --html /tmp/the-valley-reading.html \ |
| 71 | --output research/the-valley-foundations/the-valley-research-scribe-revised.pdf |
| 72 | ``` |
| 73 | |
| 74 | WeasyPrint is available as `python3Packages.weasyprint` in the pinned Nix package set. The PDF uses |
| 75 | DejaVu fonts. The default output is |
| 76 | `research/the-valley-foundations/the-valley-research-scribe.pdf`. |
| 77 | |
| 78 | ## Validation and remaining uncertainty |
| 79 | |
| 80 | Both EPUB layouts pass EPUBCheck 5.3.0. Internal references and source passages are checked against |
| 81 | the Markdown. An earlier EPUB downloaded to a Scribe but would not open. The compatibility edition |
| 82 | removes images, tables, and EPUB 3 footnote semantics. It also uses short anchor identifiers and a |
| 83 | consistent navigation depth. None of those features has been established as the cause of the |
| 84 | original failure. Passing EPUBCheck does not establish that Amazon's converted document will open on |
| 85 | a particular device. |
| 86 | |
| 87 | The PDF is rendered locally and checked for readable pages and preserved content. A replacement |
| 88 | edition was confirmed to open on the Scribe, although the confirmation did not identify which format |
| 89 | was used. The latest content revision has not been tested on the device. |