Expand description
Making a new package from a single file (lx new --from book.epub): the file in its format’s
folder, with a logoxide.toml around it. What the file says about itself fills in the manifest,
and anything given (NewPackage) wins over it:
- EPUB (a book): its title, subtitle (the description), every author (
dc:creator, leaving out editors, illustrators, and other roles), language, and publisher, from its package document (the.opfitsMETA-INF/container.xmlnames) - USX, USFM, OSIS, ThML (a Bible, or a book of one): nothing is read from them yet, so a name and a language must be given
A collection (new_collection) has no file: its packages are its dependencies.
Structs§
- File
Metadata - What a file’s own metadata says (empty where it says nothing)
- NewPackage
- What to put in a new package’s
[package]; each one given wins over the file’s metadata
Functions§
- abbreviation_
from - An abbreviation from a name: each word’s first letter or digit, capitalized
(
The Dorean Principle→TDP) - epub_
metadata - An EPUB’s metadata, from the package document its
META-INF/container.xmlnames - file_
format - The format a file is in, from its extension (and, for
.xml, its root element), and the kind of package it makes - id_from
- A package id from a name: lowercase ASCII letters and digits, words joined by
-(God's Word Is Not Bound→gods-word-is-not-bound) - new_
collection - Writes a new collection’s
logoxide.tomlintodest: no text, its packages added afterwards as its dependencies (lx add --project <its folder>) - new_
from_ file - Writes a new package made from one file into
dest: itslogoxide.toml, and the file in its format’s folder (epub/the-dorean-principle.epub). Gives the manifest - opf_
metadata - The metadata in an EPUB’s package document (
.opf), EPUB 2 or 3