{"id":19831736,"url":"https://github.com/robrohan/stitch","last_synced_at":"2026-02-14T01:32:13.503Z","repository":{"id":66564687,"uuid":"579522282","full_name":"robrohan/stitch","owner":"robrohan","description":"Command line application to extract highlights from Kobos and Kindle ebook readers","archived":false,"fork":false,"pushed_at":"2024-12-27T06:03:03.000Z","size":2333,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T15:23:01.068Z","etag":null,"topics":["cli","highlights","kindle","kindle-highlights","kobo","kobo-highlights"],"latest_commit_sha":null,"homepage":"","language":"C","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/robrohan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":["robrohan"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-12-18T00:46:25.000Z","updated_at":"2024-12-27T06:03:06.000Z","dependencies_parsed_at":"2024-01-23T10:09:03.918Z","dependency_job_id":"f82602e7-abde-4aaa-97e1-04fc48c75d33","html_url":"https://github.com/robrohan/stitch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/robrohan/stitch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robrohan%2Fstitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robrohan%2Fstitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robrohan%2Fstitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robrohan%2Fstitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robrohan","download_url":"https://codeload.github.com/robrohan/stitch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robrohan%2Fstitch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273703045,"owners_count":25152997,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cli","highlights","kindle","kindle-highlights","kobo","kobo-highlights"],"created_at":"2024-11-12T11:34:19.841Z","updated_at":"2026-02-14T01:32:13.493Z","avatar_url":"https://github.com/robrohan.png","language":"C","funding_links":["https://github.com/sponsors/robrohan"],"categories":[],"sub_categories":[],"readme":"# Stitch\n\nStitch is a command line application that extracts highlights from Kindle and Kobo devices. It puts the output into\na local json file which can then be further processed.\n\nQuick example:\n\n```bash\n./stitch -t kindle -o kindle.json; \\\n\tjq \".[].text\" kindle.json \\\n\t| sort \\\n\t| uniq\n```\n\n```bash\ncat kobo.json | jq '.[] | select(.title | contains(\"Le petit Nicolas\")) | .'\n```\n\nExample output:\n\n```json\n[\n  {\n    \"type\": \"Highlight\",\n    \"deviceType\": \"Kobo\",\n    \"id\": \"LTcyNDY3MDQ2NA==\",\n    \"isbn\": \"9781292410074\",\n    \"title\": \"Artificial Intelligence: A Modern Approach, Global Edition\",\n    \"author\": \"Stuart Russell, Peter Norvig\",\n    \"page\": 0,\n    \"startOffset\": 0,\n    \"endOffset\": 153,\n    \"date\": \"11 10 2025 18:38\",\n    \"text\": \"It is good practice to maintain data provenance for all your data. For each column in your data set, you should know the exact definition, where the data come from, what the possible values are, and who has worked on it.\",\n    \"annotation\": \"\",\n    \"annotationExtra\": \"\"\n  },\n  {\n    \"type\": \"Highlight\",\n    \"deviceType\": \"Kobo\",\n    \"id\": \"MTg4MzU2MzA5NQ==\",\n    \"isbn\": \"1230000004542\",\n    \"title\": \"The War of Art\",\n    \"author\": \"Steven Pressfield\",\n    \"page\": 0,\n    \"startOffset\": 0,\n    \"endOffset\": 32,\n    \"date\": \"12 29 2025 08:16\",\n    \"text\": \"The counterfeit innovator is wildly self-confident. The real one is scared to death.\",\n    \"annotation\": \"\",\n    \"annotationExtra\": \"\"\n  },\n  {}\n]\n```\n\n## Running\n\n### Environment Variables\n\nYou can set the default path to where your ereader mounts by using the following:\n\n```bash\nexport STITCH_KOBO=\"/Volumes/KOBOeReader/.kobo/KoboReader.sqlite\"\nexport STITCH_KINDLE=\"/Volumes/Kindle/documents/My Clippings.txt\"\n```\n\nAfter those are set, you can just run `stitch -t kobo; jq \".\" kobo.json`, for example, to grab all the hightlights off your Kobo.\n\n### Mac\n\nSince the binary is not signed, you must first let Mac OS know the binary is ok to run. Do the following:\n\n- Download the zip file\n- Double click it. It will extract the file.\n- Using Finder, right click on the file _stitch_, and select _Open_.\n- A terminal window will open, and then close.\n\nAfter that process, you can then use the binary via terminal.\n\nNow, you can open terminal.app, and run:\n\n```bash\n% ./stitch -h\n[KS] main (src/main.c:27) Using user: robrohan\n\nUsage: ./stitch [-i input_file] [-o output_file.json] -t [kobo|kindle]\n\nInput example:\n\tKindle: '/media/robrohan/Kindle/documents/My Clippings.txt'\n\tKobo: '/media/robrohan/KOBOeReader/.kobo/KoboReader.sqlite'\n```\n\n**Importing from Kindle**\n\nHere is an example of using Mac OS to extract highlights from Kindle:\n\n```bash\n./stitch -t kindle -i \"/Volumes/Kindle/documents/My Clippings.txt\" -o kindle.json\n```\n\n**Importing from Kobo**\n\nKobo is similar:\n\n```bash\n./stitch -t kobo -i \"/Volumes/KOBOeReader/.kobo/KoboReader.sqlite\" -o kobo.json\n```\n\n### Linux\n\nImporting data on Linux is similar to Mac. However the path is based on the current user not\na global location:\n\n**Kobo**\n\n```bash\nstitch -t kobo -i '/media/username/KOBOeReader/.kobo/KoboReader.sqlite' -o kobo.json\n```\n\n**Kindle**\n\n```bash\nstitch -t kindle -i '/media/username/Kindle/documents/My Clippings.txt' -o kindle.json\n```\n\n## Building from Source\n\nStitch is using _clang_ by default. You'll need to make sure that is installed and setup.\n\n### The Basics\n\n```bash\nmake\n```\n\n### SQLite\n\nSQLite code is already included in the source directory, however to update the code you'll need\nto do the following:\n\n- Download the source into vendor (_vendor/sqlite3_).\n- Then run from within that directory:\n```bash\n  sh configure\n  make sqlite3.c\n```\n- Then move _sqlite3.c_ and _sqlite3.h_ into the src directory.\n- From that point forward, the _vendor/sqlite3_ directory is not used.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobrohan%2Fstitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobrohan%2Fstitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobrohan%2Fstitch/lists"}