Code Monkey home page Code Monkey logo

readwise-to-apple-notes's Introduction

readwise-to-apple-notes

PyPI Changelog Tests License

Export Readwise highlights to Apple Notes.

apple-notes-readwise-folder

Installation

Install this tool using pip:

pip install readwise-to-apple-notes

Usage

Important

First, obtain a Readwise access token. Then, the token has to be stored, either into an .env file or an environment variable using export READWISE_TOKEN=<your_token>.

For help, run:

readwise-to-apple-notes --help

You can also use:

python -m readwise-to-apple-notes --help

Export

Note

When you first run the export command. The script will create a new folder in your Apple Notes labled "Readwise" if it does not exist. All highlights within a given book, article, document will be placed in the same note. See example below.

readwise-apple-note-example

Export all highlights:

readwise-to-apple-notes export

You should see progress bars for each document and the number of highlights to be written to a new Apple Note.

readwise-to-apple-notes export

Exporting highlights  [####################################]  28/28 100% 
Exporting highlights  [####################################]  10/10  100%         
Exporting highlights  [####################################]  21/21  100%  

Export after a specific date:

readwise-to-apple-notes export --updated-after 2024-03-15

Export a single books highlights:

readwise-to-apple-notes export --book-id=<user_book_id>

Or a list of books:

readwise-to-apple-notes export --book-id=<user_book_id>,<another_book_id>

Additional Commands

When you need to look up abook_id, run:

readwise-to-apple-notes books

{
    "id": 29932193,
    "title": "Thinking, Fast and Slow",
    "author": "Daniel Kahneman",
    "category": "books",
    "num_highlights": 2,
    "source": "kindle",
    "document_note": "",
    "document_tag": ""
}
...
{
    "id": 29931089,
    "title": "How to Use Readwise",
    "author": "Readwise Team",
    "category": "books",
    "num_highlights": 62,
    "source": "native",
    "document_note": "",
    "document_tag": "readwise"
}

If you know the book_id and want to check a book's details, run:

readwise-to-apple-notes book 29932193

{
    "id": 29932193,
    "title": "Thinking, Fast and Slow",
    "author": "Daniel Kahneman",
    "category": "books",
    "source": "kindle",
    "num_highlights": 2,
    "last_highlight_at": "2016-08-03T04:56:00.000000Z",
    "updated": "2023-07-10T00:56:27.463529Z",
    "cover_image_url": "https://images-na.ssl-images-amazon.com/images/I/41shZGS-G%2BL._SL200_.jpg",
    "highlights_url": "https://readwise.io/bookreview/29932193",
    "source_url": null,
    "asin": "B00555X8OA",
    "tags": [],
    "document_note": ""
}

API Reference

Usage: readwise-to-apple-notes [OPTIONS] COMMAND [ARGS]...

Export Readwise Highlights to Apple Notes.

Options:
--version  Show the version and exit.
--help     Show this message and exit.

Commands:
book
books
export

Development

To contribute to this tool, first checkout the code. Then create a new virtual environment using poetry:

cd readwise-to-apple-notes
poetry install

Now install the dependencies and test dependencies:

poetry install --with=dev

To run the tests:

pytest

readwise-to-apple-notes's People

Contributors

scarvy avatar

Stargazers

 avatar Fred Bliss avatar  avatar  avatar Donato Aguirre avatar Josh Nagel avatar Jonathon Conley avatar Bruno Melo avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.