Skip to content

Commit

Permalink
notes/e-books: Add new notes
Browse files Browse the repository at this point in the history
  • Loading branch information
mshkrebtan committed Nov 27, 2024
1 parent 5ab6088 commit 6d89ee4
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
Binary file added notes/e-books/assets/KoboRoot.tgz
Binary file not shown.
17 changes: 17 additions & 0 deletions notes/e-books/convert-epub-to-mobi-with-kindlegen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Convert ePub to MOBI with KindleGen

KindleGen is an official Amazon’s converter. KindleGen is pretty easy to use.

Run `kindlegen` to see all the program options.

KindleGen has an _undocumented_ key `-dont_append_source` with which you can avoid storing an ePub copy within the generated MOBI file.

Another option I personally recommend to always use is `-c0` which disables compression. The thing is that books converted without compression are opened by Kindle faster and turning over the pages is faster too.

So, the full command you should use is the following:

```bash
kindlegen -verbose -locale en -dont_append_source -c0 book.epub
```

The `-verbose` and `-locale` options are used for verbose output, so when something goes wrong it is easier to find out why.
31 changes: 31 additions & 0 deletions notes/e-books/enable-russian-hyphenation-on-kobo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Enable Russian Hyphenation on Kobo

If you add a book in Russian onto your Kobo e-reader, you may notice that, when text justification is enabled, there are large, uneven spaces between words and no hyphenation is used. The reason for this is that, by default, Kobo e-readers do not have Russian hyphenation dictionaries installed.

## Install the dictionary

You can install a Russian hyphenation dictionary by copying the [KoboRoot.tgz](assets/KoboRoot.tgz "KoboRoot.tgz") file to the `.kobo` directory on your e-reader.

If you look inside the archive, it contains a dictionary file at the filesystem path `usr/local/Kobo/hyphenDicts/hyph_ru.dic`:

``` shell title="tar -tf KoboRoot.tgz"
usr/
usr/local/
usr/local/Kobo/
usr/local/Kobo/hyphenDicts/
usr/local/Kobo/hyphenDicts/hyph_ru.dic
```

As soon as you copy the archive and eject your Kobo e-reader from the computer, the e-reader will extract the contents of the archive to its root filesystem, i.e. `/usr/local/Kobo/hyphenDicts/hyph_ru.dic`.

## Where to find hyphenation dictionaries

Kobo e-readers use hyphenation dictionaries in the Hunspell format. These can be found, for example, in the [LibreOffice dictionaries](https://git.libreoffice.org/dictionaries/+/refs/heads/master) Git repository.

To download a hyphenation dictionary and create a `KoboRoot.tgz` archive yourself, run the following commands:
``` shell
git clone --depth 1 https://git.libreoffice.org/dictionaries
mkdir -p usr/local/Kobo/hyphenDicts
cp dictionaries/ru_RU/hyph_ru_RU.dic usr/local/Kobo/hyphenDicts/hyph_ru.dic
tar --exclude='.DS_Store' -cvzf KoboRoot.tgz usr/
```

0 comments on commit 6d89ee4

Please sign in to comment.