Convert Kindle notes to MarkDown
Project description
Kindle to Markdown
Kindle to Markdown converts Kindle notes and highlights exported by Bookcision as JSON into Markdown.
Installation
- Ensure pip is installed.
pip install kindle-to-md
Usage
To export your Kindle notes and highlights using Bookcision:
- Install Bookcision.
- View your notes an highlights on Amazon.
- Run the Bookcision bookmarklet.
- Select Download | as JSON from the Bookcision menu.
To convert your notes to Markdown:
- In terminal, run
kindle-to-md {downloaded_notes.json} {output_file.md}
- You can also run
kindle-to-md {downloaded_notes.json}
to output the notes to terminal.
To import to another Python script:
import kindle_to_md
Bug Reports and Feature Requests
To submit a bug report or make a feature request, create an issue on the GitHub repostitory.
Development
The development repository is located at https://github.com/mikethicke/kindletomd.
Pull Requests should be accompianed by unit tests that fail before the changes are merged and pass afterwards.
This project follows Google's Python Style Guide.
This package uses a src layout, so you will have to build and install the package locally to run the tests.
Sample development workflow (for MacOS / Linux):
- Clone the repository:
git clone https://github.com/mikethicke/kindletomd.git
- Change to your repository directory:
cd kindletomd
- Create a virtual environment:
python3 -m venv venv
- Activate the virtual environment:
source venv/bin/activate
- Install development dependencies:
pip install -r requirements.txt
- Write test or tests that fail for the bug you are addressing or feature you are developing. Tests are located in the
tests
directory. Avoid putting test data directly in the unit tests themselves. Instead, put data intest-data
directory or inconftest.py
. This makes it easier to reuse data in other tests. If your test addresses a specific issue, reference the issue in the test's docblock. - Build the package:
python -m build
- Install the package locally:
pip install dist/{pacakge}.tar.gz
- Run pytest:
cd tests
pytest
- Your tests should fail and none others should.
- Implement your changes.
- Rebuild the package.
- Reinstall the package.
- Re-run pytest and confirm your changes cause your tests to pass.
- Commit your changes and open a Pull Request on Github to merge your changes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for kindle_to_md-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d12c08386976f40c88a227e3a4531fcf75f0830f44f2814a17f545be7dd847b8 |
|
MD5 | 1aaa4f7ae967b1e3bd14801cef587655 |
|
BLAKE2b-256 | aba9802c57f4ab34fab8795404398bd3720129ccbf7d3bab6267fcb7a36181b9 |