% Discount -- a C implementation of the Markdown markup language -- the command line interface % Jessica L. Parsons (orc@pell.portland.or.us) % #Discount ###The `markdown` program The `markdown` program is a trivial compiler that reads in a markdown file and writes out a html document or -- if you use the `-d` flag -- an outline showing the parse tree. It does have a few options; `-d` : is, as previously mentioned, the flag that makes markdown produce a parse tree instead of a html document. `-F ` : sets various [flags] that change how markdown works. The flags argument is a somewhat less than obvious bitmask -- for example, `-F 0x4` tells `markdown` to **not** do the [smartypants][] translations on the output. (there are cases -- like running the [test suite][] -- where this is a useful feature.) `-f ` : sets various [flags] that change how markdown works. Unlike `-F`, these are the names of the flags (you can get a list of the supported flags with the `-f?` option; supported flags + synonyms with `-Vf?` ) optionally prefixed with `no` or `-` to turn them off. To reuse the example to disable [smartypants][], you'd do `-f nopants` ("pants" is a synonym for "smarty" == smartypants.) `-o file` : tells markdown to write the output to *`file`* `-V` : tells you a markdown version number and how the package was configured. For example $ markdown -V markdown: discount 2.2.2 TAB=8 DEBUG tells you that this is markdown 2.2.2, and that the package was configured with support for sensible tabs & debugging malloc. `-VV` : is like `-V`, except it also returns the current values of many of the flags that can be set with `-f` or `-F`. [markdown]: http://daringfireball.net/projects/markdown [syntax]: http://daringfireball.net/projects/markdown/syntax [john gruber]: http://daringfireball.net [annotations]: /~orc/Code/annotations [smartypants]: http://daringfireball.net/projects/smartypants/ [test suite]: http://six.pairlist.net/pipermail/markdown-discuss/2006-June/000079.html [old test suite]: http://six.pairlist.net/pipermail/markdown-discuss/2004-December/000909.html [textmate]: http://macromates.com/ [pandoc]: http://johnmacfarlane.net/pandoc/ [vi]: http://thomer.com/vi/vi.html [Ryan Tomakyo]: http://tomayko.com/ [rdiscount]: http://tomayko.com/writings/ruby-markdown-libraries-real-cheap-for-you-two-for-price-of-one [reference dingus]: http://daringfireball.net/projects/markdown/dingus [plan9]: http://plan9.bell-labs.com/plan9/ [PHP markdown extra]: http://michelf.com/projects/php-markdown/extra/ [markdown extra definition list]: http://michelf.com/projects/php-markdown/extra/#def-list [footnotes]: http://michelf.com/projects/php-markdown/extra/#footnotes [Mike Schiraldi]: http://mikeschiraldi.blogspot.com/ [github]: http://github.com/Orc/discount [discount]: /~orc/Code/discount [css]: http://www.w3.org/Style/CSS/ 'See this page? This is how NOT to do styles' [command-line program]: program.html [API]: api.html [downloads]: downloads.html [flags]: api.html#flags