{"id":15634789,"url":"https://github.com/robertmartin8/kindleclippings","last_synced_at":"2025-08-21T20:32:23.471Z","repository":{"id":41902465,"uuid":"103809752","full_name":"robertmartin8/KindleClippings","owner":"robertmartin8","description":"Extract kindle highlights into organised text files","archived":false,"fork":false,"pushed_at":"2023-05-01T01:20:31.000Z","size":404,"stargazers_count":161,"open_issues_count":3,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-27T13:22:08.770Z","etag":null,"topics":["books","ebooks","ereader","highlight","kindle","kindle-highlights","reading"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertmartin8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-17T07:03:23.000Z","updated_at":"2024-11-23T11:55:41.000Z","dependencies_parsed_at":"2024-10-22T14:06:23.673Z","dependency_job_id":null,"html_url":"https://github.com/robertmartin8/KindleClippings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertmartin8%2FKindleClippings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertmartin8%2FKindleClippings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertmartin8%2FKindleClippings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertmartin8%2FKindleClippings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertmartin8","download_url":"https://codeload.github.com/robertmartin8/KindleClippings/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230532448,"owners_count":18240792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["books","ebooks","ereader","highlight","kindle","kindle-highlights","reading"],"created_at":"2024-10-03T10:57:21.781Z","updated_at":"2025-08-21T20:32:23.459Z","avatar_url":"https://github.com/robertmartin8.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg width=60% src=\"https://github.com/robertmartin8/KindleClippings/blob/master/media/logo.png\"\u003e\n\u003c/p\u003e\n\n\u003c!-- buttons --\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.python.org/\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/python-v2,3-blue.svg\"\n            alt=\"python\"\u003e\u003c/a\u003e \u0026nbsp;\n    \u003c!-- \u003ca href=\"https://pypi.org/project/PyPortfolioOpt/\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/pypi-v0.1.0rc1-brightgreen.svg?style=flat-square\"\n            alt=\"python\"\u003e\u003c/a\u003e \u0026nbsp; --\u003e\n    \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\"\n            alt=\"MIT license\"\u003e\u003c/a\u003e \u0026nbsp;\n    \u003ca href=\"https://github.com/robertmartin8/PyPortfolioOpt/graphs/commit-activity\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Maintained%3F-yes-blue.svg\"\n            alt=\"maintained\"\u003e\u003c/a\u003e \u0026nbsp;\n\u003c/p\u003e\n\nOne of the many great things about kindles is that you can highlight parts of your book to go back to later. However, it is perhaps surprising that there is no good way of aggregating the highlights (even per book).\n\nKindleClippings is a utility born out of personal need, which fetches any highlights that you have made on your kindle, and organises them into plain text files per book. It is run from the command line using:\n\nYou can use the `-format` option to generate additional files in that format.\nOnly `pdf` and `docx` are supported. Any other value will fall back to plain\ntext output.\n\n```bash\npython KindleClippings.py\n```\n\nThe result is a new folder with individual text files per book:\n\n\u003cp align=\"center\"\u003e\n    \u003cimg width=60% src=\"https://github.com/robertmartin8/KindleClippings/blob/master/media/screenshot.png\"\u003e\n\u003c/p\u003e\n\nIn my workflow, I then copy these into Evernote, but the whole point is that you are now free to do whatever you want.\n\n## Background\n\nWhen you make highlights or add bookmarks on your kindle, they are stored to a text file on the kindle called `My Clippings.txt`. This has a regular format, which means that it can be parsed:\n\n```txt\n==========\nThe Selfish Gene: 30th Anniversary Edition (Richard Dawkins)\n- Your Highlight on page 92 | location 1406-1407 | Added on Saturday, 26 March 2016 14:59:39\n\nPerhaps consciousness arises when the brain's simulation of the world becomes so complete that it must include a model of itself.(4)\n\n==========\nFahrenheit 451 (Ray Bradbury)\n- Your Bookmark at location 346 | Added on Saturday, 26 March 2016 15:46:21\n\n\n==========\nFahrenheit 451 (Ray Bradbury)\n- Your Highlight at location 784-785 | Added on Saturday, 26 March 2016 18:37:26\n\nWho knows who might be the target of the well-read man?\n==========\n```\n\n## Prerequisites\n\nThe only requirement for this project is to have python (either python 2 or python 3) installed on your system. For users on macOS, you don't have to worry about this because it is already installed. On Windows, python can be installed following the instructions [here](http://docs.python-guide.org/en/latest/starting/install3/win/).\n\nFor pdf and docx conversion, it requires library. It can be installed using below pip command\n```bash\npip install -r requirements.txt\n```\n\n\n## Basic usage\n\nIt is recommended that you download the `KindleClippings.py` and place it either in your home directory or the desktop. Connect your kindle, and make sure it exists in your filesystem. Then, open up your terminal/shell.\n\nIf you're on a mac, you *might* just be able to run\n\n```bash\npython KindleClippings.py\n```\n\nHowever, most users will need to specify the path to the kindle and optionally the path to the destination. By default, the script will create a folder called `KindleClippings` in the current directory, and place the resulting text files there (though this likely only works on mac). For example\n\n```bash\npython KindleClippings.py -source /Volumes/Kindle/\n```\n\nOn windows, this might look something like:\n\n```bash\npython KindleClippings.py -source C:\\Kindle -destination \\\n```\n\nIf the parsing is successful, the script will print all of the exported titles\n\n```txt\nExported titles:\n\nTo Kill a Mockingbird - Harper Lee.txt\nA Clockwork Orange - 50th Anniversary Edition - Anthony Burgess.txt\nThe Road - Cormac McCarthy.txt\nFahrenheit 451 - Ray Bradbury.txt\nHeart of Darkness - Joseph Conrad.txt\nThe Meaning of It All - Richard P Feynman.txt\nThe Selfish Gene - 30th Anniversary Edition - Richard Dawkins.txt\n```\n\nUse the `-format` flag after exporting text files to also create a PDF or DOCX\nversion:\n\n```bash\npython KindleClippings.py -source C:\\Kindle -format pdf\n```\nIf any other value is passed to `-format`, the script simply exports text files.\n\n\n## About\n\nI originally forked [`firewood`](https://github.com/sebpearce/firewood), but I realised that my fork was fundamentally different to firewood – to the extent that it has become a different solution.\n\nIf you play around with `firewood` enough, you'll find that sometimes it can just completely break.\nThis is because firewood relies on the regular order of the `My  Clippings.txt` file from the kindle. For the most part, this is a fair assumption. However, I have found that very occasionally, kindle will insert an extra blank line that will prevent the whole program from functioning.\n\nMy solution does require regularity, but it is a lot more robust to irregularity. We first split the text file into individual highlights, then proceed from there.\n\nSometimes when you make a highlight on kindle, then delete it, it still gets stored into clippings. So if you make a wrong highlight and redo it, you'll end up with multiple very similar highlights. I haven't yet decided whether this is worth fixing, but in my workflow it's not very important.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertmartin8%2Fkindleclippings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertmartin8%2Fkindleclippings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertmartin8%2Fkindleclippings/lists"}