Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

basically the best way to write an ebook

tree: 9da55b8972

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 docbook-xsl
Octocat-spinner-32 example
Octocat-spinner-32 lib
Octocat-spinner-32 site
Octocat-spinner-32 stylesheets
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.asciidoc
Octocat-spinner-32 TODO.txt
Octocat-spinner-32 git-scribe.gemspec

Git Scribe

The git-scribe tool is a simple command line toolset to help you use Git, GitHub and Asciidoc to write e-books. This provides tools for setting up the structure, collaborating with co-authors, doing technical and copy-editing, handling translations, taking errata, as well as publishing online, pdf, mobi (Kindle) and epub (iBooks, Nook) versions.

Easy: Syntax-Highlighted Code, Formula, Diagrams Online: Comment, Search, Permalinks Sell: Kindle, iBooks, Lulu, Pledgie(?)

Start a Book

$ git scribe init (--type=[code,math]) (--license=[public,cc]) (--lang=en) [project]

Generates a skeleton, license file and readmes with instructions for authors and contributors. Also records version of scribe workflow we’re using into .gitscribe file.

  • shows cheat-sheet of how to use grep, tag, diff (--word)

Work on a Book

$ git scribe check

Run checks to make sure you have all the tools you need and your system can do stuff.

$ git scribe register (--role=[author,reviewer,editor,translator])

Register yourself and your role in this book. kept in .git/scribe

To Do List

$ git scribe todo
  • lists boilerplate you still haven’t filled out (title, author, description, chapter, cover, bio, biblio, price, license, etc) most of that is kept in .gitscribe


$ git scribe new chapter


$ git scribe review

TODO: address technical reviewing and copy-editing

Translating - Translator

$ git scribe trans start (--edition=1.1) de

Sets up pre-commit hook to check that commit message is formatted correctly, copies over main language to de

$ git scribe trans changes (--since=2010-01-01)
$ git scribe trans done SHA

Translating - Maintainer

$ git scribe trans complete

See which translations are what percent complete.

  • get list of translators for each translation


This is meant to be done infrequently - like an edition of a book or a major version of a framework that is being documented. Publishing editions too often makes work difficult on translators, so be prudent.

$ git scribe publish 1.1

Tags the edition, copies the source into editions/1.1/en so translators can work from that point.

Generate Media

$ git scribe gen (--lang=de) (--edition=1.0) [site,pdf,mobi,epub]


$ git push origin


$ git scribe sell --price=8.00 [--lang=de] (ibooks,kindle,nook,lulu)


The layout that the git scribe init produces looks like this:

  • book/ |--* 00_frontmatter.asciidoc |--* 01_first_chapter.asciidoc |--* 02_second_chapter.asciidoc |--* 99_backmatter.asciidoc |--* image/ | `--* 01.01-example-image.png | `--* 01.02-another-image.png | `--* 02.01-an-image.png |--* include/ | `--* 02.01-code.c

  • style/ |`--* style.css

  • site/ |`--* layout.html

  • test/ |`--* 01_test.rb

  • LICENSE.txt

  • README.asciidoc

  • .gitscribe

Something went wrong with that request. Please try again.