{"id":14065701,"url":"https://github.com/whateverforever/zettelcon","last_synced_at":"2025-07-29T21:32:56.146Z","repository":{"id":93345607,"uuid":"333120775","full_name":"whateverforever/zettelcon","owner":"whateverforever","description":"Automatic markdown backlinks. Designed with Zettlr in mind.","archived":false,"fork":false,"pushed_at":"2022-01-29T09:40:08.000Z","size":1105,"stargazers_count":30,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-13T07:09:30.647Z","etag":null,"topics":["backlink","backlinking","backlinks","note-taking","zettelkasten","zettelkasten-methodology","zettlr"],"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/whateverforever.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}},"created_at":"2021-01-26T15:04:32.000Z","updated_at":"2024-07-24T23:42:54.000Z","dependencies_parsed_at":"2023-03-07T18:00:37.687Z","dependency_job_id":null,"html_url":"https://github.com/whateverforever/zettelcon","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/whateverforever%2Fzettelcon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whateverforever%2Fzettelcon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whateverforever%2Fzettelcon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whateverforever%2Fzettelcon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whateverforever","download_url":"https://codeload.github.com/whateverforever/zettelcon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228052584,"owners_count":17862103,"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":["backlink","backlinking","backlinks","note-taking","zettelkasten","zettelkasten-methodology","zettlr"],"created_at":"2024-08-13T07:04:38.620Z","updated_at":"2024-12-04T05:30:47.505Z","avatar_url":"https://github.com/whateverforever.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# zettelcon\n\n\u003e An external CLI tool for Zettlr note collections to **automatically add backlinks** to your note files.\n\u003e Edits files in-place, so be careful and try on a copy of your files first. Run whenever you feel like an update would be worth it.\n\u003e \n\u003e Also check out [zettelwarmer](https://github.com/whateverforever/zettelwarmer) for finding new interconnections between your notes.\n\n![](screenshot.png)\n\n## Assumptions\n\n- Zettlr-standard wiki-links are used (`[[...]]`)\n- Single-line markdown syntax for headings is used (`# some heading`)\n- Note IDs are unique, also relative to the names of the notes\n- The backlink section is the last thing of a page\n- Two spaces are used for list indentation\n\n## Features\n\n- Single python file, no dependencies, under 250 sloc\n- Can run multi-core for large collections\n- Supports any note ID syntax without explicit regex\n- Supports collections that contain more than one note ID style\n\n```\n$ python3 zettelcon.py --help\nusage: zettelcon.py [-h] -f FOLDER [-s SUFFIX] [-c] [-n NPROCS] [-ic]\n\nTool to insert automatic backlinks into Zettlr note collections or other\ninterlinked (markdown) files.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -f FOLDER, --folder FOLDER\n                        Path to folder with all the zettels in it.\n  -s SUFFIX, --suffix SUFFIX\n                        Suffix for the files to consider. Defaults to .md\n  -c, --clear-backlinks\n                        Instead of generating backlinks, revert all files to a\n                        no-backlinks state\n  -n NPROCS, --nprocs NPROCS\n                        Number of worker processes to run for file reading and\n                        writing.\n  -ic, --ignore-cache   Don't use zettelcon's cache, force writing to _all_\n                        Zettel files (even the ones where backlinks haven't\n                        changed).\n```\n\n---\n\n---\n\n## Future Work\n\n- [ ] Only cite a few words before and after the citation\n- [ ] Add horizontal break before backlinks\n- [ ] Output additional info such as islands, sinks, sources, etc.\n- [ ] Check out what happens if a file that links to another doesn't have a title\n- [x] Somehow reduce the number of files that are written\n  - Zettlr takes quite a while to update its indices after the files get changed\n    so it would be benefitial to reduce write operations only to files that actually\n    get new backlinks\n- [x] Add option to clear all backlinks\n- [x] Make file writing multi core\n- [x] Add \"last edited XXX\" info field to markdown\n- [x] Do an analysis of computation complexity as a function of number of files (or links)\n  - As expected, it's linear in the number of files\n  - Doubling the cores increases performance by ~1.5x\n  - Ca. 1500 notes per second dual core, 2300 n/s quad core\n## Discarded Ideas\n\n- [ ] ~~Add option to commit everything to git before updating links~~\n  - Not needed, because you can simply define a shell function to do that\n  - ```bash\n    gen-backlinks() {\n      cd $ZETTELPATH \u0026\u0026 git add -A \u0026\u0026 git commit -m \"pre-zettelcon backup\" ;\\\n      python ~/...path.../zettelcon.py -f $ZETTELPATH\n    }\n    ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhateverforever%2Fzettelcon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhateverforever%2Fzettelcon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhateverforever%2Fzettelcon/lists"}