/kindle2notion

Export all the clippings from your Kindle device to a database in Notion.

Primary LanguagePythonMIT LicenseMIT


Kindle2Notion

A program to copy all your Kindle highlights and notes to a page in Notion.
Explore the docs · File issues and feature requests here

Table of Contents

About The Project

A Python script to export all the clippings from your Kindle device to a page in Notion. Run this script whenever you plug in your Kindle device to your PC. The underlying idea behind this idea is to marry the solitary reading experience of a Kindle with the note-taking capabilities of a cloud-based service like Notion.

A key inspiration behind this project was the notes saving feature on Google Play Books, which automatically syncs all your highlights from a book hosted on the service to a Google Doc in real time. I wanted a similar feature for my Kindle which unfortunately shows very narrow notetaking capabilities and a slow keyboard input. This project is one step towards a solution for this problem.

Intended for

  • Avid readers who would want to browse through their prior reads and highlights anytime anywhere.
  • For those who take notes alongside their highlights.

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • A Kindle device.
  • A Notion account to store your links.
  • Python 3 on your system to run the code.

Setup & Installation

  1. Clone this repository.
    git clone https://github.com/paperboi/Kindle2Notion.git
  2. Navigate to the directory and install the pre-requisite packages using
    pip install -r requirements.txt

Usage

  1. Plug in your Kindle device to your PC.
  2. Duplicate this database template to your Notion workspace.
  3. Since this code requires access of non-public pages, an authentication token from your Notion page is required. This token is stored in the token_v2 cookie. This can be found in the Storage tab of your browser's developer tools.
    • For Chrome: Open Developer Tools (Menu > Other tools > Developer Tools), navigate to Application tab and go to Storage\Cookies to find the token.
  4. Store the path to your MyClippings.txt file, the address to your database and the token_v2 value as CLIPPINGS_FILE, NOTION_TABLE_ID and NOTION_TOKEN respectively in a .env file (example provided in the repo) in the same directory you have cloned this repository to.
  5. To execute the script, navigate to the directory and run
    python kindle2notion.py

[Note: This code was tested on a Kindle Paperwhite.]

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Jeffrey Jacob - @DullBlackWall - Email

Project Link: https://github.com/paperboi/Kindle2Notion