Convert your Amazon Kindle highlights, notes and bookmarks into markdown files.
This application parses My Clippings.txt
from your Kindle and generates a markdown file for each book/document, in the format #{Author} - #{Title}.md
. This way, your annotations are conveniently stored and easily managed.
For samples of the output, click here.
To read more about the motivation and what problem it tries to solve, check this blog post.
- Supports all the type of entries in your clippings file: highlights, notes, clips and bookmarks.
- Automatic removal of empty or duplicate entries (the clippings file can get a lot of those).
- Orders your entries by location/page on each book (the clippings file is ordered by time).
- Easily configurable for your language, allowing you to get all features and beautiful output.
- This software goes some length to be locale agnostic: basic parsing should work without configuration for any language. It should also work even if your clippings file has multiple locales.
- Bookmarks are printed together and notes are formatted differently, for better visualization.
- Output in a format that is clean and easy to edit/fiddle around: markdown.
This program is based on the clippings file generated by Kindle 2019, but should work with other models.
We are limited by the data Kindle makes available through My Clippings.txt
. This means:
- We don't have chapter information.
- We can’t guess all entries that were deleted.
Install Ruby and run:
$ gem install fyodor
Run:
$ gem update fyodor
Fyodor has an optional configuration file, which is used for the following.
If your Kindle is not in English, you should tell Fyodor how some things are called by your My Clippings.txt
(e.g. highlights, pages, etc). Fyodor should still work without configuration, but you won't take advantage of many features, resulting in a dirtier output.
- Download the sample config to
~/.config/fyodor/fyodor.toml
or$XDG_CONFIG_HOME/fyodor/fyodor.toml
:
$ curl https://raw.githubusercontent.com/rc2dev/fyodor/master/docs/fyodor.toml.sample --create-dirs -o ~/.config/fyodor/fyodor.toml
- Open both the configuration and your
My Clippings.txt
in your preferred editor. Change the values in the[parser]
section to mirror what you get inMy Clippings.txt
.
For example, this is the configuration for Brazilian Portuguese:
[parser]
highlight = "Seu destaque"
note = "Sua nota"
bookmark = "Seu marcador"
clip = "Recortar este artigo"
loc = "posição"
page = "página"
time = "Adicionado:"
In the configuration file you can also set whether to print the time of each entry. On [output]
, set time
to true
or false
.
$ fyodor CLIPPINGS_FILE [OUTPUT_DIR]
Where:
CLIPPINGS_FILE
is the path forMy Clippings.txt
.OUTPUT_DIR
is the directory to write the markdown files. If none is supplied, this will befyodor_output
under the current directory.
Did you export your annotations to HTML using the Kindle mobile app?
You can convert it to markdown with a script I wrote specifically for it.
If you like Fyodor, you can show your support here:
Licensed under GPLv3
Copyright (C) 2019-2020 Rafael Cavalcanti