Project

epuber

0.01
There's a lot of open issues
A long-lived project that still receives updates
Epuber is simple tool to compile and pack source files into EPUB format.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.8, < 2.0
~> 2.1
~> 0.3, >= 0.3.1
~> 1.0
>= 4.0, < 6.0
~> 1.1, >= 1.1.1
~> 3.0
~> 1.8, >= 1.8.2
~> 1.0
>= 2.0, < 4.0
>= 2.0, < 4.0
~> 1.6
>= 6.0, < 8.0
>= 4.2, < 6.0
~> 2.3
 Project Readme

Epuber

Gem Version Build Status Coverage Status Inline docs

Epuber is simple tool to compile and pack source files into EPUB format. Offers to define multiple "targets" which allows to create multiple versions of the book by running only one command. Eliminates copying code and information, eliminates needs to use git branches to differ ebook content.

For more information look at documentation.

Features

Simple example of .bookspec file defining all book's metadata and Table Of Contents. This file can be generated by running command epuber init.

Epuber::Book.new do |book|
  book.title = 'Epuber example book'
  book.author = 'Roman KΕ™Γ­ΕΎ'
  book.isbn = '123-45-67890-12-3'
  book.version = '1.0.1'
  book.build_version = '5'

  book.cover_image = 'cover'
  book.add_default_style 'default_style.styl'

  # create spine and toc
  book.toc do |toc|
    toc.file 'cover', :landmark_cover
    toc.file 'copyright', :landmark_copyright
    toc.file 'toc', :landmark_toc

    toc.file 'intro', 'Intro'

    toc.file 'chapter_01', 'Chapter One' do
      toc.file '#section_01', 'Section One, awesome'
      toc.file '#section_02', 'Section Two, more awesome'
      toc.file '#section_03', 'Section Three, wow, much, very'
    end

    toc.file 'conclusion', 'Conclusion'

    toc.file 'footnotes', 'Footnotes', linear: false
  end

  # load basic validators folder with ruby scripts
  book.use 'basic_validators/'
end

Except for paths to plugins book.use, every path could be only name of the file, even without extension. So you can rename them, move them, the correct path will always resolved. Only exception is when the same name has more then one file.

Epuber
πŸ“– Creates seamless workflow for creating ebooks
🚝 Defines different targets for several book stores (iBookstore, Google Play store, ...)
πŸ”§ Extend and customise the functionality with plugins
✏️ Defines constants so you can have link to related book in proper book store
πŸ“ Defines mechanisms to deal with duplicated
🎩 Easy setup assistant to get started in a few minutes
πŸ‘» Automatically validates generated text so you don't have to worry about typos and other mistakes
πŸš€ Saves you hours when developing new or updating existing book
πŸ“ƒ Supports template engines, CSS preprocessors and standard EPUB formats at the same time
πŸ’» Have local development web server to iterate and experiment quickly
➿ Automatically refresh web browser when some source file changes
πŸ’£ Quick jumping through pages with arrow keys on keyboard
πŸ“• Supports EPUB 2 and 3

Installation

First of all Epuber uses RMagick which has several external dependencies, so you have to install that first:

  • ImageMagick
  • pkg-config

On OS X make sure you Xcode Command Line Tools installed:

xcode-select --install

And the easiest way to install prerequisites on macOS is to use brew:

brew install imagemagick node pkg-config

On Ubuntu, you can run:

sudo apt install libmagickwand-dev

Finish

Then just type following line to terminal:

[sudo] gem install epuber

If everything goes well, try running following line in terminal:

epuber --help

Development

After checking out the repo, run bundle install to install dependencies. Then, run rake spec to run the tests.

To install this gem onto your local machine, run bundle exec rake install.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/epuber-io/epuber. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.