From 98415772972ef91783b5ab0fb6ce3c3f69025fa9 Mon Sep 17 00:00:00 2001 From: Artemy Egorov Date: Tue, 23 Jul 2024 11:55:01 +0300 Subject: [PATCH] doc: update concept and add specification --- README.md | 34 ++++++++++++++++++++++++++++++++-- specification/main.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 specification/main.md diff --git a/README.md b/README.md index 2b8791c..41a2a50 100644 --- a/README.md +++ b/README.md @@ -6,16 +6,38 @@ -Simple markup language сombining small file size, big number of possibilities for describing the interface and readability. +Markup language ecosystem сombining small file size, big number of possibilities for describing the interface and readability. -Specification is coming soon. +[Specification](./specification/main.md). ## Concept +This is daleth (high level language that translates to daletl). + ```yaml +# tag: body +# each line is a new tag (if not {}, () is used) h1: TxtDot revolution p: TxtDot is a cool project +# If no tag is specified, then the 'element' tag, the most primitive tag, is placed +( +Check dalet too +This is one paragraph +) + +This is another paragraph + +# [ ] for arguments +row[center]: { + link[https://github.com/txtdot/txtdot]: Homepage + button[https://example.com/donate]: { + # tag without body + img[https://example.com/donate.png] + Donate + } +} + # {} for multiple objects row: { { @@ -46,6 +68,14 @@ row: { npm install npm run dev ) + + # (~n Text) n is number of minimum spaces + code[markdown]: (~4 + this is codeblock + ) + + # (# Text) Text after "(# " not modified + code[markdown]: (# this is codeblock) } { diff --git a/specification/main.md b/specification/main.md new file mode 100644 index 0000000..c9a8513 --- /dev/null +++ b/specification/main.md @@ -0,0 +1,28 @@ +# Dalet + +> [!WARNING] +> Specification is not complete. + +**Dalet** is a system through which it is possible to combine human readable markup language and small size of transmitted data. The system is divided into two stages and two languages. + +## Languages + +### Daleth + +**Daleth** is a high-level language for humans. It can be translated into daletl (to be explained later), but daletl cannot be translated into daleth[^1]. It is only used for page creation by humans. + +### Daletl + +**Daletl** is a low-level language for machines. It is used in data transmission, processing and generation. It is specifically optimized to transfer as little data as possible using json, messagepack or daletpack. + +## Stages + +### Stage 1 (optional) + +In the first stage, the daleth language is parsed and converted to daletl. All tag names are replaced by the smallest possible names, so that they take up less space in json or messagepack, for example. + +### Stage 2 + +At this stage, only daletl is used. This stage is used by programs for generation, modification and rendering. All information is transferred between the server and the client in this stage. + +[^1]: In the first versions only. Detranslation is planned for the future.