blk

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2020 License: MIT Imports: 6 Imported by: 0

README

blk

My generic structured text markup language, features:

  • Structured textual data, the only real "keyword" is @<identifier> { <...> }
  • JSON export
  • Turn on or off space trimming from text nodes

(Bold text syntax can ben made to have the same number of characters of Markdown as in the example below)

@metadata {
	@date { 9/03/2020 }
	@tags { testing, blk, blog }
}

@document{

    @title { My alternative markup language }

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
    tempor incididunt

    @figure {
        @image { https://picsum.photos/200 }
        @caption {
            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
            eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
            enim ad minim veniam, quis nostrud exercitation ullamco laboris
            nisi ut aliquip ex ea commodo
        }
    }

    @section {This is a sub section}

    Lorem ipsum dolor sit amet, tempor incididunt ut labore et dolore magna
    aliqua. Ut enim ad minim veniam, quis nostrud @b{exercitation ullamco} 
    laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in 
    @i{reprehenderit in voluptate} velit.

}

Idea / TODO

  • I think the combination ␣@ is not very frequently used in documents (emails don't have spaces) but there is still the problem if I wanted to embed random Java code or recent Typescript (both support "@" annotations).

    Maybe change @ to some random unicode character (like ) and create snippets for every editor.

  • Work out the interpreter for structured manupulations

    • Maybe parenthesis parameters to commands

Documentation

Overview

Interpreter for the Blk structured text language.

Usage

blk --json <file>

My generic structured text markup language, features:

- Structured textual data, the only real "keyword" is

@<identifier> { <...> }

- JSON export

- Turn on or off space trimming from text nodes

@metadata {
	@date { 9/03/2020 }
	@tags { testing, blk, blog }
}

@document{

	@title { My alternative markup language }

	Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
	tempor incididunt

	@figure {
		@image { https://picsum.photos/200 }
		@caption {
			Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
			eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
			enim ad minim veniam, quis nostrud exercitation ullamco laboris
			nisi ut aliquip ex ea commodo
		}
	}

	@section {This is a sub section}

	Lorem ipsum dolor sit amet, tempor incididunt ut labore et dolore magna
	aliqua. Ut enim ad minim veniam, quis nostrud @b{exercitation ullamco}
	laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
	@i{reprehenderit in voluptate} velit.

}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL