Standard Ebooks tools

38 views
Skip to first unread message

Alex Cabal

unread,
Mar 30, 2015, 6:43:00 PM3/30/15
to gitenber...@googlegroups.com
Hi folks, I've just uploaded the tools I've been using to produce ebooks
for the Standard Ebooks project. Hopefully the Gitenberg project can
find them useful. They're at https://github.com/standardebooks/tools

They're almost all Bash scripts. Build requirements for Ubuntu are at
the end of the readme. Many operate on a SE source directory, which is
basically an unzipped pure epub3 file; I've uploaded one example for you
all to check out, James Joyce's Dubliners:
https://github.com/standardebooks/james-joyce-dubliners

I think the parts that will be of most interest to Gitenberg are:

typogrify: A script to convert work to conform to our style guide, i.e.
to have correct curly quotes, em and en dashes, consistent ellipses,
etc. This script uses Gruber's smartypants.pl along with a bunch of
regular expressions, and generally gets most of it right. Where it
messes up are leading contractions of dialect words, like "that was
'orrible". English is extremely quirky and I don't think it's possible
to get these cases correct in a general sense, so proofreading is still
required.

clean: cleans up and canonicalizes xhtml/svg files (but doesn't perform
any typography changes). Very useful for producing a consistent coding
style, something PG sorely lacks.

modernize-hyphenation: Uses the `words` file to remove hyphens from
words that we no longer hyphenate, like "ash-tray" or "to-night".

endnotes2kindle: Kindle has the ability to get popup endnotes, but they
have to be in a very specific format. This script converts a
SE-formatted endnotes list (basically just ol>li) to a Kindle-friendly
list. If Gitenberg decides to follow a format for endnotes similar to
ours, this script could come in handy.

create-draft: Creates a skeleton epub directory and prefills a lot of
content from the ./templates/ directory. Some of it is SE-specific,
like the colophon file, but most of it is general epub cruft.

build: Zip up a SE source directory for a pure epub3 file, and
afterwards perform some trickery to convert that epub3 file to an epub2
compatible file. Optionally run Calibre with a few special options to
generate a mobi file.

Please feel free to ask me anything about these files. I've been
developing them for several months now and I've found them a huge help
in producing epubs.

On a side note, I've launched a Standard Ebooks mailing list so I can
stop hijacking Gitenberg:
https://groups.google.com/forum/#!forum/standardebooks

Please join if you're interested in shaping the direction of this very
new project.

You can also reach me directly at my short first name (4 letters) at
standardebooks.org

Seth Woodworth

unread,
Mar 31, 2015, 10:29:20 AM3/31/15
to gitenber...@googlegroups.com
List joined, repos starred and watched.

I will dig into these tools later this week and see if there is anything we can use immediately.

--S


--
You received this message because you are subscribed to the Google Groups "GITenberg Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitenberg-proj...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gitenberg-project/5519D172.8020701%40alexcabal.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages