0.01
No commit activity in last 3 years
No release in over 3 years
A simple eBook (ePub and Mobi) generator gem
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 4
>= 3.0.0
>= 1.0.0
 Project Readme

EbookGenerator

Rails gem to generate eBooks using the Markdown syntax to format content for sections of the book.

An example of this gem being used can be found at: dskri.be

Requires:

  • Rails 4
  • Rubyzip (to generate the .epub)
  • Redcarpet (to render Markdown into HTML)
  • Kindlegen (to generate .mobi files)

Installation

Add this line to your application's Gemfile:

gem 'ebook_generator'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ebook_generator

Usage

Generate the tables needed to process the ebooks: rails generate ebook_generator

Migrate the database: rake db:migrate

Pass the ebook object you want to generate: EbookGenerator.generate_ebook(ebook_object)

This will then generate an ePub based on the values in the db and output to the /tmp folder.

For a Kindle mobi file then pass in kindle as the second argument: EbookGenerator.generate_ebook(ebook_object, 'kindle')

To enable the generation of Kindle mobi files then you will first need to download the kindlegen command line tool from Amazon and put it in your apps /bin directory.

Feature roadmap

1.1.0

  • Style editing

1.2.0

  • PDF out

1.3.0

  • HTML out
  • Image support for the front cover

1.4.0

  • HTML to eBook conversion

Contributing

  1. Fork it ( https://github.com/[my-github-username]/ebook_generator/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request