X-Git-Url: http://nitlanguage.org diff --git a/share/man/nitlight.md b/share/man/nitlight.md index 54b2896..00c15c2 100644 --- a/share/man/nitlight.md +++ b/share/man/nitlight.md @@ -1,83 +1,63 @@ -% NITLIGHT(1) - # NAME -Generates HTML of highlited code from Nit source files. - -# SYNOPSYS +nitlight - generates HTML of highlighted code from Nit source files. -nitlight [*options*]... - -# OPTIONS +# SYNOPSIS -`-W`, `--warn` -: Show more warnings +nitlight [*options*] FILE... -`-w`, `--warning` -: Show/hide a specific warning +# DESCRIPTION -`-q`, `--quiet` -: Do not show warnings +Unlike generic lexical or syntactic highlighter, nitlight use semantic information on programs to improve the rendered result. -`--stop-on-first-error` -: Stop on first error - -`--no-color` -: Do not use color to display errors and warnings - -`--log` -: Generate various log files +# OPTIONS -`--log-dir` -: Directory where to generate log files +Common options of the Nit tools are understood. +Here, only the specific one are indicated. -`-h`, `-?`, `--help` -: Show Help (This screen) +### `-f`, `--fragment` +Omit document header and footer. -`--version` -: Show version and exit +By default, a complete autonomous HTML document is generated. +If `-f` is given, only the inside of the body part is generated such that it could be integrated +into a HTML document. -`--set-dummy-tool` -: Set toolname and version to DUMMY. Useful for testing +### `--line-id-prefix` +Prefix of the id of each line `` element. -`-v`, `--verbose` -: Verbose +By default, each line is enclosed in its own `` element with an `id` attribute made of the line number prefixed by `L` (e.g. `L1` for the first line). -`--bash-completion` -: Generate bash_completion file for this program +This option changes the prefix used. +If an empty string is used, then the `` are generated without `id` attributes. -`--stub-man` -: Generate a stub manpage in pandoc markdown format +This option is especially useful with `--fragment` when more than one highlighted code is +included in the same HTML document. +Each fragment can thus be generated with its own distinct prefix, or the id can be disabled altogether. -`--disable-phase` -: DEBUG: Disable a specific phase; use `list` to get the list. +### `--first-line` +Start the source file at this line (default: 1). -`-I`, `--path` -: Set include path for loaders (may be used more than once) +The generated HTML will only contains lines bellow the specified one. -`--only-parse` -: Only proceed to parse step of loaders +### `--last-line` +End the source file at this line (default: to the end) -`--only-metamodel` -: Stop after meta-model processing +The generated HTML will only contains lines above the specified one. -`--ignore-visibility` -: Do not check, and produce errors, on visibility issues. +### `-d`, `--dir` +Output html files in a specific directory (required if more than one module). -`-f`, `--fragment` -: Omit document header and footer +By default the generated HTML is outputted on the screen. +If this option is used, then HTML files are generated in the specified directory. -`--first-line` -: Start the source file at this line (default: 1) +A basic `index.heml` and a `style.css` file are also generated in the directory. -`--last-line` -: End the source file at this line (default: to the end) +### `--full` +Process also imported modules. -`-d`, `--dir` -: Output html files in a specific directory (required if more than one module) +By default, only the modules indicated on the command line are highlighted. -`--full` -: Process also imported modules +With the `--full` option, all imported modules (even those in standard) are also precessed. # SEE ALSO