Skip to content

enzet/Moire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moire

Moire (pronounced as /mwɑɹ/) is a simple extendable multipurpose markup language.

Writing on Moire

Default formatter

Headers

There are 6 possible header levels: \1, \2, ..., \6 with syntax \<header level> {<header name>} {<header label>}. E.g.: \2 {Section 3} {section-3}.

Formatting

Example Moire code Rendering
Italic \i {text} text
Bold \b {text} text
Monospaced \m {text} text
Strikethrough \strike {text} text
Subscript \sub {text} text
Superscript \super {text} text

Links

Example Moire code Rendering
\ref {http://example.com} {external link} external link
\ref {#example-section} {internal link} internal link

Lists

Example Moire code:

italic bold italic italic bold italic

\list
    {Item 1,}
    {item 2.}

Rendering:

  • Item 1,
  • item 2.

Tables

Example Moire code:

\table
    {{Header 1} {Header 2}}
    {{Cell 1, 1} {Cell 1, 2}}
    {{Cell 2, 1} {Cell 2, 2}}

Rendering:

Header 1 Header 2
Cell 1, 1 Cell 1, 2
Cell 2, 1 Cell 2, 2

Installation

Requirements: Python 3.8.

pip install .

Conversion Moire code into other formats

Convert Moire file to other formats:

    moire -i <Moire input file> -f <format> -o <output file> <other options>

E.g., this file is generated from Moire code using this command:

moire -i doc/readme.moi -o README.md -f DefaultMarkdown

Example section