[darcs-users] pandoc "plain text" output for darcs foo --help
Trent W. Buck
trentbuck at gmail.com
Tue Apr 7 08:02:19 UTC 2009
[CCing the pandoc maintainer, because this might be a feature
request.]
How do people feel about assuming man(1) is installed where they run
"darcs foo --help"?
Darcs currently has four output goals for its documentation:
- HTML and PDF (both currently via LaTeX);
- roff (via internal kludges) for the manpage; and
- plain text, for "darcs foo --help".
The first three are straightforward if Darcs documentation is stored
internally as reST (or as raw pandoc objects), converted at
compile-time using the pandoc library.
But Pandoc has no "plain text" output format.
I guess the approach normally used is either
- Suck it up and read the markdown source; or
- Generate HTML and stuff it through e.g. lynx -dump.
I think that instead of doing either of these things, when a user runs
"darcs foo --help", we use Pandoc to emit *roff* output, dump it to a
temp file, then run man(1) or groff on it to generate output on the
terminal.
The benefits of this approach are that Pandoc doesn't need to be
extended with a "plain text" output format, and that users get nice
pretty (e.g. bold and underlining) output when they run "darcs foo
--help". The down side is that it "darcs help --output" won't work
unless man(1) is installed.
Another alternative that I don't like would be to have "darcs foo
--help" write an HTML file and then run $BROWSER on it, which is kinda
like lynx -dump.
More information about the darcs-users
mailing list