uml/README

119 lines
3.2 KiB
Plaintext
Raw Normal View History

2021-06-29 14:13:56 -05:00
uml - untitled markup language
==============================
2021-06-29 14:16:50 -05:00
uml is a markup is a (mostly) line based markup language. it mostly exists to be 'rendered' or exported into other markup languages. as such it is the 'lowest common denominator' of all these markup languages. its features include
2021-06-29 14:13:56 -05:00
- headers (#), subheaders (##), subsubheaders (###), ...
- quotes (>)
- links (=)
2021-06-29 14:16:50 -05:00
- link descriptions (not implemented)
2021-06-29 14:13:56 -05:00
- non-rendered comments (%)
- lists (-/*)
2021-06-29 14:16:50 -05:00
- codeblocks/preformatted text (not implemented)
- tables (not implemented)
- inline links (not implemented)
2021-06-29 14:13:56 -05:00
files
=====
README - this document
uml.py - tokenization prototype
examples of markup
==================
header:
# header 1
subheader:
## header 2
subsubheader
### header 3
.
.
.
quotes:
> it was the best of times, it was the worst of times...
links:
= https://http.cat
link with description:
= https://http.cat cute cats
comment:
% here's a comment that will not be rendered!
lists:
- one
- two
* three
* four
- five
codeblocks:
```
#include <stdio.h>
int main(void) { return 0; }
```
codeblock with description:
```description
#include <stdio.h>
int main(void) { return 0; }
```
tables:
| ticker | value | increase
| TILD | 102.3 | +10.39
| EVER | 403.1 | +493.2
| SECO | 302.1 | -932.6
| OL | 6092.1 | -4.3
inline links:
hello there, here's a [link](https://example.com)
rendering considerations
========================
uml was designed for rendering into gemtext, gophermaps, simple html, and plain text, in addition to regular markdown.
for rendering into gophermaps, plaintext, and gemtext, it is recommended that inline links be rendered using some sort of reference system:
+--------------| Input text |--+
| Here's a line with [inline |
| links](https://example.com). |
+-------------| Output text |--+
| Here's a line with inline |
| links [1]. |
| |
| [1]: https://example.com |
+------------------------------+
tables can be rendered like so:
+--------------------------| Input text |--+
| | roses | are | red |
| | violets | are | blue |
| | tables | are | cool |
+-------------------------| Output text |--+
| |
| +----------------------+ |
| | roses | are | red | |
| | violets | are | blue | |
| | tables | are | cool | |
| +----------------------+ |
| |
+------------------------------------------+
uml.py usage
============
2021-06-29 14:16:50 -05:00
uml.py takes no arguments and just listens on stdin. it tokenizes the implemented parts of the markup language until an EOF is reached, in which case the program prints the results of the organization.
2021-06-29 14:13:56 -05:00
+----------------------| Input text |--+
| # header |
| ## subheader |
| % comment |
+---------------------| Output text |--+
| header h1 |
| subheader h2 |
| comment c |
+--------------------------------------+
contact / bugs
==============
randomuser@tilde.club