mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-10 05:22:23 +00:00
Start actual CLI
This commit is contained in:
parent
a92d2501f7
commit
89d212b71c
21
src/main.cr
21
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 <formatter> Format to use (html, terminal, json)
|
||||
-t <theme> Theme to use (see --list-themes)
|
||||
-l <lexer> Lexer (language) to use (see --list-lexers)
|
||||
-o <output> 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
|
||||
|
Loading…
Reference in New Issue
Block a user