module

Finfry::Books

The books finfry has opened, most recent first — a registry that fills itself as a side effect of use (any command run in scope of a book, or finfry init), so finfry books and the web UI's book switcher can find them again. Kept under XDG state (history, recently-used), apart from the ledgers themselves under XDG data.

Class methods

display(path : String) : String

A path with $HOME shortened, for listings.

Source
find(path : String) : Entry | Nil

A registered book by path, if it's one we know (the web switcher only opens books from the registry — never an arbitrary path from a form).

Source
list

Every known book, most recently opened first. The global ledger is always listed, even before it's ever been used.

Source
registry_path
Source
touch(book : String, at : Time = Time.local) : Nil

Record that book was opened now. Entries whose file has gone are dropped at the same time.

Source

Nested types