Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/29decibel/kindler
Kindle mobi format ebook generator
https://github.com/29decibel/kindler
Last synced: about 2 months ago
JSON representation
Kindle mobi format ebook generator
- Host: GitHub
- URL: https://github.com/29decibel/kindler
- Owner: 29decibel
- Created: 2012-01-28T15:32:44.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-05-11T17:47:37.000Z (over 10 years ago)
- Last Synced: 2024-05-12T21:20:49.470Z (4 months ago)
- Language: Ruby
- Homepage: http://29decibel.github.com/kindler
- Size: 351 KB
- Stars: 22
- Watchers: 5
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
## Kindler
[![Code Climate](https://codeclimate.com/github/29decibel/kindler.png)](https://codeclimate.com/github/29decibel/kindler)## 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](https://github.com/danchoi/kindlerb) can generate mobi books, the gem is also used
for the website [KindleFeeder](http://kindlefeeder.com/) which is built by [Daniel Choi](http://danielchoi.com/software).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](http://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000234621).
## Prerequisite
1. kindlegen execute file from amazon
2. imagemagick exist
3. that's all## Installation
```ruby
gem 'kindler'
```or
```ruby
gem 'kindler',:git=>'[email protected]:29decibel/kindler.git'
```
## A kindle mobi book generator
which receive a couple of urls then output one mobi file## Usage
```ruby
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 => '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!