<commit_before># Rindle: A Gem packaging multiple kindle tools

Rindle is a package of many useful classes to manage the kindles content.
In mature versions it should provide an object-oriented interface to access the collections and documents on the kindle with all their metadata.<commit_msg>outlined some goals in the readme document<commit_after># Rindle: A Gem packaging multiple kindle tools

Rindle is a package of useful classes to manage the kindles content.
In mature versions it should provide an object-oriented interface to access the collections and documents on the kindle with all their metadata.

## Libraries for kindle access

First load the kindle:

    Kindle.load('/path/to/root')

Then just use `Kindle::Collection` or `Kindle::File` with an
ActiveRecord like interface:

    Kindle::Collection.first(:named => 'Test Collection')
    Kindle::Collection.all(:named => /(.*)[1|2]$/)

## KindleFS

Mount the kindle the way it should have been from the start. Access and manage your kindles content via filesystem. With any file browse you'd like to use.

Simply call the kindlefs command:

    kindlefs kindle_root mount_point

## *.mobi libraries

Libs to create and edit mobi files.

    book = Rindle::Mobi.new :title => 'My book'

Rindle::Mobi::Dir

## MobiFS

### Modifing Files

You can mount a mobi file or a folder. Each document is mapped to a
directory with the same name containing the data packed and a
preview.html which gets generated when read from data.

### Auto Conversion

Copy a PDF, an RTF, a DOC or an EPUB file into the mounted folder and
it gets converted automatically. You can configure the conversion
parameters in the conversion.yml in the mounted folder.
{'fraction_non_alphanumeric': 0.06165590135055784, 'fraction_numerical': 0.0011743981209630064, 'mean_word_length': 4.3924050632911396, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7498732', 'n_tokens_mistral': 461, 'n_tokens_neox': 443, 'n_words': 239}