Skip to content

BilakshanP/aml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AML - ANSI Markup Language

A lightweight, tag-based markup language for applying ANSI terminal styles to text.

Quick Start

CLI

# Apply styles to plain text
echo "Hello" | aml -st "fr mb"

# Parse markup
aml '<fr>Red</f> and <fg>Green</f>'

# Install
cargo install --git https://github.com/bilakshanp/aml

Library

use aml::prelude::*;

let doc = Document::new("<fr>Red text</f>");
println!("{}", doc.render());

Add to Cargo.toml:

[dependencies]
aml = { git = "https://github.com/bilakshanp/aml" }

Markup Syntax

Colors: <f...>text</f> (foreground), <b...>text</b> (background)

Modifiers: <m...>text</m> (bold, italic, underline, etc.)

Shorthand: <s f... b... m...>text</s> (all combined)

Color formats: ANSI (fr, fG), hex (f#ff0000), RGB (f255,0,0), 256-palette (f198)

Features

  • Multiple color formats
  • Text modifiers (bold, italic, underline, etc.)
  • Natural nesting
  • Minimal escape sequences
  • Detailed error messages
  • CLI + library

For detailed documentation, see docs/.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages