~gpanders/wk

wk/src d---------
Import std.io in main.zig
Highlight triple dots as closing front matter fence
effb62c9 — Greg Anders 2 months ago
Rename project to wk
bf6cc36a — Greg Anders 2 months ago
Change file naming scheme

For a note with the title 'Hello, world!':

Before:

    ID-hello,-world!.md

After:

    ID-Hello,_world!.md

We also now sanitize file names, disallowing characters that are
troublesome in shells (e.g. *, ?, and ").
40ec79b4 — Greg Anders 3 months ago
Remove modified logic

This was only really necessary for knowing which files to commit to git,
but since files are now only committed in the 'new' and 'sync' commands
it's no longer needed.
785887cd — Greg Anders 3 months ago
Refactor backlinks logic

Instead of parsing backlinks when getting the list of Zettels, only find
backlinks when they are actually being written. Also use a HashMap to
represent backlinks instead of a pointer to the Zettel object, which is
much safer.
8b5ba70b — Greg Anders 3 months ago
Only create git commits on 'sync' and 'new' commands
5d019098 — Greg Anders 3 months ago
Move all committing logic into commitZettels function
e9bbe232 — Greg Anders 3 months ago
Increase buffer size for strftime
2b92540a — Greg Anders 3 months ago
Print new Zettel name when stdout is not a tty
20be22bc — Greg Anders 3 months ago
Add 'inbox' subcommand
55fa3e61 — Greg Anders 3 months ago
Simplify 'show' command logic
3cb44076 — Greg Anders 3 months ago
Remove hasExtension function in favor of mem.endsWith
e506d6d4 — Greg Anders 3 months ago
Write backlinks at bottom of file

Before, backlinks would be written at the end of the file but before the
last "---", if it existed. This was because a "---" was used to begin
the references section in notes. However, it is much easier and
generally more readable to simply put references under their own "##
References" section and keep backlinks at the bottom.
5ea9f960 — Greg Anders 3 months ago
Update 'show' command aliases in completion files
c0e190f5 — Greg Anders 4 months ago
Make patterns match on zettel contents

Instead of just matching on the filename, id, or title, make command
line patterns match anywhere in the zettel. This reduces the necessity
of shell completions and also removes the need for the 'search' command
(since 'zet ls PATTERN' is now identical to 'zet search PATTERN').
fe401d31 — Greg Anders 4 months ago
Add TtyWriter to display colored output to terminal
91f55c5b — Greg Anders 4 months ago
Commit modified files after 'open' command
95094c3a — Greg Anders 4 months ago
Fix findZettel unit test
8d2bfa71 — Greg Anders 4 months ago
Reduce redundancy in command definitions

Before, adding a new command required changes in 3 or 4 different
places. Now, adding a new command is as simple as defining in the
command in the appropriate file under the cmd/ folder and making the
Command data structure public, then just adding the @import statement to
the 'commands' array.
aa076091 — Greg Anders 4 months ago
Refactor common functions

Most of the heavy lifting now happens in the zettel.zig file itself and
most of the cmd/*.zig files just act as front-ends to these functions
(e.g. backlinks, reading, opening, etc.). This allows most of the
complexity to exist in a single place and the command functions
themselves to be nicely isolated.
Next