{"id":23092029,"url":"https://github.com/thiswillbeyourgithub/indexableanki","last_synced_at":"2025-07-14T21:35:04.925Z","repository":{"id":167845240,"uuid":"345786000","full_name":"thiswillbeyourgithub/IndexableAnki","owner":"thiswillbeyourgithub","description":"Turn each card of an anki collection into easily searchable txt files","archived":false,"fork":false,"pushed_at":"2024-12-05T10:06:48.000Z","size":60,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-05T11:21:14.059Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/thiswillbeyourgithub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2021-03-08T20:29:27.000Z","updated_at":"2024-12-05T10:20:14.000Z","dependencies_parsed_at":"2023-06-07T02:00:18.491Z","dependency_job_id":null,"html_url":"https://github.com/thiswillbeyourgithub/IndexableAnki","commit_stats":null,"previous_names":["thiswillbeyourgithub/indexableanki"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2FIndexableAnki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2FIndexableAnki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2FIndexableAnki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2FIndexableAnki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thiswillbeyourgithub","download_url":"https://codeload.github.com/thiswillbeyourgithub/IndexableAnki/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230027911,"owners_count":18161837,"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":[],"created_at":"2024-12-16T21:26:50.627Z","updated_at":"2024-12-16T21:26:52.670Z","avatar_url":"https://github.com/thiswillbeyourgithub.png","language":"Python","readme":"# IndexableAnki\nTurn each card of an anki collection into txt files that can be searched using a desktop search engine like [Recoll](https://www.lesbonscomptes.com/recoll/) or Docfetcher etc. \n\n**Note: For a more powerful version, you can use [my sophisticated RAG lib, wdoc,](https://wdoc.readthedocs.io/en/stable) to parse anki notes as text: `wdoc_parse_file --filetype \"anki\" --anki_profile \"Main\" --anki_deck \"mydeck::subdeck1\" --anki_notetype \"my_notetype\" --anki_template \"\u003cheader\u003e\\n{header}\\n\u003c/header\u003e\\n\u003cbody\u003e\\n{body}\\n\u003c/body\u003e\\n\u003cpersonal_notes\u003e\\n{more}\\n\u003c/personal_notes\u003e\\n\u003ctags\u003e{tags}\u003c/tags\u003e\\n{image_ocr_alt}\" --anki_tag_filter \"a::tag::regex::.*something.*\" --only_text`**\n\n## Please read:\n* **Why did I make this?** I wanted to make my anki databases searchable though [Recoll](https://www.lesbonscomptes.com/recoll/) or Docfetcher (those are desktop search engines).\n* **What do you think of issues and contributions?** They are more than welcome, even just for typos, don't hesitate to open an issue.\n* **Will this change my collection?** No, it makes a copy before hand and doesn't change a thing.\n* **What version of python should I use?** It has been tested on Python 3.9\n* **I'd like to index my rss reader into recoll, is it possible?** I created just that [over there](https://github.com/thiswillbeyourgithub/IndexableNewsboat)\n* **How does it work?** It finds your database, copies it inside /tmp (otherwise it might be locked), loads it into pandas, drops useless columns,finds the deck name and add it to each line, saves each card as a .txt file, zips all the txt files together, moves the zip in the desired folder, deletes the txt files and the temporary db.\n* **Is it cross platform?** Currently no, only Linux, and OSX could maybe work quite easily. It's on the todo list but don't be afraid to ask if you think you need this.\n\n## TODO:\n* use ankipandas\n* make it OS agnostic, so far it can only work on linux and possibly OSX\n\n## Usage:\n```\npython3 ./IndexableAnki.py -a ~/.local/share/Anki2 -p Myprofile -o ~/Documents/\n```\n\n```\nusage: IndexableAnki.py [-h] [-a ANKI_PATH] [-p ANKI_PROFILE] [-o OUT_PATH] [-f {zip,directory}]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -a ANKI_PATH, --anki ANKI_PATH\n                        The path to the anki folder (ex: /home/USER/.local/share/Anki2/)\n  -p ANKI_PROFILE, --profile ANKI_PROFILE\n                        Name of the anki profile you want to make indexable (ex: Main)\n  -o OUT_PATH, --output_dir OUT_PATH\n                        Path to the directory where the indexable archive will be found\n  -f {zip,directory}, --format {zip,directory}\n                        Format of the output archive. Default: zip\n```\n\n## How do cards look like afterwards?\nHere's an example card :\n\n```\nANKI EXPORT AS TXT\ncard id: 15359932XXXXX\ntags: physics::something\ndeck: Some::TAG::Thingie\nsfld: [content of the sort field]\nflds: [content of all fields (with a little text processing though]\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiswillbeyourgithub%2Findexableanki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthiswillbeyourgithub%2Findexableanki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiswillbeyourgithub%2Findexableanki/lists"}