DISCOUNT(1)

NAME
discount - text to html conversion tool

SYNOPSIS
discount [-d] [-V] [-F bitmap] [-f options] [-o file] [-s text] [-t text] [textfile]

DESCRIPTION
The discount utility reads the markdown(7)-formatted textfile (or stdin if not specified,) compiles it, and writes the html output to stdout.

The options are as follows:

-d  Instead of writing the html file, dump a parse tree to stdout.

-f -options
    Set or clear various translation flags. The flags are in a comma-delimited list, with an optional + (set) prefix on each flag.

    noimage
        Don't allow image tags.

    nolinks
        Don't allow links.

    nohtml
        Don't allow embedded html.

    cdata
        Generate valid XML output.

    noheader
        Do not process pandoc headers.

    tabstops
        Use markdown-standard 4-space tabstops.

    toc Enable table-of-contents support

    1.0 Revert to Markdown 1.0 compatability.

    As an example, the option -f nolinks,quot tells discount to not allow <a tags, and to expand double-quotes.

-F bitmap
    Set translation flags. Bitmap is a bit map of the various configuration options described in markdown(3) (the flag values are defined in mkdio.h)

-V  Show the version# and configuration data.

    If the version includes the string DL_TAG, discount was configured with definition list support.

    If the version includes the string HEADER, discount was configured to support pandoc header blocks.

-o file
    Write the generated html to file.

-t text
    Use mkd_text(3) to format text instead of processing stdin with the markdown(3) function.

-T  If run with the table-of-content flag on, dump the table of contents before the formatted text.

-s text
    Use the markdown(3) function to format text.

RETURN VALUES
The discount utility exits 0 on success, and >0 if an error occurs.

SEE ALSO
markdown(3), markdown(7), mkd-extensions(7).

AUTHOR
David Parsons (orc@pell.chi.il.us)