{"id":19592888,"url":"https://github.com/fauu/kindle-hl2fr","last_synced_at":"2025-10-14T12:02:04.987Z","repository":{"id":72663359,"uuid":"264262738","full_name":"fauu/kindle-hl2fr","owner":"fauu","description":"Take Kindle 'My Clippings.txt' file and get deduplicated and sorted highlights from selected documents in either JSON or Org (quote blocks)","archived":false,"fork":false,"pushed_at":"2022-05-24T14:46:15.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T14:16:02.957Z","etag":null,"topics":["clippings","highlights","kindle","my-clippings","org-mode"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fauu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.md","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":"2020-05-15T17:56:41.000Z","updated_at":"2022-05-24T14:47:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"6084d3ba-2ef2-4222-bf96-4f877a2c793a","html_url":"https://github.com/fauu/kindle-hl2fr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fauu/kindle-hl2fr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fauu%2Fkindle-hl2fr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fauu%2Fkindle-hl2fr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fauu%2Fkindle-hl2fr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fauu%2Fkindle-hl2fr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fauu","download_url":"https://codeload.github.com/fauu/kindle-hl2fr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fauu%2Fkindle-hl2fr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262628631,"owners_count":23339831,"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":["clippings","highlights","kindle","my-clippings","org-mode"],"created_at":"2024-11-11T08:37:18.263Z","updated_at":"2025-10-14T12:01:59.884Z","avatar_url":"https://github.com/fauu.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kindle-hl2fr\n\n\u003e Convert Kindle highlights to Org or JSON\n\nParses Kindle `My Clippings.txt` file and prints deduplicated and sorted highlights from selected documents either in the Org format (quote blocks) or in JSON. A convenience shell script is included that uses [fzf](https://github.com/junegunn/fzf/) to streamline the process of document selection.\n\n`kindle-hl2fr` is only meant to support the author’s particular use case. If you are looking for a more broad solution, try e.g. [Fyodor](https://github.com/rccavalcanti/fyodor/).\n\nBinaries are not provided.\n\n## Table of contents\n\n- [Usage](#usage)\n- [Installation](#installation)\n- [Setup](#setup)\n- [License](#license)\n\n## Usage\n\n(This presupposes steps specified in [Installation](#installation) and [Configuration](#configuration).)\n\nExecute the convenience script passing the path to your `My Clippings.txt` as an argument:\n\n````\n$ hl2fr.sh \"./examples/My Clippings.txt\"\n````\n\n`fzf` will display a list of document titles present in the file. Select either just one of them by navigating to its list entry and pressing `Enter` or multiple ones by marking them with `Tab` and then pressing `Enter` to confirm. The highlights from selected documents should be printed to `stdout`.\n\n### Direct usage\n\n````\n$ kindle-hl2fr\n\nUsage: kindle-hl2fr \u003cMy Clippings file\u003e {{org|json}} [Document titles]\n````\n\nRunning with only the first argument will return titles of all documents that have entries in the specified file:\n\n````\n$ kindle-hl2fr \"./examples/My Clippings.txt\"\n\nLa Possibilité d’une île (Houellebecq, Michel)\nNienasycenie (Witkiewicz, Stanisław Ignacy)\nOld Man Goriot (Balzac, Honoré de)\n````\n\nThe second and third arguments are for the actual highlight printing mode. The second argument specifies the desired output format and the third specifies the titles of the documents whose highlights should be printed:\n\n````\n$ echo -e \"La Possibilité d'une île (Houellebecq, Michel)\\nOld Man Goriot (Balzac, Honoré de)\" | xargs -0 kindle-hl2fr \"./examples/My Clippings.txt\" \"org\"\n\nDOCUMENT: La Possibilité d'une île (Houellebecq, Michel)\n#+begin_quote\nThis is also highlight.\n#+end_quote\n\nDOCUMENT: Old Man Goriot (Balzac, Honoré de)\n#+begin_quote\nThis is a highlight.\n#+end_quote\n````\n\nThe Org formatter performs some additional modifications of the highlight’s content:\n\n````\n$ kindle-hl2fr \"./examples/My Clippings.txt\" \"org\" \"Nienasycenie (Witkiewicz, Stanisław Ignacy)\"\n\nDOCUMENT: Nienasycenie (Witkiewicz, Stanisław Ignacy)\n#+begin_quote\n[…] sentence number 1, open at both ends […]\n#+end_quote\n#+begin_quote\nSentence number 2, closed at both ends.\n#+end_quote\n#+begin_quote\n[S]entence number 3, open at the start and closed at the end!\n#+end_quote\n#+begin_quote\nSentence number 4, closed at the start and open at the end […].\n#+end_quote\n#+begin_quote\n\u003cThis\nis\na\ntest\nnote\u003e\n#+end_quote\n…\n````\n\nCompare the above with the content of [`/examples/My Clippings.txt`](/examples/My%20Clippings.txt).\n\n\nJSON output example:\n\n````\n$ echo -e \"La Possibilité d'une île (Houellebecq, Michel)\\nOld Man Goriot (Balzac, Honoré de)\" | xargs -0 kindle-hl2fr \"./examples/My Clippings.txt\" \"json\"\n\n[\n  {\n    \"clippings\": [\n      {\n        \"content\": \"This is a highlight.\",\n        \"kind\": \"highlight\",\n        \"locationOrPage\": [\n          10,\n          14\n        ]\n      }\n    ],\n    \"documentTitle\": \"Old Man Goriot (Balzac, Honoré de)\"\n  },\n  {\n    \"clippings\": [\n      {\n        \"content\": \"This is also highlight.\",\n        \"kind\": \"highlight\",\n        \"locationOrPage\": [\n          24,\n          27\n        ]\n      }\n    ],\n    \"documentTitle\": \"La Possibilité d'une île (Houellebecq, Michel)\"\n  }\n]\n````\n\n## Installation\n\nRequirements:\n\n* Rust stable.\n\nRun:\n\n````\n$ cargo install --git \"https://github.com/fauu/kindle-hl2fr\"\n````\n\nor, if installing from within the cloned repository directory:\n\n````\n$ cargo install --path .\n````\n\nSee also:\n\n````\n$ cargo install --help\n````\n\n## Setup\n\nIf you wish to use the convenience script, install [fzf](https://github.com/junegunn/fzf/), make `scripts/hl2fr.sh` executable and set the variable `kindle_hl2fr_path` inside it to reflect the path of the `kindle-hl2fr` executable file built during installation. If you need JSON rather than Org output, modify the `output_format` variable as well.\n\n## License\n\nSee [COPYING.md](COPYING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffauu%2Fkindle-hl2fr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffauu%2Fkindle-hl2fr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffauu%2Fkindle-hl2fr/lists"}