The API reference for lenkesamler: 15 modules and 48 exported
names, generated from the source and the docstrings in it. They are 29
procedures, 15 macros, 3 record types and 1 variable. Every module has
a section of its own and every name links to its definition; the index
filters all of them.
/ and type
in the index filter.
This chapter is generated from the source and the docstrings beside it. To correct a definition, change the source or its docstring and rebuild the manual; an edit to this page is lost.
Undocumented macro.
Undocumented macro.
Undocumented macro.
Undocumented macro.
A reading of every link BOOKMARKS holds, each address read once.
The reading is in the order the file holds the links, and an address written twice – two folders holding the same page, which is how a bookmarks file of a person’s usually goes – is read once and reported once.
The reading of URL, as the check PROBE makes of it.
CHECKS as the report of a run, one line per link and a count of them.
Whether a run of these CHECKS is a failure: a refusal or no answer at all.
The status URL answers with, and the address it leads to instead, if any.
A HEAD request is asked first; a server that answers 405 or 501 does not know that request and is asked for the page itself. The answer is ‘(CODE . LOCATION)’ with LOCATION ‘#f’ when the answer was not a redirect. A server that cannot be reached at all raises, which ‘check-link’ reports as no answer.
Whether ADDRESS is one a web server answers, which only http and https are.
An address written without a scheme is read as one, because that is how ‘url-string-with-protocol’ hands it over: ‘codeberg.org/jjba23’ is a page.
Undocumented procedure.
Detag an sxml tree sxml into a string. Does not perform any formatting.
Serialize the sxml tree tree as XML. The output will be written to the current output port, unless the optional argument port is present.
TEXT, the bookmarks file a browser wrote, as the bookmarks it holds.
The answer is a list of ‘dir’ and ‘url’ records – the same records a bookmarks file is written in – so a file a browser wrote can be rendered in every mode this program has, a bookmarks file included.
A file that ends in the middle of a folder – a download that stopped, a file somebody edited – is read as far as it goes: the lists still open at the end of the text are closed there, so the folders that were written are the folders that come out.
What one run of lenkesamler does.
A run reads exactly one file: this project’s own bookmarks DSL, or a file a browser exported, which is a migration rather than a rendering and yields the DSL’s own mode. The bookmarks that come out are either checked – every link asked for, and a dead one makes the run exit 1 so a pipeline hears about it – or rendered through the renderer the mode names. Either way the result is one document, written to the file a run named or to the standard output, and the report of the run goes to the error port so that a redirected output holds the document and nothing else.
Mermaid diagram, as source:
flowchart LR
file["bookmarks file<br/>(the Scheme DSL)"] --> load["bookmarks-of-file"]
browser["a browser's export"] --> import["bookmarks-of-import"]
load --> bookmarks["bookmarks"]
import --> bookmarks
bookmarks --> check{"--check?"}
check -- yes --> report["check-bookmarks<br/>and check-report"]
check -- no --> render["render-bookmarks<br/>one renderer per mode"]
report --> emit["emit"]
render --> emit
emit --> out["--destination file<br/>or standard output"]
%% dokgen-mermaid
Undocumented procedure.
The document MODE asks for, rendered from BOOKMARKS.
The document is the whole output of a run, so it is also the whole of what a destination file holds: nothing is written to a port here.
Write DOCUMENT to the file DESTINATION, making its directory if needed.
Undocumented macro.
Undocumented macro.
Undocumented macro.
Get a setting for lenkesamler.
Undocumented macro.
Undocumented macro.
Undocumented macro.
Undocumented macro.
Undocumented macro.
Undocumented macro.
Undocumented macro.
Undocumented procedure.
Undocumented procedure.
Undocumented procedure.
X as a URL a browser can follow.
A link written without a scheme – which is how most of a bookmarks file is written, ‘codeberg.org/jjba23’ – is reached over FALLBACK-PROTOCOL. A link that already names its own scheme keeps it, whatever the scheme is: a ‘mailto:’ address and an ‘ftp:’ archive are as much bookmarks as a web page.
Undocumented procedure.
Undocumented procedure.