Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rachelandrew/css-books
Example files for building CSS books
https://github.com/rachelandrew/css-books
Last synced: 25 days ago
JSON representation
Example files for building CSS books
- Host: GitHub
- URL: https://github.com/rachelandrew/css-books
- Owner: rachelandrew
- License: unlicense
- Created: 2014-07-15T12:37:20.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-09T08:41:46.000Z (about 10 years ago)
- Last Synced: 2024-04-14T07:26:10.233Z (9 months ago)
- Language: CSS
- Size: 1.79 MB
- Stars: 74
- Watchers: 3
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
css-books
=========Example files for building CSS books. I use these as my starting point and reference them in my presentation [CSS and Ebooks](http://rachelandrew.co.uk/presentations/css-books) and Net Magazine tutorial. Resources and more information about CSS and creating ebooks in a variety of formats can be found on my site [Book Toolkit](http://booktoolkit.com).
## Using these files
The file book.html contains 3 articles from my blog to create a "book" of three chapters.
These files are for use when creating an ebook in formats for EPUB, MOBI and PDF using the following commandline tools.
* [pandoc](http://johnmacfarlane.net/pandoc/)
* [Kindlegen](http://www.amazon.com/gp/feature.html?docId=1000765211)
* [Prince](http://www.princexml.com/)Download and install these tools first. Prince is a commercial tool however you can use it free of charge for non-commercial usage.
Git clone this repository.
### Create an EPUB
Change into the css-ebooks directory and at the cli run:
> pandoc -o builds/book.epub book.html --epub-metadata=metadata.xml --toc --toc-depth=2 --epub-cover-image=cover.png --epub-stylesheet=epub-styles.css
### Create a MOBI
Use your EPUB as the source for the Kindlegen tool.
> /Applications/KindleGen/kindlegen builds/book.epub
### Create a PDF
This uses the toc.html file to create the table of contents.
> prince -s pdf-styles.css toc.html book.html builds/book.pdf
I've avoided doing much in the way of typography in these examples but feel free to fork this and make it pretty.