All Projects → lodestone → kindle

lodestone / kindle

Licence: MIT License
No Kindle Highlights API? Take control with this CLI!

Programming Languages

ruby
36898 projects - #4 most used programming language
Gherkin
971 projects

Projects that are alternatives of or similar to kindle

Lector
An API for your Kindle data
Stars: ✭ 177 (+101.14%)
Mutual labels:  amazon, kindle
bookery
Manage all your ebooks and send them to your reader
Stars: ✭ 35 (-60.23%)
Mutual labels:  amazon, kindle
fyodor
Convert your Amazon Kindle highlights and notes into markdown (or any format).
Stars: ✭ 101 (+14.77%)
Mutual labels:  kindle, highlights
Ansible For Devops
Ansible for DevOps examples.
Stars: ✭ 5,265 (+5882.95%)
Mutual labels:  amazon, kindle
tudien
Từ điển tiếng Việt dành cho Kindle
Stars: ✭ 38 (-56.82%)
Mutual labels:  amazon, kindle
AozoraEpub3
青空文庫テキスト→ePub3変換
Stars: ✭ 58 (-34.09%)
Mutual labels:  kindle
oracdc
Oracle database CDC (Change Data Capture)
Stars: ✭ 51 (-42.05%)
Mutual labels:  amazon
rainstash
Resilio Sync hosted securely on Amazon Web Services
Stars: ✭ 27 (-69.32%)
Mutual labels:  amazon
KoHighlights
KOHighlights is a utility for viewing KOReader's highlights and/or export them to simple text, csv or html files.
Stars: ✭ 62 (-29.55%)
Mutual labels:  highlights
scripts.TermuxArch
scripts.TermuxArch https://termuxarch.github.io/scripts.TermuxArch/
Stars: ✭ 13 (-85.23%)
Mutual labels:  amazon
aws-lab-guide
Amazon Web Services Practice Lab Guide. Absolute beginners can try this lab practice guide.
Stars: ✭ 25 (-71.59%)
Mutual labels:  amazon
amz sp api
AmzSpApi - Unofficial Ruby gem for the Selling Partner APIs (SP-API)
Stars: ✭ 22 (-75%)
Mutual labels:  amazon
jarvis
Jarvis Home Automation
Stars: ✭ 81 (-7.95%)
Mutual labels:  amazon
AlexaAndroid
No description or website provided.
Stars: ✭ 15 (-82.95%)
Mutual labels:  amazon
selling-partner-api-sdk
A modularized SDK library for Amazon Selling Partner API (fully typed in TypeScript)
Stars: ✭ 13 (-85.23%)
Mutual labels:  amazon
sp-api-sdk
Amazon Selling Partner SPI - PHP SDKs
Stars: ✭ 34 (-61.36%)
Mutual labels:  amazon
warp
WARP one-click script. Add an IPv4, IPv6 or dual-stack CloudFlare WARP network interface and Socks5 proxy for VPS. 一键脚本
Stars: ✭ 950 (+979.55%)
Mutual labels:  amazon
benji
📁 This library is a Scala reactive DSL for object storage (e.g. S3/Amazon, S3/CEPH, Google Cloud Storage).
Stars: ✭ 18 (-79.55%)
Mutual labels:  amazon
awesome-ecommerce
Collect and develop Open Source or Free Projects for building ecommerce platform easy and fast and free
Stars: ✭ 39 (-55.68%)
Mutual labels:  amazon
ioBroker.sayit
Text to speech for ioBroker
Stars: ✭ 26 (-70.45%)
Mutual labels:  amazon

Kindle Highlights for the Command Line

Note
THIS IS NOT WORKING CURRENTLY, AS AMAZON CHANGED THEIR SITE

What is this?

The kindle highlights app gives YOU your kindle highlights without the poor interface Amazon has wrapped around YOUR DATA.

If you are like me, you make a lot of highlights while you read ebooks. I mark vocab words, great phrases, and inspirational sections.

The kindle command empowers you to actually DO something with all those highlights you’ve been making on your Kindle and Kindle apps. The app downloads and caches your highlights. You can then get them in various formats like JSON, CSV, and a nice little Markdown format to run through pandoc or Marked app.

Specifically, you can:

  • scrape and parse your kindle highlights and book data

  • keep your highlights stored locally

  • output in JSON format

  • output in CSV format

  • output in Markdown format

  • do sophisticated queries on your data using the kindle console

Future plans:

  • automatic scanning for vocabulary words

  • output in other formats

Installation

gem install kindle

There are a lot of dependencies (including the latest Rails ActiveRecord v5), as this app is intended to provide a lot of conveniences and functionality over other lighter libraries like from our friend @speric! ❤️

Usage:

Warnings and Caveats (HACKER ALERT)

hackers

Let’s talk about passwords and security. Using the kindle command line app gives you the convenience to save your Amazon credentials in a file on your computer. This is probably bad. Don’t do it. You’ve been warned.

Hax0rz will hack.

If, however, you intend to keep your password out of the settings file, you’ll need to pass in the --password=<secret> argument every time. Again: Be Forewarned: Your shell is probably configured by default to save a history of what you type in. For that reason, you should be using something like the zsh option HIST_IGNORE_SPACE to "hide" your most-secretest commands.


Step 1: Initialization

kindle init

First you need to initialize the app with some default and/or customized settings, as well as create the database to store your highlights.

To initialize and save your password and username:

# Option 1
kindle --username="[email protected]" --password="yoursecret" init

OR

To initialize with just a username:

# Option 2
kindle --username="[email protected]" init

OR

Just run the init sub-command without any parameters, knowing you will just have to pass them in later. Every time.

# Option 3
kindle init

Step 2: Fetch your data

kindle highlights update

The update sub-command uses either the passed in credentials or the saved credentials in the settings file and reaches out to Amazon’s Kindle highlights website. It slurps all the highlights (and book info) and saves it in a SQLite3 database in ~/.kindle.

kindle highlights update

The update command will take a while to run, depending on how many highlights you have. Don’t worry if it doesn’t seem to do anything. That’s okay. Trust in the UNIX-way.


Step 3: Output your data

kindle highlights

The highlights command requires a sub-command to generate the appropriate output. Currently the available output formats are: JSON, CSV, and Markdown.

Example with JSON:

# Output in json format and redirect to highlights.json file
kindle highlights json > highlights.json

Example with CSV:

# Output in csv format and redirect to highlights.csv file
kindle highlights csv > highlights.csv

Example with Markdown:

# Output in markdown format and redirect to highlights.md file
kindle highlights markdown > highlights.md

Advanced Topic: The Console

1hbw6

I’ve also included a console command for those of you familiar with Ruby on Rails, irb, etc. Issuing the kindle console command will open a console session with two ActiveRecord objects: Book and Highlight. These are real ActiveRecord v5.0 models pointing to the database of highlights.

Qesb

kindle console examples:

Kindle :) Book.count
=> 45

Kindle :) Highlight.count
=> 587

Kindle :) Highlight.first
=> #<Kindle::Models::Highlight:0x007fd43a50ae90
 id: 1,
 highlight: "riparian",
 amazon_id: nil,
 book_id: 1,
 created_at: 2016-07-01 00:18:32 UTC,
 updated_at: 2016-07-01 00:18:32 UTC>

Kindle :) Book.first
=> #<Kindle::Models::Book:0x007fd43a591800
 id: 1,
 asin: "B004J4WN0I",
 title: "Hounded (with two bonus short stories): The Iron Druid Chronicles, Book One",
 author: "by Kevin Hearne",
 highlight_count: 8,
 created_at: 2016-07-01 00:18:32 UTC,
 updated_at: 2016-07-01 00:18:32 UTC>

Endcap

In case you are too lazy to open the LICENSE file, just FYI this is all MIT licensed.

© 2012-2016 Matt Petty @lodestone

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].