Skip to main content

Module links

Module links 

Source
Expand description

Links between everything: mail, tasks, events, contacts, notes, drafts, budget lines and projects.

Each link lives in the thing that makes it, in that thing’s own format, wherever one can: in a task or an event (LINK, RELATED-TO, CONTACT, REFID: CalDAV carries them to every device and other applications keep them), in a note (a Markdown link or its front matter), in a draft (its links), in a budget line (its links). What none of them can hold goes in a small local file, links.toml: a message is never changed, a shared calendar may be read-only. This module gathers both directions: what a thing points at, and what points at it.

Things are named by addresses, one scheme per kind:

  • a message: mid:<Message-ID> (RFC 2392);
  • a task, an event, a contact: sioul:task/<UID>, sioul:event/<UID>, sioul:contact/<UID>;
  • a note: sioul:note/<path in the notes folder>;
  • a draft: sioul:draft/<id>; a paper: sioul:paper/<id>;
  • a project: sioul:project/<id>; one written before the name changed, sioul:case/<id>, still reads as the same project, and always will;
  • a budget line: sioul:budget/<budget>/<position in the file>;
  • anything else: its URL.

Structs§

BudgetRef
A budget line, as links see it.
Edge
A tie from one thing to another, and how.
Loaded
Everything links reach, read from disk.
LocalLinks
Links Sioul keeps itself, for what cannot hold them.
Related
One thing tied to the one open, as the Related panel shows it.
Rewrite
A file to write so that a tie is made or undone: the thing that holds it, and its new text.
World
Everything Sioul knows, to follow links both ways.

Enums§

Kind
What a link points at.

Constants§

PHONE_PROGRAMS 🔒
Android’s installers, which a phone would offer to install rather than show: an app, and the bundles of split apps other stores pass around.
PROGRAMS 🔒
What the desktop would start rather than show, by its extension: programs, scripts, installers, shortcuts, disk images (the list attachments are kept from).

Functions§

budget_uri
A budget line by its budget and its position in the file.
closeness 🔒
Which tie says most, when two things are tied twice: smaller first.
contact_uri
draft_uri
encode 🔒
A UID or an id inside an address: “/” and “%” and spaces percent-encoded, letters of every language kept as they are, so id_of gives it back.
event_uri
extension_in 🔒
Whether a name’s extension, in any case, is one of list; the dots, spaces and slashes a name may end with left aside.
folder_of 🔒
The folder a file’s address is in: “file:///home/a/” for “file:///home/a/run.sh”.
forward 🔒
How a tie reads from where it starts.
id_of
The id an address of a kind carries: “sioul:task/abc” → “abc”.
inverse 🔒
How a tie reads from its other end.
is_phone_program
Whether a file of this name is one of Android’s installers: on a phone, kept from opening as programs are (is_program).
is_program
Whether a file of this name (or path, or address) is one the desktop would start.
kind_of
The kind of thing an address names.
mail_projects
The messages tied to a project, by bare Message-ID, and the project’s id.
mail_uri
mid: and the Message-ID, without its angle brackets (RFC 2392).
openable
Whether the system may be asked to open an address read from a file (someone else’s task or event, a note): the web, mail, a phone, a map, a file on this computer. Not a share of another computer (“file://host/…”, which Windows reaches with your credentials), nor a scheme that starts a program (“ms-msdt:”, “search-ms:”): those are shown, not opened. The window should ask it too before Qt.openUrlExternally.
paper_uri
project_uri
A project, by its id. An address written before the name changed, sioul:case/<id>, reads as the same project (kind_of, World::canonical).
site_uri
A site of Sioul’s Sites, by its id.
task_uri