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.
Simple example of
.bookspec file defining all book's metadata and Table Of Contents. This file can be generated by running command
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.
First of all Epuber uses RMagick which has several external dependencies, so you have to install that first:
On OS X make sure you Xcode Command Line Tools installed:
And the easiest way to install prerequisites on OS X is to use brew:
brew install imagemagick pkg-config
On Ubuntu, you can run:
sudo apt-get install libmagickwand-dev
Then just type following line to terminal:
sudo gem install epuber
If everything goes well, try running following line in terminal:
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.
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.
- move all cards from Trello to GitHub
- create documentation
- create several examples of book specification
The gem is available as open source under the terms of the MIT License.