gunk-dev/the-valley

README.md

sourcefec8fb9dfaf0main's published tip history
4.2 KiB · Rendered
1# Kindle Scribe reading editions
2
3The current revision centers clear requirements, established solutions, and constraints across the
4complete workflow. It adds a requirements clarification checklist and replaces the novelty
5discussion 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
12Each contains its full report revision and all 106 annotated source entries. Email the chosen file
13to the Scribe's Send to Kindle address. See Amazon's
14[delivery instructions](https://digprjsurvey.amazon.com/csad/help/node/G5WYD9SAF7PGXRNA).
15
16The EPUB uses EPUB 2, presents tables as stacked entries, and links to an ordinary repository
17reference appendix. The PDF uses pages sized for the Scribe, embedded fonts, and page numbers.
18Earlier exports are not included in this submission.
19
20## Test locally
21
22Calibre includes an [ebook viewer](https://manual.calibre-ebook.com/generated/en/ebook-viewer.html).
23From the repository root on Nix:
24
25```sh
26nix shell nixpkgs#calibre --command ebook-viewer \
27 research/the-valley-foundations/the-valley-research-revised.epub
28```
29
30A successful local test verifies that reader's handling of the file. Amazon performs a separate
31conversion for Kindle delivery.
32
33## Rebuild the EPUBs
34
35The Markdown report is the source. With Python 3, Pandoc 3, and EPUBCheck on the path, build and
36validate the compatibility edition:
37
38```sh
39python3 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
45To use this repository's pinned Nix packages:
46
47```sh
48nix 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
57Omit `--compatibility` to build the original layout. That mode also requires `rsvg-convert` for its
58cover. The cover uses DejaVu fonts when installed, with generic font fallbacks. The EPUB body leaves
59fonts to the reader.
60
61## Rebuild the PDF
62
63With the preceding tools and WeasyPrint available, generate the standard reader HTML and render it:
64
65```sh
66python3 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'
69python3 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
74WeasyPrint is available as `python3Packages.weasyprint` in the pinned Nix package set. The PDF uses
75DejaVu fonts. The default output is
76`research/the-valley-foundations/the-valley-research-scribe.pdf`.
77
78## Validation and remaining uncertainty
79
80Both EPUB layouts pass EPUBCheck 5.3.0. Internal references and source passages are checked against
81the Markdown. An earlier EPUB downloaded to a Scribe but would not open. The compatibility edition
82removes images, tables, and EPUB 3 footnote semantics. It also uses short anchor identifiers and a
83consistent navigation depth. None of those features has been established as the cause of the
84original failure. Passing EPUBCheck does not establish that Amazon's converted document will open on
85a particular device.
86
87The PDF is rendered locally and checked for readable pages and preserved content. A replacement
88edition was confirmed to open on the Scribe, although the confirmation did not identify which format
89was used. The latest content revision has not been tested on the device.