diff --git a/www/contribute/producing-an-ebook-step-by-step.php b/www/contribute/producing-an-ebook-step-by-step.php index 36e73f9a..800f08be 100644 --- a/www/contribute/producing-an-ebook-step-by-step.php +++ b/www/contribute/producing-an-ebook-step-by-step.php @@ -344,6 +344,8 @@ require_once('Core.php');
content.opf
is the file that contains the ebook metadata like author, title, description, and reading order. Most of it will be filling in that basic information, and including links to various resources related to the text.
The content.opf
is standardized. Please see our extensive Metadata Manual for details on how to fill out content.opf
.
As you complete the metadata, you’ll have to order the spine and the manifest in this file. Fortunately, Standard Ebooks has a tool for that too: se print-manifest-and-spine
. Run this on our source directory and, as you can guess, it’ll print out the <manifest>
and <spine>
tags for this work.
If you’re using a Mac, and thus the badly-behaved Finder program, you may find that it has carelessly polluted your work directory with useless .DS_Store
files. Before continuing, you should find a better file manager program, then delete all of that litter with the following command. Otherwise, se print-manifest-and-spine
will include that litter in its output and your epub won’t be valid.
find . -name ".DS_Store" -type f -delete
Since this is the first time we’re editing content.opf
, we’re OK with replacing both the manifest and spine tags with a guess at the correct contents. We can do this using the --in-place
option. If we have to update the manifest or spine later, we can omit the option to print to standard output instead of altering content.opf
directly.
se print-manifest-and-spine --in-place .
The manifest is already in the correct order and doesn’t need to be edited. The spine, however, will have to be reordered to be in the correct reading order. Once you’ve done that, commit!
git add -A git commit -m "Complete content.opf"
@@ -362,9 +364,9 @@ require_once('Core.php');
Before you build the final ebook for you to proofread, it’s a good idea to check the ebook for some common problems you might run in to during production.
First, run se clean
one more time to both clean up the source files, and to alert you if there are XHTML parsing errors. Even though we ran se clean
before, it’s likely that in the course of production the ebook got in to less-than-perfect markup formatting. Remember you can run se clean
as many times as you want—it should always produce the same output.
If you’re using a Mac, and thus the badly-behaved Finder program, you may find that it has carelessly polluted your work directory with useless .DS_Store
files. Before continuing, you should find a better file manager program, then delete all of that litter with the following command:
find . -name ".DS_Store" -type f -delete
- Next, run se lint
. If your ebook has any problems, you’ll see some output listing them. If everything’s OK, then se lint
will complete silently.
se clean . se lint .
+ se clean .
+ Now, run se lint
. If your ebook has any problems, you’ll see some output listing them. If everything’s OK, then se lint
will complete silently.
se lint .