Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1.36 KB

README.md

File metadata and controls

53 lines (39 loc) · 1.36 KB

TML (Terminal Markup Language)

This is a custom renderer to build (somewhat) interactive terminal applications for the terminal similar to HTML for the web.

See the TML Specification.

Preview (27 July 2023)

This is a sample login screen with a regular and password input and some dummy buttons

tml.demo.07.27.23.mp4

Rendered from the following TML:

<tml>
  <text/>
  <text marginLeft=2 fg=cyan bold=true>Login:</text>
  <text/>
  <text/>
  <text marginLeft=2 marginRight=4 bold=true newline=false>Email:</text>
  <input fg=red bg=white/>
  <text/>
  <text marginLeft=2 marginRight=1 bold=true newline=false>Password:</text>
  <input fg=red bg=white password=true/>
  <text/>
  <button marginLeft=2 marginRight=1 fixedWidth=16 newline=false bg=green fg=white>Login</button>
  <button fixedWidth=16 bg=blue fg=white>Register</button>
</tml>

Building

This relies on ncurses for all the UI stuff:

sudo apt-get install libncurses5-dev libncursesw5-dev

The CMake handles the linking/includes.

Now you can clone this repo, enter the root and:

mkdir build && cd build
cmake -DDEBUG_MODE=ON -DCOMPILE_TESTS=ON ..
  • DEBUG_MODE is OFF by default
  • COMPILE_TESTS is ON by default

An executable called tmlrender will be created in build/src/ directory.

Usage

TODO: