Skip to main content

Module projects

Module projects 

Source
Expand description

Projects: every matter you follow, in one list.

A project is work for a client, its time billable, or a matter of your own: a tax return, a health-cover request, a bill to contest. Its detailed record lives outside Sioul, in your notes folder: Markdown files you own (an Obsidian vault, a git repository, a folder of notes). Sioul reads one file at its root, sioul-projects.toml, which names each project, points at its files, and says which mail belongs to it (docs/notes-folder.md). Sioul links to the record; it never owns it.

The file’s first name was sioul-cases.toml, its tables [[case]]. Both names are still read, and writing keeps the names a file already has, so that a device not yet updated reads it as before. Renaming it is the person’s choice, made once every device is updated (rename_file).

Structs§

Manifest 🔒
Project
One project, as its file describes it.
ProjectEdit
A project as its form gives it.
ProjectStore
The projects of one notes folder.
Route
A route matches when every list it fills has at least one match.
RouteMatch
One condition of a route that a message met: the field and the value it matched.
RouteValue
A route as the settings edit it: each list may be empty.
Routing
A project a message was routed to, and what matched.

Enums§

Check 🔒
RouteField
Which field of a message matched a route.

Constants§

BEFORE_RENAME
The copy of the old file that renaming keeps beside the new one (rename_file).
FILE
The projects’ file, at the root of the notes folder.
OLD_FILE
The file’s first name: still read when only it is there (file_in).
OLD_TABLE 🔒
The table’s first name, [[case]]: a file written before keeps it.
TABLE 🔒
The table each project is written in: [[project]].

Functions§

any_match 🔒
both_in
Both files are in the notes folder: sioul-projects.toml is read, and sioul-cases.toml is left as it is (Settings says so).
domain_matches 🔒
“dgfip.finances.example” matches “finances.example”; “notfinances.example” does not.
entry_mut 🔒
A project’s entry in the file, whichever table holds it.
file_in
The projects’ file of a notes folder: sioul-projects.toml, or sioul-cases.toml when only that one is there. With neither, the new name: the first project made makes it.
id_of 🔒
ids_in 🔒
Every project’s id in the file, under either table’s name.
name_contains 🔒
Whether a file name holds a word, case and accents aside: names are not prose.
new_id
A short, stable id from a title: “Studio Lumen — site” → “studio-lumen-site”; another number when it is taken.
only_old_in
Only the file’s first name is there: Settings offers to rename it.
read_doc 🔒
The file’s text as toml_edit holds it, comments and all. A file not there yet reads as empty when missing_empty; one there but unreadable (its rights, an encoding other than UTF-8) is an error: written over, every project would go.
read_projects 🔒
The projects a file’s text names, under either table’s name.
remove_project
Takes a project out of its file, the file’s comments elsewhere kept. Its tasks, notes, mail and time stay; they are no longer gathered under it.
rename_file
Renames the file’s first name, sioul-cases.toml, to sioul-projects.toml, and its [[case]] tables to [[project]], in one write: every field, route and comment kept, and checked to be so before anything is written. The old file stays beside the new one, as sioul-cases.toml.before-rename. Never done by itself: an older Sioul reads only the first name, so the person chooses when (Settings ▸ Your folder and sharing). Refused when sioul-projects.toml is already there. Returns where the old file was kept.
save_project
Writes a project’s fields from its form, in place, its comments and routes kept; a new project (id not there yet) goes at the end, and an empty id is made from its title. Returns its id. file is the notes folder’s projects’ file (file_in): a file not there yet is made.
set_ai
Opens a project to AI agents, or closes it, in its file, in place: its other fields and the file’s comments stay. The sharing carries the project’s entry, so the choice holds on every device.
set_routes
Replaces a project’s routes in its file, in place: its other fields and the file’s comments stay. Routes left empty are dropped.
table_of 🔒
The table a file’s new projects go in: the one it has, [[project]] or [[case]]. A file with neither gets [[case]] under its first name, so that an older Sioul still reads it, and [[project]] otherwise.
write_ai 🔒
A project open to AI agents says so (ai = true); a closed one says nothing, as every project is closed until opened.
write_doc 🔒
Writes the file whole, through a file beside it, so that it is never half written.