Skip to main content

Module letters

Module letters 

Source
Expand description

Paper letters (docs/porch.md, “Paper letters”): a scan, a phone photo or a PDF dropped in a folder (by you, or a helper who opens the post), read by OCR, then understood by rules (the letters word lists, docs/words.md): who sent it, what it is, the amount, and the date by which something is asked, as a date, legal delays included (“dans un délai de deux mois à compter de la notification”). It waits outside like mail, and comes as a card in the Porch’s window, with a task for its date and its scan filed. The envelope stays outside; the date is computed once.

The not-knowing costs more than the work; a date written “within 30 days” is remembered by no one (time-based remembering fails, Landsiedel et al. 2017); clearer material and the amount shown raise what people claim (Bhargava & Manoli 2015).

letters/letters.toml in the notes folder, each letter’s text beside it (letters/<id>.txt), the scans filed in letters/<year>/.

Structs§

Letter
One letter kept.
Letters
The letters of a notes folder.
Reading
What a letter says, by rules.

Enums§

Kind
What a letter is.

Constants§

FOLDER
MANIFEST

Functions§

as_written 🔒
The words of a folded phrase as text writes them: “delai de deux mois” → “délai de deux mois”.
dates 🔒
The dates written in a plain text, with where each starts (in words): “15 novembre 2026”, “1er octobre 2026”, “15/11/2026”, “15.11.26”, “November 15, 2026”.
has 🔒
Whether a plain text holds one of the phrases, each as plain writes it, whole words.
normal 🔒
A list’s words as plain writes them, without empty ones.
number_word 🔒
A number written as a word (LetterWords::numbers) or in digits, up to a year’s days.
numbered 🔒
Named lists by their number (“10” → the names of October), as plain writes them.
plain 🔒
Folded words, punctuation as spaces, padded: “ avis d impot 2026 “.
project_of
The project a letter belongs with: the one whose name’s words it carries most.
read
Reads a letter’s text. received is the day it came (its scan’s day): a delay counted from the notification counts from there. The words looked for are the letters lists of the word packs in use, with your changes (words::LetterWords): bodies, kinds, months, delays…