Update step-by-step instructions with new --in-place option for se print-manifest-and-spine

This commit is contained in:
Alex Cabal 2019-03-11 16:39:22 -05:00
parent d4c4f77d39
commit 033a390341

View file

@ -344,8 +344,9 @@ require_once('Core.php');
<p><code class="path">content.opf</code> 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.</p> <p><code class="path">content.opf</code> 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.</p>
<p>The <code class="path">content.opf</code> is standardized. Please <a href="/contribute/metadata">see our extensive Metadata Manual</a> for details on how to fill out <code class="path">content.opf</code>.</p> <p>The <code class="path">content.opf</code> is standardized. Please <a href="/contribute/metadata">see our extensive Metadata Manual</a> for details on how to fill out <code class="path">content.opf</code>.</p>
<p>As you complete the metadata, youll have to order the spine and the manifest in this file. Fortunately, Standard Ebooks has a tool for that too: <code class="program">se print-manifest-and-spine</code>. Run this on our source directory and, as you can guess, itll print out the <code class="html">&lt;manifest&gt;</code> and <code class="html">&lt;spine&gt;</code> tags for this work.</p> <p>As you complete the metadata, youll have to order the spine and the manifest in this file. Fortunately, Standard Ebooks has a tool for that too: <code class="program">se print-manifest-and-spine</code>. Run this on our source directory and, as you can guess, itll print out the <code class="html">&lt;manifest&gt;</code> and <code class="html">&lt;spine&gt;</code> tags for this work.</p>
<code class="terminal raw"><span>se print-manifest-and-spine .</span>&lt;manifest&gt; &lt;item href="css/core.css" id="core.css" media-type="text/css"/&gt; &lt;item href="css/local.css" id="local.css" media-type="text/css"/&gt; &lt;item href="images/cover.svg" id="cover.svg" media-type="image/svg+xml" properties="cover-image"/&gt; &lt;item href="images/logo.svg" id="logo.svg" media-type="image/svg+xml"/&gt; &lt;item href="images/titlepage.svg" id="titlepage.svg" media-type="image/svg+xml"/&gt; &lt;!--snip all the way to the end..--&gt; &lt;item href="text/colophon.xhtml" id="colophon.xhtml" media-type="application/xhtml+xml"/&gt; &lt;item href="text/titlepage.xhtml" id="titlepage.xhtml" media-type="application/xhtml+xml" properties="svg"/&gt; &lt;item href="text/unlicense.xhtml" id="unlicense.xhtml" media-type="application/xhtml+xml"/&gt; &lt;/manifest&gt; &lt;spine&gt; &lt;itemref idref="titlepage.xhtml"/&gt; &lt;!--snip all the way to the end..--&gt; &lt;itemref idref="colophon.xhtml"/&gt; &lt;itemref idref="unlicense.xhtml"/&gt; &lt;/spine&gt;</code> <p>Since this is the first time were editing <code class="path">content.opf</code>, were OK with replacing both the manifest and spine tags with a guess at the correct contents. We can do this using the <code class="program">--in-place</code> option. If we have to update the manifest or spine later, we can omit the option to print to standard output instead of altering <code class="path">content.opf</code> directly.</p>
<p>The manifest is already in the correct order and doesnt need to be edited. The spine, however, will have to be reordered to be in the correct reading order. Once weve done that, paste it in to <code class="path">content.opf</code> and commit.</p><code class="terminal"><span>git add -A</span> <span>git commit -m "Complete content.opf"</span></code> <code class="terminal raw"><span>se print-manifest-and-spine --in-place .</span></code>
<p>The manifest is already in the correct order and doesnt need to be edited. The spine, however, will have to be reordered to be in the correct reading order. Once youve done that, commit!</p><code class="terminal"><span>git add -A</span> <span>git commit -m "Complete content.opf"</span></code>
</li> </li>
<li> <li>
<h2>Complete the colophon</h2> <h2>Complete the colophon</h2>