A command-line journaling application
1# Hayom
2
3Hayom is a rewrite (and gradual reimagining) of [jrnl][jrnl]. At a base level,
4it's not written in Python, and therefore doesn't do your choice of breaking
5constantly when the system Python gets changed, or having to maintain your own
6pyenv/virtualenv/what-have-you. Beyond that, it has more consistent command-line
7options, while still retaining a human-first command-line interface.
8
9The file format of Hayom is identical to jrnl, so it's easy to point both tools
10to the same file if you wish (at least for now) and use them interchangeably.
11Over time, this likely will change in a subtle and fairly backwards-compatible
12way, for the basic reason that I want a blank line between the entry title and
13the entry body. But for now, you're golden.
14
15[](https://builds.sr.ht/~bmp/hayom/commits/main/test.yml?)
16
17## Installation
18
19 deno install -n hayom --allow-env --allow-read --allow-write --allow-run \
20 https://git.sr.ht/~bmp/hayom/blob/main/cli.ts
21
22## Usage
23
24Writing entries with Hayom is designed to be as easy as possible so there is no
25friction. For short entries, it's trivial to just write what you want directly
26on the command line:
27
28 hayom Today, I ate some pancakes. They were delicious.
29
30Everything up to the end of the first sentence (demarcated by `.`, `?`, or `!`)
31will be considered the entry title. It's fine to have just a title.
32
33For longer entries, just type `hayom`, and it'll pop up an editor. Hayom will
34honor the `editor` setting in its config file first, `$EDITOR` second, and
35attempt to use `nano` last.
36
37If there's sufficient interest, I will switch the default to [`ed`][ed].
38
39To read entries, you must specify at least one filtering command. These commands
40are:
41
42- `--from`/`-f`: the earliest timestamp to include
43- `--to`/`-t`: the last timestamp to include
44- `--summary`/`-s`: show just entry titles, not bodies
45- `--count`/`-n`: how many entries to show
46- `--on`: show entries made on a specific day
47
48You can additionally specify tags (formatted as `@tagname`) to filter entries.
49
50All of the time-based commands take natural English, not just dates. For
51example, the following command line gives you all the entries between last month
52and this month that were about `@bob`'s `@tpsreport`:
53
54 hayom -f '2 months ago' -t 'this month' @bob @tpsreport
55
56Or, if you're curious what you did last Tuesday, it's as easy as writing:
57
58 hayom --on 'last Tuesday'
59
60## Editing
61
62For any of the filtering commands, if you add `-e`/`--edit`, those entries will
63pop up in your editor. There, you can add extra entries, change timestamps,
64delete entries, and whatever else floats your boat. For example, to edit
65everything I wrote yesterday, I might do
66
67 hayom -f yesterday -e
68
69If you cancel your editor without saving, the journal will be left as-is.
70
71## Multiple Journals
72
73You can have multiple journals. If you do, simply specify the journal you want
74with the `--journal` or `-j` command. E.g., if you had `personal` and `work`
75journals, you might do
76
77 hayom -j work Finally filed my stupid @tpsreport
78 hayom -j personal Sent out a pile of résumés today
79
80If you don't specify a journal, hayom will use the default.
81
82## Configuration
83
84Hayom works fine with no configuration file. If you do that, it will make a
85journal called `.hayom` in your `$HOME`. Alternatively, you can create a file
86called `$XDG_CONFIG_HOME/hayom/hayom.toml` (Linux and macOS) or
87`%APPDATA%\hayom\hayom.toml` (Windows) with your configuration options. An
88example configuration file might look like:
89
90 editor = "kak"
91 default = "personal"
92
93 [journals.work]
94 journal = "/home/benjamin/journals/work.txt"
95
96 [journals.personal]
97 journal = "/home/benjamin/journals/personal.txt"
98
99## Community
100
101Feel free to come discuss Hayom either on [the `discuss` mailing list][user] or
102[in our IRC channel][irc]. These are also great places to report bugs to fix.
103
104There is also [an `announce` mailing list][announce] if you just want to be kept
105up-to-date on new releases.
106
107## Submitting Patches
108
109If you feel comfortable using `git send-email`, please kick your patches off to
110[the `devel` mailing list][devel].
111
112[jrnl]: https://jrnl.sh
113[ed]: https://www.gnu.org/fun/jokes/ed-msg.en.html
114[user]: mailto:~bmp/hayom-discuss@lists.sr.ht
115[devel]: mailto:~bmp/hayom-devel@lists.sr.ht
116[announce]: mailto:~bmp/hayom-announce@lists.sr.ht
117[irc]: irc://irc.libera.chat/#hayom