{"id":15049242,"url":"https://github.com/rphii/c-nexus","last_synced_at":"2026-01-02T13:07:15.400Z","repository":{"id":221274145,"uuid":"753922517","full_name":"rphii/c-nexus","owner":"rphii","description":"Proof of Concept Terminal Note Browsing Application","archived":false,"fork":false,"pushed_at":"2024-04-13T12:53:13.000Z","size":2445,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-14T02:28:47.947Z","etag":null,"topics":["c","c99","knowledge-base","knowledge-management","local","nexus","note-management","notes-app","notes-application","personal-knowledge-base","personal-wiki","proof-of-concept","self-hosted","small-footprint","terminal","terminal-app","terminal-based","vim-style"],"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/rphii.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":"2024-02-07T03:23:53.000Z","updated_at":"2024-04-15T02:32:36.736Z","dependencies_parsed_at":"2024-04-15T02:32:35.315Z","dependency_job_id":"76e60495-7a0c-4509-928e-93bbd50079a0","html_url":"https://github.com/rphii/c-nexus","commit_stats":null,"previous_names":["rphii/c-nexus"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rphii%2Fc-nexus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rphii%2Fc-nexus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rphii%2Fc-nexus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rphii%2Fc-nexus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rphii","download_url":"https://codeload.github.com/rphii/c-nexus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243505960,"owners_count":20301619,"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":["c","c99","knowledge-base","knowledge-management","local","nexus","note-management","notes-app","notes-application","personal-knowledge-base","personal-wiki","proof-of-concept","self-hosted","small-footprint","terminal","terminal-app","terminal-based","vim-style"],"created_at":"2024-09-24T21:19:14.284Z","updated_at":"2026-01-02T13:07:15.358Z","avatar_url":"https://github.com/rphii.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# c-nexus\n\n| normal                     | search                       | icon                     |\n| ---                        | ---                          | ---                      |\n| ![normal](images/start.png) | ![search](images/search.png) | ![icon](images/icon.png) |\n\nSmall code footprint.\n\nCreate notes and link them, however you can think of. Once created you can browse the nodes.\n\nIt's possible to link a note to one that may or may not get created in the future.\n\n## Installation\n\n```sh\ngit clone https://github.com/rphii/c-nexus\ncd c-nexus\nmake\n```\n\nor alternatively *without* `make` (you can choose your compiler of choice; gcc, clang, tcc, ...)\n\n```sh\ngit clone https://github.com/rphii/c-nexus\ncd c-nexus\ngcc src/*.c -o a\n```\n\nIn both cases it creates an executable `a`; adjust it if desired.\n\n### Compile Flags\n\n- `-DCOLORPRINT_DISABLE` disable all colored/bold/italic (formatted) output\n- `-DPROC_COUNT=\u003cnum\u003e` number of threads\n- `-DNODE_SHOW_COUNT_IN_OUT=1` show in and outgoing number of notes, instead of the sum\n- `-DVECTOR_SORT_DATES_FIRST=1` show dates first, then icons\n\n### Clean\n\n- run `make clean`\n- on Cygwin trick it into thinking we're on linux so it can use rm etc. by running `OS= make clean`\n- on Windows I don't know if this cleaning stuff works (or anything in general... if something\n  doesn't quite work on windows, well, I'll fix it maybe, if I know about the issue and feel like\n  fixing it)\n\n## Views\n\nThese controls (and maybe even more) are also found in the nexus itself, since I keep that more\nupdated than this readme... Gotta use your program, y'know :)\n\n### Normal View\n- ``h`` : go back in history (can be: viewed notes, searches)\n- ``j`` : down\n- ``k`` : up\n- ``l`` : follow the arrow\n- ``q`` : quit\n- ``Q`` : rebuild (certainly works on linux)\n- ``[space]`` : fold/unfold descriptions\n- ``f`` : enter search view\n- ``t`` : enter icon view\n\n### Search View\n- ``[type something]`` : search for something, case insensitive\n- ``[enter]`` : switch from editing search string to selecting found nodes; in this mode ..\n    - .. `hjkl` : behaves as it would in normal view\n    - .. `f`, `[enter]` : puts you back to editing the search string\n    - .. `F` : clears the editing string and puts you back to editing it\n    - .. `[escape]` : goes back to node you've watched before searching; as if nothing was\n      selected (it goes back in the history)\n    - .. ``t`` : enter icon view\n    - .. ``q`` : quit\n    - .. ``Q`` : rebuild (certainly works on linux)\n\n### Icon View\n- `hjkl` : behaves as it would in normal view\n- ``t``, `[escape]` : abort icon view and go back\n- ``f`` : enter search view\n- ``q`` : quit\n- ``Q`` : rebuild (certainly works on linux)\n\n## Command Line Arguments\n\n- Print version and exit : `--version`\n- Change default view : `--view`\n- Change entry note : `--entry`\n- Print help (about these and more arguments) and exit : `--help`\n\n## How to add notes?\n\nEdit the [source file](src/content.c).\n\nThere's a handy macro called `NEXUS_INSERT`. See the example(s) provided.\n\n### Upsides?\n- at startup, all notes are stored in RAM (fast lookup)\n- compile checked code/notes! _isn't that cool?_\n- you can just disable the notes you don't want to be seen via. code!\n- advanced formatting is [quite easily doable](src/colorprint.h); bold, italicize, underline and even colorize your texts!\n- every note can have a icon + description (unlike in a file/folder structure, where folders typically don't)\n\n### Downsides?\n- at startup, all notes are stored in RAM (amount limited through RAM)\n- no editing of notes while browsing them _(at least not yet)_\n- terminal interface doesn't yet handle the displaying of very long notes\n\n### Tradeoffs\n\nOne could argue that this approach is bad; well, it certainly\n_isn't bad_ - I could've used (and probably will in the future) a file/folder structure with\nHTML/Markdown files and just parse them instead. Since that also costs time to do, I for the time being,\nfocus on just getting the app working. Once that's all done and good and the project is at a point\nwhere I'm satisfied with all the other, more important tasks that are screaming to get fixed, I'll\nprobably look into that a bit more.\n\nDuring development of this project I came across several tradeoffs that I'm quite willingly going to\naccept, for better or worse - but mainly for simplicity's sake in note organization.\n\n- only one note with the same title is possible - and that is case insensitive at that\n- each note can \"only\" have one command attached\n- each note can only have one icon\n\n## Notes on Searching\n- if you have many notes, you might benefit from parallelized searching. you can activate it via\n  specifing the number of threads with the preprocessor token `PROC_COUNT` (e.g. if you want to\n  search with 8 threads, in the Makefile add `-DPROC_COUNT=8` to the `CFLAGS`)\n- if multithreaded searching is enabled, I at the moment do not bother to sort the found results, so\n  that's that (equal searches of something might spit them out in randomized order)\n- even if you're not searching with multithreading, the results can seem unordered, because we're\n  searching through the items in a hash table, after all. and I do not bother to sort them as well\n- Q: why not sort the results?\n    - A: 1) I don't know what to sort for, except maybe how likely a string is present...\n    - A: 2) ...which I don't quite know how to do. I'd have to rework the searching algorithm...\n    - A: 3) ...so when it bothers me too much, I'll rework it, eventually, maybe\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frphii%2Fc-nexus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frphii%2Fc-nexus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frphii%2Fc-nexus/lists"}