💾 Archived View for lists.sh › spec captured on 2022-06-04 at 00:23:26. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
Speculative specification
Version: 2022.05.02.dev
Status: Draft
Author: Eric Bower
The goal of this specification is to understand how we render plain text lists. The overall design of this format is to be easy to parse and render.
The format is line-oriented, and a satisfactory rendering can be achieved with a single pass of a document, processing each line independently. As per gopher, links can only be displayed one per line, encouraging neat, list-like structure.
Feedback on any part of this is extremely welcome, please email support@lists.sh.
The source code for our parser can be found on github[0].
The source code for an example list demonstrating all the features can be found on github[1].
As a subtype of the top-level media type "text", "text/plain" inherits the "charset" parameter defined in RFC 2046[2]. The default value of "charset" is "UTF-8" for "text" content.
As mentioned, the text format is line-oriented. Each line of a document has a single "line type". It is possible to unambiguously determine a line's type purely by inspecting its first (3) characters. A line's type determines the manner in which it should be presented to the user. Any details of presentation or rendering associated with a particular line type are strictly limited in scope to that individual line.
lists.sh only supports the `.txt` file extension and will ignore all other file extensions.
List items are separated by newline characters `\n`. Each list item is on its own line. A list item does not require any special formatting. A list item can contain as much text as it wants. We encourage soft wrapping for readability in your editor of choice. Hard wrapping is not permitted as it will create a new list item.
Empty lines will be completely removed and not rendered to the end user.
Hyperlinks are denoted by the prefix `=>`. The following text should then be the hyperlink.
=> https://lists.sh
Optionally you can supply the hyperlink text immediately following the link.
=> https://lists.sh microblog for lists
List items can be represented as images by prefixing the line with <code>=<</code>.
=< https://i.imgur.com/iXMNUN5.jpg
Optionally you can supply the image alt text immediately following the link.
=< https://i.imgur.com/iXMNUN5.jpg I use arch, btw
List items can be represented as headers. We support two headers currently. Headers will end the previous list and then create a new one after it. This allows a single document to contain multiple lists.
# Header One ## Header Two
List items can be represented as blockquotes.
> This is a blockquote.
List items can be represented as preformatted text where newline characters are not considered part of new list items. They can be represented by prefixing the line with ```.
#!/usr/bin/env bash set -x echo "this is a preformatted list item!
You must also close the preformatted text with another ``` on its own line. The next example with NOT work.
Variables allow us to store metadata within our system. Variables are list items with key value pairs denoted by `=:` followed by the key, a whitespace character, and then the value.
=: publish_at 2022-04-20
These variables will not be rendered to the user inside the list.
---
Built and maintained by Eric Bower