Skip to main content

Module article

Module article 

Source
Expand description

Long-form writing (NIP-23, kind 30023): what an article says of itself in its tags, and how long it takes to read.

An article is no note. It has a title, a line that sums it up, a picture and topics, all in its tags, and what it says is Markdown proper: a line break in a paragraph is a space, as it is not in a note. It is known by an address (who wrote it and what they called it), under which it is written again when it is changed, so that each version has an id of its own and the address stays. When it was written is so when it was last changed.

Where it is listed among notes, an article shows as a card: its picture, its title, and what sums it up. All of it is shown where it is opened, as the note a thread is for (see Note::in_full).

Structs§

Article
What an article says of itself, beside what it says.
ArticleLink
An article a note names by its address (nostr:naddr1…). Shown under the note’s text, as the card of the article when that is at hand, and as a link to it when it isn’t.

Constants§

ARTICLE_KIND 🔒
The kind of event an article is.
MAX_TOPICS 🔒
How many topics of an article are shown, and how much of each: as many as Jumble shows.
SUMMARY_MAX_CHARS 🔒
TITLE_MAX_CHARS 🔒
How much of an article’s title and of what sums it up is kept: both are the author’s to write, at any length.
TOPIC_MAX_CHARS 🔒
UNSPACED_PER_MINUTE 🔒
WORDS_PER_MINUTE 🔒
How many words are read in a minute, and how many characters of what is written without spaces between words: what Jumble takes them to be.

Functions§

reading_minutes
How many minutes text takes to read, near enough: its words, and the characters of what is written without spaces, each at the pace such are read. One minute at the least. The addresses in it are counted as the word or two they come to, which is little either way.
unspaced 🔒
Whether c is of a script written without spaces between words: Japanese, Chinese, Korean.