{"id":13451269,"url":"https://github.com/aleator/Zettel-hs","last_synced_at":"2025-03-23T18:32:08.879Z","repository":{"id":140630070,"uuid":"232326781","full_name":"aleator/Zettel-hs","owner":"aleator","description":"Simple plain text ZettelKasten system for terminal users","archived":false,"fork":false,"pushed_at":"2021-02-10T07:48:01.000Z","size":130,"stargazers_count":33,"open_issues_count":2,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-28T18:14:56.484Z","etag":null,"topics":["haskell","note-taking","text-zettelkasten","vim"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aleator.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}},"created_at":"2020-01-07T13:08:06.000Z","updated_at":"2024-04-09T04:09:31.000Z","dependencies_parsed_at":"2024-01-16T03:48:26.341Z","dependency_job_id":"b4496254-19c7-458f-b4e1-740dd210264a","html_url":"https://github.com/aleator/Zettel-hs","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/aleator%2FZettel-hs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleator%2FZettel-hs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleator%2FZettel-hs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleator%2FZettel-hs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aleator","download_url":"https://codeload.github.com/aleator/Zettel-hs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245149496,"owners_count":20568913,"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":["haskell","note-taking","text-zettelkasten","vim"],"created_at":"2024-07-31T07:00:50.966Z","updated_at":"2025-03-23T18:32:03.867Z","avatar_url":"https://github.com/aleator.png","language":"Haskell","funding_links":[],"categories":["Haskell"],"sub_categories":[],"readme":"# Zettel -- A simplified command line ZettelKasten manager\n\nDo you like working from terminal? Perhaps you're a vim user?\nIf that is the case, here is a simple program for maintaining \nyour zettelkasten for you.\n\n## What does it do?\n\nIt creates and manages links for a collection of plain text\nzettelkasten files. The main use for the program is to manage\nlinks between the individual notes, which is the most toilsome\npart of maintaining a plain text zettelkasten.\n\n```\nZKHS -- simple text based zettelkasten system\n\nUsage: Zettel COMMAND\n  Manipulate zettelkasten\n\nAvailable options:\n  -h,--help                Show this help text\n\nAvailable commands:\n  create                   Create unlinked zettel\n  link                     Link zettels\n  find                     Find zettels\n  resolve                  Resolve references in zettels\n  export                   Export zettels as JSON\n  elucidate                Suggest improvements in ZettelKasten\n  neighbourhood            Zettels linkwise near to this one\n  body                     Extract zettel body, ie. text without headers and\n                           links\n  references               Extract references from a Zettel\n  addreferences            Add references to a Zettel\n  auto-fill                Fill missing wikilinks and references from origin\n  touch                    Record opening a zettel (for logging purposes)\n```\n\nFor further details, pass `--help` as argument for each command (e.g., `Zettel link --help`)\n\n## What do the Zettels look like?\n\nHere is an example from my collection:\n\n```\nThe binomial distribution\n--------------------------------------------------------------------------------\n\n           ┌────────────────────────────────────────┐\n           │              ⎛n⎞                       │\n           │ B(k; n, p) = ⎜ ⎟ * p^k * (1 - p)^(n-k) │\n           │              ⎝k⎠                       │\n           └────────────────────────────────────────┘\n\n\"What is the probability to get k successes in n trials, each with probability\np of success?\"\n\ncf. `pbinom` in r.\n\n----- External references ------------------------------------------------------\n[1]: Binomial distribution - Wikipedia [WWW Document], n.d. URL https://en.wikipedia.org/wiki/Binomial_distribution (accessed 2.20.20).\n\n--------------------------------------------------------------------------------\nTags: statistics\nLinks: \n67257A06-4634-40EA-A788-011771081C40-book-bayesian-statistics-the-fun-way Origin\n--------------------------------------------------------------------------------\n```\n\n# Demos\n\nThese are bit random at the moment as they were meant to demonstrate uncommon features.\nI'll do more common examples later on.\n\n[How to create your first zettel and do basic navigation](https://drive.google.com/open?id=164Tu6JYOzl2iRMG7p-NTXQKtENcAYnqE)\n\n[Quickly select an outbound link](https://drive.google.com/open?id=1sh5MfGlaAuV6j8PfDfaho6XpWlF2hw8V)\n\n\n\n# Status\n\nThis is a program build by me and for me. It misbehaves every now and then,\nbut since I and it are on familiar terms, it doesn't really matter.\n\nBut, if you decide to use it, this might matter a lot. Unless you like\ndebugging and fixing issues, it might be better for you to write your\nown personal system instead.\n\n# Supported features\n\n* Structured zettels\n* External (bibliographic) references\n* Links with descriptive text\n* [wikilike links], which can be embedded in the text\n* Navigation and searching\n* Some link structure based tools, like neighbourhood search, which\n  I find really useful\n* Neat 'elucidate' command, which causes the program to prompt you to\n  improve something. Currently it asks you to link unlinked zettels, but\n  in the future it will likely ask you to split up long zettels or \n  return to zettels that you have marked as WIP or TODO.\n\n## Bad features\n\n* You can't use symbols or linebreaks in [wikilike links]. Sorry.\n* If you abort fzf, the vim integration can do whatever it likes.\n  It often likes to close a random buffer.\n* Zettels with broken structure cause commands to fail silently in\n  vim. But they are easy to find using `Zettel find -q 'anything'`,\n  so I've not bothered to do anything about this.\n\n# Vim integration\n\nThere is a somewhat badly behaving [nvim integration](zettel.vim). \n`source \u003cpath where you put it\u003e/zettel.vim` to your init.vim or vimrc to\nenable it. Here is a quick user quide:\n\n## Commands\n\n* `:Zcre \u003carg\u003e`  : Create a new zettel with this name (Use only for topics)\n* `:Zext \u003carg\u003e`  : Extend current zettel with addition of linked zettel (use often)\n* `:ZFill` : Automatically *fill* in links and refs from origin zettel\n* `:Zf`    : Do *full text search* on arqument. \n\n## Mappings (prefix with localleader)\n\nAll the mappings need to be prefixed with the 'localleader'. If you don't\nknow what that is, put `let maplocalleader='g'` in your vim config. Then,\nprefix each of the below commands with 'g' (or the letter you chose).\nFor example, to add links, you would type `gzl`.\n    \n### Manipulation\n\n* `zl`    : Add *Links* to zettel. This will put a [wikilink] at cursor position.\n* `zw`    : Add *WikiLinks* to zettel (put cursor inside a [wikilink] before using)\n* `zs`    : *Split visual selection* to a new zettel (see ZFill above)\n\n### Creation \u0026 Navigation\n\n* `zr`    : *Navigate to wikilink*. Creates the link if it doesn't\n            exist (put cursor inside a [wikilink] before using)\n\n### Finding (\u0026 creation)\n\n* `zf`    : *Find* a zettel (type a new title, or press \u003cctrl-n\u003e to \n        create a new zettel)\n* `zf`    : *Fuzzy find* zettel by title\n* `zFF`   : *Full Text Find*, word under cursor (needs tantivy)\n* `zF`    : *Full Text Find*, prompt for word or use current visual selection (needs tantivy)\n            \n### Network local discovery \n\n* `zn`    : Show *neighbourhood* of the zettel\n* `zt`    : Show *origin chain* of the zettel\n* `zo`    : Show *outbound links* of the zettel\n* `zb`    : Show *backlinks* of the zettel\n\n### Temporal discovery\n\n* `zR`    : Show recently edited zettels\n* `zT`    : Show zettels that are often opened when this zettel is opened  \n\n\n### References et.al.\n\n* `zp`    : Paste stuff from clipboard as a quote (Currently works only on OS X\n            and if you have pandoc installed. Non essential).\n\nYou can also create new zettels by invoking find and then typing a title which\nproduces no find results (or if you can't do that, type title and press \u003cctrl\u003e-n).\nThis is the fastest way to create zettels.\n\n## Shell integration\n\nThere isn't a shell integration. Here are some common commands\nyou might use:\n\n* To edit zettels you could do `Zettel find --search \u003cterm\u003e|xargs -o nvim -O`\n\n* To create an unlined note, run `Zettel create --title \u003ctitle\u003e|xargs -o nvim`\n\n## Installation\n\nYou need to install the excellent [`fzf`](https://github.com/junegunn/fzf) and\n[`rg`](https://github.com/BurntSushi/ripgrep) programs first.  Also, the search\ncommand can use [`tantivy-cli`](https://github.com/tantivy-search/tantivy-cli)\nfor full text searches.\n\nAdditionally install [`neovim-remote`](https://github.com/mhinz/neovim-remote) and\ncopy `PopNVR.fish` to your path. If you happen to use some other shell, then additionally,\nport `PopNVR.fish` to your shell. (I really need to incorporate that into the program as whole...)\n\nThen install\n[stack](https://docs.haskellstack.org/en/stable/install_and_upgrade/). Then\nclone this repository and issue `stack install` inside the repository. Then go\nhave a coffee and a sandwich while the program builds.\n\nAfter the program has been built, create the directory `~/zettel/` and\ncreate your first zettel by `Zettel create --title \u003ctitle\u003e|xargs -o nvim`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleator%2FZettel-hs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faleator%2FZettel-hs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleator%2FZettel-hs/lists"}