Convert from `pyenv` + `pip` to `uv`.
Wrap long lines in block quotes in plain text output.
Right-justify the attribution in plain text block quotes.
Tools for producing electronic books.
make
and uv
make check
make
make clean
make clobber
prettify
)strip
)parse
)join
)normalize
)correct
)plaintext
)plainhtml
)epub
)HTML files are fetched from Wikisource and Project Gutenberg Australia. Scans
of the original publications are fetched from the Internet Archive and are used
for reference when making corrections. Because the list of content files is
long, content target files are given in conan/fetch.mk
, which is included in
Makefile
. The ./bin/fetch
script contains the curl
command used to fetch
the content.
The fetch
target fetches all HTML files. To get the original publications
from the Internet Archive, run fetch-all
, but note that the Internet Archive
may throttle downloads, causing make fetch-all
to fail.
Sometimes fetched content is not correctly encoded as UTF-8 and the strip.py
script will fail. The process for fixing this is:
./fetched/<content path>
to ./tmp/repaired/<content path>
./tmp/repaired/<content path>
and fix any problemsdiff
command below./fetched/<content path>
to the needs_repair
makefile variableThe diff
command looks like:
diff -u \
./fetched/<content path> \
./tmp/repaired/<content path> \
> ./<content path>.patch
The code in books is made available under a BSD license. See the
LICENSE
file for details. Content for books is fetched from
Wikisource and Project Gutenberg Australia, where it is attested to be
in the public domain in the United States and Australia respectively.