Project

kindler

0.02
No commit activity in last 3 years
No release in over 3 years
kindler is a rubygem allow you to generate kindle mobi book very easily
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Kindler

Code Climate

Todo

  • support inner reference, inner link can take to that article
  • refactor templates
  • fix image download

Is this gem what you want?

There is an alternative gem called kindlerb can generate mobi books, the gem is also used for the website KindleFeeder which is built by Daniel Choi.

If you like to generate mobi book by some html files, you have to conform to the structure which author provide. But if you just want to generate mobi book in the fly, then you should try this gem.

BTW, we share the same internal way to generating mobi book by KindleGen 2.

Prerequisite

  1. kindlegen execute file from amazon
  2. imagemagick exist
  3. that's all

Installation

gem 'kindler'

or

gem 'kindler',:git=>'git@github.com:29decibel/kindler.git'

A kindle mobi book generator

which receive a couple of urls then output one mobi file

Usage

title = 'my_first_mobi_book'
book = Kindler::Book.new :title=>title,:author=>'mike'
# add one article
book.add_article {
  :title    =>  'page1',
  :author   =>  'mike1',
  :content  =>  'this is the page 1',
  :section  =>  'love' }
# add another article
book.add_article {
  :title    =>  'page2',
  :author   =>  'mike1',
  :content  =>  'this is the page 2',
  :section  =>  'hate' }
# add an article contains image
book.add_article {
  :title    =>  'page_with_image',
  :author   =>  'mike1',
  :content  =>  '<img src="http://media2.glamour-sales.com.cn/media/catalog/category/Stroili_banner_02.jpg"></img>this is the page 3',
  :section  =>  'hate' }
# you will get my_first_mobi_book.mobi file
book.generate

#or you can just generate simple mobi book
book.mobi_type = :flat
book.generate

Keep Reading!