feat: v0.4.0 — section, resolve, list, tasks
- section: append to / replace one section, list-aware spacing, fences ignored - resolve: filename or alias, case/accent-insensitive, --link wikilinks - list: frontmatter filters (key=value, key!=value, key, !key), --json - tasks: checkbox tasks by folder, date range, status, --ignore-from template, --json - libyaml loader for whole-vault scans
This commit is contained in:
1 parent
3d3873b699
commit
d063551a1e
3 files changed
+500
-1
No files matched your search
@@ -256,6 +256,50 @@ splitting) and matched by wikilink target, so `[[Name|Alias]]` and `[[name]]` ar
|
||||
`--add` skips duplicates, creates the list if the key is missing, and turns a text value into the
|
||||
first item. A list holding unquoted `[[links]]` (which YAML reads as nested lists) is refused.
|
||||
|
||||
### Editing One Section
|
||||
|
||||
```bash
|
||||
# Append at the end of a section (before the next heading of the same or a higher level)
|
||||
onyx section "periodic/daily/2026-10-19" --heading "## Journal" --content "### 10:00 - Titre\n- note"
|
||||
onyx section "periodic/daily/2026-10-19" --heading "### Matin" --content "- [ ] Appeler Haro"
|
||||
|
||||
# Replace a section's body; --content - reads stdin; --create adds a missing section at the end
|
||||
onyx section "periodic/weekly/2026-W43" --heading "## Weekly review" --replace --create --content - < review.md
|
||||
```
|
||||
|
||||
`--heading "## Journal"` matches that level only; `--heading Journal` matches any level (case-insensitive).
|
||||
Appended text gets a blank line before it, except between two list items, so a list stays one list.
|
||||
Headings in the frontmatter or in code blocks are ignored, and everything outside the section is left
|
||||
byte-for-byte. A missing heading is an error (listing the note's headings) unless `--create`.
|
||||
|
||||
### Finding Notes
|
||||
|
||||
```bash
|
||||
# By filename or alias: exact, ignoring case and accents; exit code 1 when nothing matches
|
||||
onyx resolve "Stéphane" --folder entities --link # [[Stéphane Charbonneau|Stéphane]], one line per match
|
||||
onyx resolve "METC" # entities/businesses/Mousquetons et Cie
|
||||
|
||||
# By frontmatter (repeatable --where = AND): key=value, key!=value, key, !key
|
||||
onyx list --folder projects --where type=project --where status=active
|
||||
onyx list --where client=Symbolitech --where "status!=done" --json
|
||||
```
|
||||
|
||||
`--where` values compare without case or accents, a `[[link]]` compares by its target, and a list matches
|
||||
when any item does. `resolve --link` uses a path link when the filename is shared by several notes.
|
||||
|
||||
### Tasks
|
||||
|
||||
```bash
|
||||
# Open and in-progress tasks of a week's daily notes, minus the template's recurring ones
|
||||
onyx tasks --folder periodic/daily --from 2026-10-12 --to 2026-10-18 --status open,doing \
|
||||
--ignore-from resources/template/daily-note
|
||||
onyx tasks --folder projects --status open --json # path, line, date, status, heading, text
|
||||
```
|
||||
|
||||
Statuses: `- [ ]` open, `- [/]` doing, `- [x]` done, `- [-]` cancelled. With `--from`/`--to`, a note's
|
||||
date is the `YYYY-MM-DD` at the start of its filename, else its `date` property; undated notes are
|
||||
skipped. Output is `path:line: - [ ] text`, like grep.
|
||||
|
||||
### Version
|
||||
|
||||
```bash
|
||||
@@ -272,6 +316,8 @@ onyx --version
|
||||
- **Periodic Notes**: Support for daily, weekly, monthly, quarterly, and yearly notes
|
||||
- **Frontmatter Management**: Edit, view, clear, and delete YAML frontmatter
|
||||
- **Link Updates**: Automatically update internal links when moving notes
|
||||
- **Sections**: Append to or replace one section of a note
|
||||
- **Queries**: Resolve notes by name/alias, list notes by frontmatter, list tasks by date and status
|
||||
- **Cross-Platform**: Works on macOS, Windows, and Linux
|
||||
|
||||
## Requirements
|
||||
|
||||
Reference in new issue
Block a user