Files
narl-workspace/docs/wiki/Diary.md
T
nvrl 4eb663e2d7 docs: a guide, a wiki and screenshots
The README grew a section per feature and is a good reference, but nothing
said where to begin. docs/wiki now has a getting-started page, a guide that
walks through one day with the workspace and explains each part where it comes
up, and a page per part of the app, each with screenshots of what it
describes.

Three pages are read out of the code rather than written, so they cannot drift
from it: the keys and commands from Help.svelte and commands.ts, the same lists
`:help` draws; the settings from .env.example, which gains a heading for the
vault, trash and history settings so they no longer sit under mail; and the
API from the README's table. `make wiki` writes them, and `--check` fails when
one is stale or a link between pages leads nowhere. `--publish` lays the pages
out for a GitHub wiki: links without `.md`, images beside them, `[[` escaped so
the wiki does not take a command's help text for a link to a page.

The screenshots are taken by `make screenshots`: the debug binary on a
temporary data directory, with a password made up for the run, filled with an
example workspace over the API, and a headless Chromium driven over the
DevTools protocol through the views the docs show. Nothing outside the
temporary directory is touched but docs/images, and the pictures are cut to
256 colours, a third of their size, which a dark UI does not show.

The README opens with the banner, a CI badge, the guide, the features grouped
by what they are for, and six of the screenshots.
2026-10-21 12:07:32 +02:00

59 lines
1.8 KiB
Markdown

# The diary
The space with the diary role is a journal. Each document in it is an entry,
filed under the day it is about.
- `T` (or `:today`) opens today's entry, and starts it when there is none.
- `[d` and `]d` step to the entry before or after the one open, by date.
- `:date 2026-10-01` files the open entry under another day.
- `:new 2026-10-01` starts an entry for a day that has passed.
Days are counted in `WORKSPACE_TIMEZONE`, the same as the evening reminder, so
an entry written after midnight on a trip still lands on the right day.
## The calendar
`C` (or `:cal`) shows the diary a month at a time.
![The diary by month](../images/calendar.png)
| key | what it does |
| --- | --- |
| `h` / `l` | a day back / forward |
| `j` / `k` | a week forward / back |
| `H` / `L` | a month back / forward |
| `.` | today |
| `Enter` | open the day's entry, or start one dated that day |
| `C`, `Esc` | close |
A dot marks a day with an entry. A number says how many when there are more
than one.
## The day template
When the diary has a `templates` folder with a document called `day` in it,
every new entry starts from it: from `T`, `o`, the calendar, or a
[capture](Capture.md) to the diary. For example:
```markdown
## {{weekday}}
### What happened
### What I am thankful for
```
See [Writing](Writing.md#templates) for the placeholders. The templates are not
entries: they are not on the calendar and do not count as having written today.
## On this day
The [agenda](Boards-and-Agenda.md#the-agenda) ends with what you wrote on the
same day in earlier years. `j` walks into them and `Enter` opens one.
## The reminder
With mail set up, an evening reminder arrives at `WORKSPACE_REMINDER_AT`
(20:00 by default) when nothing was written in the diary that day. See
[Backup and mail](Backup-and-Mail.md#mail).