The Web Book Boilerplate - Writing books for almost every platform
github.com
github.com
An adaption of Scott Chacon's Pro Git
Among my goals was to be able to publish to the Web while writing and have the option for public comments. I also wanted to write the books using Markdown or Textile.
I ended up writing some tools to convert the generated (X)HTML to epub and mobi, and the results are pretty good. However, I also want to have a PDF version and I've yet to find an automated tool that does a good job. I'm deeply skeptical that any tool can take HTML and output nicely formated PDF with proper page breaks, image handling, no dangling sentences or paragraphs, no distracting rivers of white-space in the text, etc.
I'll give this a shot but I'm not sure if there's a better solution than periodically hand-crafting the PDF.
If you don't do anything to complicated in your HTML or Markdown, it might be worth trying to generate a LaTeX file and generating the PDF from that.
Since I'm also doing epub/mobi there are some limits on how clever I can be, so my PDF needs are not all that sophisticated.
Checkout the wiki: https://github.com/PascalPrecht/wbb/wiki
If you're interested in the differences between Pandoc and Leanpub, there are two places to look. Leanpub is based off of Kramdown, so there's the Kramdown documentation[1]. We have made a few extensions to Kramdown to support things that books need, so you'll also want to look at the Leanpub manual[2].
If you have any questions, send us an email at hello@leanpub.com.
Looks like an exciting project. I'll take a look.
[1]: http://kramdown.rubyforge.org/syntax.html [2]: https://leanpub.com/help/manual
It's not working for all output formats (and images are missing and there's no stylesheet, etc) but I'm hoping to invite collaboration by just throwing it up there:
http://github.com/tspike/wbb-demo for source or http://tspike.github.com/wbb-demo for HTML
Thanks for making this tool! It's very timely for me.
PDF/dead tree is a still a huge platform. Dealing with front/back matter is the 20% end of the solution that no one wants to deal with ;(
Disclaimer - I've written multiple ebooks (which are relatively easy, though older kindle/mobi7 has quite a few warts), yet still have big demand for print. I've yet to see one source to rule them all. (Personally use rST and tools around it).
Check out this example:
https://dl.dropbox.com/u/94002/postmortem/docs/EmeryRoe/out/...
This was generated using Markdown run through Pandoc (which the OP is using) which was configured to target a LaTeX template which then converts to a very nicely formatted PDF.
The key to moving from Markdown to PDF is to have a nice LaTeX template to format the content generated from Markdown.
* Offline in-browser reading using AppCache
* Highlighting, bookmarks, notes, last place read using localStorage or indexedDB and then synced to the server when online
So, no.. unfortunately there's no demo :( Just try it out :)
I've self published two draft books, one using a custom-rails setup and the other using the Octopress/Jekyll platform (http://ruby.bastardsbook.com and http://photography.bastardsbook.com)...but they are only books in name only...However, I think moving them over to Markdown won't be too much of a problem.
But my main concern is how to turn a list of markdown files into a decent website without too much hassle. For example, I would like the code snippets to "live" on github (or in an external directory) and pulled only into the page templates where specified by the publishing-script. Octopress handles this pretty nicely with its liquid tags. I haven't worked it out yet but I think it can't be too hard to design a rake task that compiles the Octopress site and delivers the Markdown to leanpub as specified...I'm eagerly waiting for Octopress 2.1 to come out.