From 21fa88c810d6e043fb77847d5598af40b25259cf Mon Sep 17 00:00:00 2001 From: Weijia Cheng Date: Fri, 19 Mar 2021 16:48:14 -0700 Subject: [PATCH] Condense git commit commands on step-by-step guide --- www/contribute/producing-an-ebook-step-by-step.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/www/contribute/producing-an-ebook-step-by-step.php b/www/contribute/producing-an-ebook-step-by-step.php index df98a7d3..1a1c743a 100644 --- a/www/contribute/producing-an-ebook-step-by-step.php +++ b/www/contribute/producing-an-ebook-step-by-step.php @@ -190,7 +190,7 @@ proceed to seal up my confession, I bring the life of that unhappy Henry Jekyll
  • Commas and periods should generally be inside quotation marks, not outside. This command helps find and replace them:

    - se interactive-sr "/\v([’”])([,.])/\2\1/" src/epub/text/* + se interactive-sr "/\v([’”])([,.])/\2\1/" src/epub/text/*

    When using this command, be careful to distinguish between the use of as a quotation mark and its use in elision or as part of a plural possessive (i.e. s’).

    @@ -228,7 +228,7 @@ proceed to seal up my confession, I bring the life of that unhappy Henry Jekyll

    If the work you’re producing uses British quotation style (single quotes for dialog versus double quotes in American), we have to convert it to American style. We use American style in part because it’s easier to programmatically convert from American to British than it is to convert the other way around. Skip this step if your work is already in American style.

    se british2american attempts to automate the conversion. Your work must already be typogrified (the previous step in this guide) for the script to work.

    se british2american .

    While se british2american tries its best, thanks to the quirkiness of English punctuation rules it’ll invariably mess some stuff up. Proofreading is required after running the conversion.

    -

    After you’ve run the conversion, do another commit.

    git add -A git commit -m "Convert from British-style quotation to American style" +

    After you’ve run the conversion, do another commit.

    git commit -am "Convert from British-style quotation to American style"

    This regex is useful for spotting incorrectly converted quotes next to em dashes: “[^”‘]+’⁠—(?=[^”]*?</p>;)

  • @@ -274,7 +274,7 @@ proceed to seal up my confession, I bring the life of that unhappy Henry Jekyll

    Semantics for poetry, verse, and song: Many Gutenberg productions use the <pre> tag to format poetry, verse, and song. This is, of course, semantically incorrect. See the Poetry section of the SEMOS for templates on how to semantically format poetry, verse, and song.

  • -

    After you’ve added semantics according to the Standard Ebooks Manual of Style, do another commit.

    git add -A git commit -m "Semanticate" +

    After you’ve added semantics according to the Standard Ebooks Manual of Style, do another commit.

    git commit -am "Semanticate"
  • Set <title> elements

    @@ -282,7 +282,7 @@ proceed to seal up my confession, I bring the life of that unhappy Henry Jekyll

    The se print-title tool takes a well-marked-up section header from a file, and prints the expected value for the <title> element to the terminal. It also has the --in-place option, which will allow us to update all the chapters at once:

    se print-title --in-place src/epub/text/*

    Once you’ve verified the titles look good, commit:

    - git add -A git commit -m "Add titles" + git commit -am "Add titles"
  • Modernize spelling and hyphenation

    @@ -565,7 +565,7 @@ proceed to seal up my confession, I bring the life of that unhappy Henry Jekyll se print-manifest --in-place . se print-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" +

    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 commit -am "Complete content.opf"
  • Complete the table of contents

    @@ -574,13 +574,13 @@ proceed to seal up my confession, I bring the life of that unhappy Henry Jekyll se print-toc --in-place .

    Review the generated ToC in ./src/epub/toc.xhtml to make sure se print-toc did the right thing. se print-toc is valuable tool to discover structural problems in your ebook. If an entry is arranged in a way you weren’t expecting, perhaps the problem isn’t with se print-toc, but with your HTML code—be careful! You may have to make changes by hand for complex or unusual books.

    Once you’re done, commit:

    - git add -A git commit -m "Add ToC" + git commit -am "Add ToC"
  • Complete the colophon

    se create-draft put a skeleton colophon.xhtml file in the ./src/epub/text/ folder. Now that we have the cover image and artist, we can fill out the various fields there. Make sure to credit the original transcribers of the text (generally we assume them to be whoever’s name is on the file we download from Gutenberg) and to include a link back to the Gutenberg text we used, along with a link to any scans we used (from archive.org or hathitrust.org, for example).

    You can also include your own name as the producer of this Standard Ebooks edition. Besides that, the colophon is standardized; don’t get too creative with it.

    -

    The release and updated dates should be the same for the first release, and they should match the dates in content.opf. For now, leave them unchanged, as se prepare-release will automatically fill them in for you as we’ll describe later in this guide.

    git add -A git commit -m "Complete the colophon" +

    The release and updated dates should be the same for the first release, and they should match the dates in content.opf. For now, leave them unchanged, as se prepare-release will automatically fill them in for you as we’ll describe later in this guide.

    git commit -am "Complete the colophon"
  • Complete the imprint