Command Line

Some examples of command line usage.

  • Getting help:
    uv --help
  • Listing available syntaxes:
    uv -l syntax
  • Listing available themes:
    uv -l themes
  • Letting uv to guess the parameters:
    uv lib/uv.rb
  • Specifying a syntax and a theme
    uv -s yaml -t espresso_libre syntax/ini.syntax
  • Output results to index.html and copy required files (eg css):
    uv -c . syntax/ini.syntax > index.html
  • Producing output in latex and converting to pdf:
    uv -h -o latex lib/uv.rb > uv.tex
    pdflatex uv.tex

Using ultraviolet as a library

The interface is very similar to the one of the command line.

  • List of available syntaxes:
    puts Uv.syntaxes.join( ", " )
  • Listing available themes:
    puts Uv.themes.join( ", " )
  • Parsing a css string. Produce xhtml output, with line numbers using amy theme:
    result = Uv.parse( text, "xhtml", "css", true, "amy")
  • Output copy required files for xhtml format to directory site:
    Uv.copy_files "xhtml", "site"