• Stars
    star
    366
  • Rank 116,547 (Top 3 %)
  • Language
    Ruby
  • License
    MIT License
  • Created almost 13 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Bring web docs to the Kindle

Kindlefodder

Kindlefodder is a Ruby framework and a collection of recipes for translating website-bound books and documentation into Kindle ebooks that are easy to navigate and a pleasure to peruse. Web browsers are good for scanning information, but Kindles are a lot better when you want to block out distractions and actually learn something.

The ebooks posted here will in most cases be derived from material published under a Creative Commons license. I am grateful to the original authors for writing such good and useful material. They are welcome to take these ebooks and recipes, modify them, and distribute them under their own name.

You can download these ebooks now

Here are a few Kindle ebooks generated with the Kindlefodder framework. You can download them and transfer them to your Kindle via USB.

GitHub Projects

screen screen

This is a collection of READMEs and Wiki Pages from useful GitHub projects. (Work in progress)

Heroku Guide

screen screen

Thoughbot Playbook

screen screen

Pro Git by Scott Chacon

screen screen

If you enjoy the Kindlefodder version, I encourage you to buy the print version to support the author. I own the print version.

jQuery Reference

screen screen

jQuery Fundamentals by Rebecca Murphey et al.

screen screen

Frontend Docs Bundle: Haml/Sass/CoffeeScript/Backbone.js Reference

screen screen

Ruby on Rails Guides

screen screen

The code used to generate this ebook is actually the evolutionary ancestor to the Kindlefodder project. That code is available in the docrails_kindle project.

The Art of Unix Programming by Eric Steven Raymond

screen screen

This one is my personal favorite.

If you enjoy the Kindlefodder version, I encourage you to buy the print version or the official Kindle version as well, to support the author. I have both versions.


Writing your own ebook recipes

Read on if you're interested in learning how to contribute recipes for turning web documentation for other products and services into Kindle ebooks.

If you want to turn web content into an ebook but don't have the time or skill to write the Kindlefodder recipe, you can post an issue requesting help from someone who might be interested in writing that recipe.

Otherwise, my software outfit, Kaja Software LLC, may be willing to do it for a reasonable fee. Send your inquiry to [email protected].

Requirements

  • Ruby 1.9
  • ImageMagick (i.e. the convert command)
  • You must be a fairly good at slicing and dicing HTML with Nokogiri

Also, download Amazon's KindleGen 2 tool and put it on your PATH.

How to write a recipe

Fork this project and git clone your fork. cd into the cloned project directory.

Run bundle install to make sure you have the required dependencies (nokogiri and kindlerb) in the gem path.

Create a recipe file in the recipes/ directory.

Follow the existing recipes as models. The recipes/heroku.rb recipe was the first and is also the most extensively commented.

The requirements of a recipe should be simple and straightforward. I've tried to minimize the amount of work a recipe has to do by abstracting away all the low-level details of generating Kindle MOBI documents. You won't have to think about NCX and OPF files, just fetching HTML source material, cleaning the HTML up, and splitting it up into Kindle sections and articles. Images will be downloaded, converted to grayscale gifs, resized, and incorporated into the ebook automatically (as long as the src attributes of the img tags point to absolute URLs).

Still, writing recipe code to clean up and extract Kindle-friendly content can sometimes be time-consuming, depending on the source. Often you will have to strip out or tweak HTML content to make it work better in Kindle format. But thanks to the expressive power of Ruby and Nokogiri, performing the necessary HTML plastic surgery on a source usually takes me no more than 20 minutes.

Once you finish your recipe, generate the ebook with this command:

ruby -Ilib recipes/your_new_recipe.rb

If all goes well, you should have a nice Kindle ebook version of the web documentation you processed.

Now submit a pull request on your fork so I can pull in your recipe.

All recipe contributors will be recognized and thanked heartily on this page.

If you're working on a recipe, you may want post a Github issue saying what you're working on and give it the "recipe in progress" label. This will help prevent unnecessary duplication of effort.

Working with Docker

A Dockerfile is provided to build an image with all dependencies. In order to build image, run

docker build -t kindlefodder .

In order to build your recipe, run

docker run --rm -v $PWD/src:/usr/app/src kindlefodder recipes/your_new_recipe.rb

Issues

This project is new and rough around the edges, so please feel welcome to report issues and contribute to the code.

Kindlefeeder

Kindlefodder is based on what I learned making Kindlefeeder, a feed aggregation service that bundles your favorite RSS and Atom feeds -- like the full content of the front page items of Hacker News -- into Kindle ebooks delivered to your Kindle. There are free and paid versions of this service.

More Repositories

1

vmail

a vim interface for gmail
Ruby
781
star
2

herbalizer

Convert HAML to ERB
Haskell
114
star
3

ri.vim

browse ri documentation from Vim
Ruby
113
star
4

fredit

Let collaborators edit your Rails front-end through the web browser
JavaScript
96
star
5

soywiki

A wiki engine built on top of Vim and Git
Vim Script
87
star
6

kindlerb

Kindle periodical format ebook generation tool
Ruby
79
star
7

vitunes

Control iTunes from Vim
Objective-C
68
star
8

virb

Interactive Vim mode for IRB, Rails console, and PRY
Ruby
56
star
9

openmbta

An iPhone app and data API for Boston MBTA schedules and other information
Objective-C
53
star
10

gitfinger

finger GitHub users
Ruby
34
star
11

jsontsv

Convert JSON to TSV / CSV / DSV
Haskell
28
star
12

boston-rubyists

Monitor the Boston Ruby world
JavaScript
23
star
13

ngrender

Pure server-side rendering of AngularJS templates
Haskell
23
star
14

openmbta2

rewrite of OpenMBTA
Ruby
22
star
15

twail

tail -f your Twitter
Ruby
21
star
16

vnews

A Vim-based newsfeed reader
Ruby
19
star
17

elinks.vim

Integrate elinks and vim
Vim Script
16
star
18

ri_vim

Browse Ruby documentation inside Vim
Ruby
15
star
19

firelinks

Sync elinks with Firefox
Ruby
10
star
20

twim

Post to Twitter from Vim
Ruby
10
star
21

hulu_automuter

Automute Hulu commericals
Ruby
10
star
22

goog

Search Google from the command line
Ruby
9
star
23

poddb_client

Podcatching from the command line and Vim
Ruby
8
star
24

docrails_kindle

Read the Rails Guides on your Kindle
Ruby
8
star
25

rb_nav

Navigate your Ruby project
Ruby
7
star
26

practicing-ruby-kindle

Kindle screenshots and sample of Greg Brown's Practicing Ruby series
6
star
27

hush

Mute Hulu commercials automatically on OS X
Ruby
6
star
28

itunes-command

Search and play iTunes tracks from the command line
Ruby
6
star
29

rails31nav.vim

simple way to traverse related rails 3.1 files
Vim Script
6
star
30

ruby_bashrockets.vim

Converts and unconverts hashrocket notation
Vim Script
5
star
31

mustache-haskell

mustache implementation in Haskell
Haskell
5
star
32

boston-ruby

Track BostonRB activity from the command line
Ruby
5
star
33

table

Format TSV, CSV, DSV into pretty plain text table
Haskell
5
star
34

ask_stack

Post questions to Stack Overflow from the command line
Ruby
5
star
35

gmail_archiver

Archive your gmail to PostgreSQL
Ruby
4
star
36

traderjoes-ipad

Objective-C
4
star
37

open_events

love your city
Ruby
4
star
38

todo.rb

a simple todo app
Shell
4
star
39

vimscript

Vim Script
3
star
40

startbrick

Make `rails s` open your browser when it's ready
Ruby
3
star
41

feed_yamlizer

another feed parser and converter
Ruby
3
star
42

mbta-subway-realtime-json

Converts MBTA real-time subway data into a JSON feed
Ruby
3
star
43

korea-stuff

My notes on Korean politics and history
2
star
44

boston-weather-service

A Sinatra proxy for boston.com weather
Ruby
2
star
45

http-service

Ruby
2
star
46

haskell-exercises

Some Haskell exercises
Haskell
2
star
47

eris

a system for planet style aggregation
JavaScript
2
star
48

tsvsql

Template TSV into SQL templates
Haskell
2
star
49

teaching-example

Rails 3 teaching example
Ruby
2
star
50

feed-engine

open source feed crawler service
2
star
51

listenlog-backend

Backend Rails app for projectvrm's listenlog project
JavaScript
2
star
52

any2html

Open markdown, textile, etc. formatted files in browser
Ruby
2
star
53

docs_on_kindle

I've been renamed to kindlefodder
1
star
54

traderjoes

Trader Joe's demo
JavaScript
1
star
55

test1

test1
Ruby
1
star
56

pager_mode.vim

toggle on and off less-style paging key-bindings in Vim
Vim Script
1
star
57

HsOpenSSL

Fork of HsOpenSSL that removes preprocessor macros causing build trouble on OS X
Haskell
1
star
58

hdbc-aeson

HDBC to Aeson adapter
Haskell
1
star
59

cocoa-doc

Ruby
1
star
60

gtfs-realtime

Haskell GTFS realtime
Haskell
1
star
61

tracker

Ruby
1
star
62

snap-blaze-digestive

Example code for Snap + digestive functors + blaze-html
Haskell
1
star
63

feedbase-old

feed aggregator base
Ruby
1
star
64

export-firefox-bookmarks

Ruby
1
star
65

HaskellNet

fork of HaskellNet library (ghc 7.4.1 compatible)
Haskell
1
star
66

eris-feeds

feed service for eris
Ruby
1
star
67

collection-json.hs

Haskell support for Collection+JSON
Haskell
1
star
68

vimrc

my .vimrc
Vim Script
1
star
69

docsrails-ipad

1
star
70

openmbta-ios

OpenMBTA ios clients
Objective-C
1
star
71

transparent

Haskell
1
star
72

otp-boston

open trip planner experiments for boston
1
star
73

haskell-examples

Haskell
1
star
74

guestlistapp

Stitch together guest list for a guestlistapp.com event
Ruby
1
star
75

twitter_monit

Monit your twitter from command line
1
star
76

min_mail

minimal mail client
Ruby
1
star
77

cocoa_tools

Some tools for writing Cocoa with Vim etc.
JavaScript
1
star
78

project-webpages

Webpage generator for my software projects
JavaScript
1
star
79

kajametro-ios

ios client for kajametro
Objective-C
1
star
80

boston-stitch

Stitch Boston.com galleries together (and avoid next button click fatigue)
Ruby
1
star
81

boston-music-planet

JavaScript
1
star
82

wikipedia-postgres

Ruby
1
star