Skip to content

ghnmqdtg/Kobo2Notion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kobo2Notion

Introduction

Kobo2Notion is a Python-based tool that extracts bookmark data from Kobo e-readers and seamlessly uploads it into your Notion database. Additionally, it can summarize bookmarks using Google Gemini. This project offers a cost-free alternative to existing solutions like Readwise, providing users with greater control over their reading data.

Features

  • Extract bookmarks from Kobo e-readers
  • Upload bookmarks to a Notion database
  • Summarize bookmarks using Google Gemini AI
  • Free and open-source

Prerequisites

  • Python 3.11.9 or later (not tested on other versions)
  • Kobo e-reader
  • Notion account
  • Google Cloud account (for Gemini API access)

Installation

  1. Clone the repository:

    git clone https://github.com/ghnmqdtg/Kobo2Notion.git
    cd Kobo2Notion
  2. Install dependencies:

    pip install -r requirements.txt

Configuration

  1. Connect your Kobo e-reader to your computer.

  2. Set the SQLITE_SOURCE to the path of the KoboReader.sqlite file.

  3. Get the Notion API key

    1. Go to Notion Integrations

    2. Create a new integration named kobo-export and set associated workspace to your workspace.

    3. Click Save.

    4. Click Show and copy the SECRET value.

    5. Paste the SECRET value into the NOTION_API_KEY environment variable in .env file.

  4. Get the Notion Database ID

    1. Duplicate the database template here to your workspace.

    2. Click Share and copy the link.

    3. Extract the Notion Database ID from the URL.

      For example, if the URL is https://www.notion.so/ghnmqdtg/4978bcc5eda847a59940f5cb4aff32d9?v=28a249bcfa92488889f3505127a8e1ef&pvs=4, the Notion Database ID is 4978bcc5eda847a59940f5cb4aff32d9.

    4. Paste the Notion Database ID value into the NOTION_DATABASE_ID environment variable in .env file.

    5. Connect the database to the kobo-export integration.

  5. Get the Google Gemini API key here (optional)

    This is an optional feature if you want to summarize your bookmarks. The api for gemini-1.5-flash is free on Google AI Studio. If you don't need it, set SUMMARIZE_BOOKMARKS to false in .env file.

    Copy the API Key value into the GEMINI_API_KEY environment variable in .env file.

  6. Adjust any other settings in the config.py file. For example, you can change the prompt language to en for English.

Usage

  1. Run the export script and wait for the script to finish.
python kobo2notion.py
  1. Check the Notion database to see the bookmarks.

    1. The overview of the library. You can see all the books you purchased.

    2. The detail of the book. The original highlight is saved in Highlight page, and the summary is saved in the main page.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

Acknowledgements

Contact

For questions or support, please open an issue on the GitHub repository.

About

Easily sync your Kobo highlights to Notion.

Topics

Resources

License

Stars

Watchers

Forks

Languages