Next Previous Contents

## 2. Usage

## 2.1 Command line option overview

The HTML converter accepts the following options:

> `

>     ---------------------------------------------------------------------------
>     Usage: ca65html [options] file ...
>     Options:
>       --bgcolor c        Use background color c instead of #FFFFFF
>       --colorize         Add color highlights to the output
>       --commentcolor c   Use color c for comments instead of #B22222
>       --crefs            Generate references to the C source file(s)
>       --ctrlcolor c      Use color c for directives instead of #228B22
>       --cvttabs          Convert tabs to spaces in the output
>       --help             This text
>       --htmldir dir      Specify directory for HTML files
>       --indexcols n      Use n columns on index page (default 6)
>       --indexname file   Use file for the index file instead of index.html
>       --indexpage        Create an index page
>       --indextitle title Use title as the index title instead of Index
>       --keywordcolor c   Use color c for keywords instead of #A020F0
>       --linelabels       Generate a linexxx HTML label for each line
>       --linenumbers      Add line numbers to the output
>       --linkstyle style  Use the given link style
>       --replaceext       Replace source extension instead of appending .html
>       --textcolor c      Use text color c instead of #000000
>       --verbose          Be more verbose
>     ---------------------------------------------------------------------------

> `

## 2.2 Command line options in detail

Here is a description of all the command line options:

`--bgcolor c`

  Set the background color. The argument c must be a valid HTML color, usually given as RGB triplet in the form `#rrggbb`, where r, g, and b are the respective red, green, and blue parts as two-digit hex values. The default is `#FFFFFF` (white). That color is used in the `<body>` of the generated HTML output.

`--colorize`

  Colorize the output. The converter outputs processor instructions, assembler control commands, and comments in different colors.

`--commentcolor c`

  Set the color used for comments. The argument c must be a valid HTML color, usually given as RGB triplet in the form `#rrggbb`, where r, g, and b are the respective red, green, and blue parts as two-digit hex values. The default is `#B22222` (red).

  Note that this option has no effect if `--colorize` is not also given.

`--crefs`

  Generate references to the C file, when a `.dbg` command is found with a file name. The converter assumes that the C source was also converted into HTML (for example by use of `c2html`), has the name `file.c.html`, and lives in the same directory as the assembler file. If the `.dbg` directive specifies a line, a link to the correct line in the C file is generated, using a label in the form `linexxx`, as it is created by `c2html` by use of the `-n` option.

`--commentcolor c`

  Set the color used for assembler control commands. The argument c must be a valid HTML color, usually given as RGB triplet in the form `#rrggbb`, where r, g, and b are the respective red, green, and blue parts as two-digit hex values. The default is `#228B22` (green).

  Note that this option has no effect if `--colorize` is not also given.

`--cvttabs`

  Convert tabs in the input into spaces in the output, assuming the standard tab width of 8. This is useful if the `--linenumbers` option is used to retain the indentation.

`--help`

  Print the command line option summary shown above.

`--htmldir dir`

  Specify an output directory for the generated HTML files.

`--indexcols n`

  Use n columns on the index page. This option has no effect if used without `--indexpage`.

`--indexname name`

  Use another index file name instead of `index.html`. This option has no effect if used without `--indexpage`.

`--indexpage`

  Causes the converter to generate an index page listing file names, and all exports found in the converted files.

`--indextitle title`

  Use "title" as the title of the index page. This option has no effect if used without `--indexpage`.

`--keywordcolor c`

  Set the color used for processor instructions. The argument c must be a valid HTML color, usually given as RGB triplet in the form `#rrggbb`, where r, g, and b are the respective red, green, and blue parts as two-digit hex values. The default is `#A020F0` (purple).

  Note that this option has no effect if `--colorize` is not also given.

`--linelabels`

  Generate a label for each line using the name `linexxx` where xxx is the number of the line.

  Note: The converter will not make use of this label. Use this option if you have other HTML pages referencing the converted assembler file.

`--linenumbers`

  Generate line numbers on the left side of the output.

`--linkstyle n`

  Influences the style used when generating links for imports. If n is zero (the default), the converter creates a link to the actual symbol if it is defined somewhere in the input files. If not, it creates a link to the `.import` statement. If n is one, the converter will always generate a HTML link to `.import` statement.

`--replaceext`

  Replace the file extension of the input file instead of appending `.html` when generating the output file name.

`--textcolor c`

  Set the color for normal text. The argument c must be a valid HTML color, usually given as RGB triplet in the form `#rrggbb`, where r, g, and b are the respective red, green, and blue parts as two-digit hex values. The default is `#000000` (black). This color is used in the `<body>` of the generated HTML output.

`--verbose`

  Increase the converter verbosity. Without this option, ca65html is quiet when working. If you have a slow machine and lots of files to convert, you might like a little bit more progress information.

Next Previous Contents