Git Product home page Git Product logo

epub-boilerplate's Introduction

ePub-Boilerplate

http://javierarce.github.com/epub-boilerplate

ePub Boilerplate is a simple template that helps you build ePub-formatted books.

How to use the template

  1. Clone the repo:

     $ git clone [email protected]:javierarce/epub-boilerplate.git
    
  2. Edit the contents of the book directory1.

  3. Run the publish script to generate and validate the book:

     $ ./publish book
    

1: You'll find comments inside several files to guide you.

Structure of a book

Here's the structure of the sample book included in the repo:

▾ book/
  ▾ META-INF/
      com.apple.ibooks.display-options.xml
      container.xml
  ▾ OEBPS/
    ▾ Images/
        cover.jpg
        image-01.jpg
        image-02.png
    ▾ Styles/
        style.css
    ▾ Text/
        acknowledgements.xhtml
        chapter01.xhtml
        chapter02.xhtml
        chapter03.xhtml
        cover.xhtml
        dedication.xhtml
        endnotes.xhtml
        foreword.xhtml
        frontmatter.xhtml
        introduction.xhtml
        toc.xhtml
      content.opf
      toc.ncx
    mimetype

ePub validation

This project uses epubcheck to validate the generated ePubs. If the build.sh script complains when running epubcheck, make sure you have java installed and it's in your PATH.

If you need help running epubcheck read this step-by-step guide.

Using the check script to validate the book.

It's supereasy. Just do:

$ ./check book.epub

This project currently uses EpubCheck version 3.0-RC-1.

Style

Caveat lector: currently there aren't any defined styles. While I add a basic layout have a look at the ePub CSS Starter Kit.

ePub → mobi

Here's what you can do if you want to transform your .epub file to .mobi:

  1. Download KindleGen.
  2. Uncompress the file.
  3. Copy the kindlegen executable to the bin folder.
  4. Run ./bin/kindlegen book.epub.

Useful resources

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.