diff --git a/src/main.cr b/src/main.cr index 5243dad..c7369bc 100644 --- a/src/main.cr +++ b/src/main.cr @@ -1,5 +1,26 @@ require "./**" +HELP = <<-HELP +tartrazine: a syntax highlighting tool + +Usage: + + tartrazine FILE -f html [-t theme][--standalone][--line-numbers] + [-l lexer] [-o output][--css] + tartrazine FILE -f terminal [-t theme][-l lexer][-o output] + tartrazine FILE -f json [-o output] + tartrazine --list-themes + tartrazine --list-lexers + +-f Format to use (html, terminal, json) +-t Theme to use (see --list-themes) +-l Lexer (language) to use (see --list-lexers) +-o Output file (default: stdout) +--standalone Generate a standalone HTML file +--css Generate a CSS file for the theme +--line-numbers Include line numbers in the output +HELP + lexer = Tartrazine.lexer("crystal") theme = Tartrazine.theme(ARGV[1]) formatter = Tartrazine::Html.new