Commit graph

29 commits

Author SHA1 Message Date
Mike Swanson
eccaa5aace docgen: add Markdown output mode 2018-09-16 05:14:16 -07:00
Simon Howard
779d73e4fd docgen: Fix links when capitalization doesn't match.
This fixes a couple of broken links on the wiki page when capitalization
doesn't match page name (since capitalization is significant in Mediawiki).
2018-05-27 20:36:09 -04:00
Simon Howard
74e0e0c740 docgen: Fix wiki text generation.
This got broken by some recent changes. As part of this, remove a
now-deleted wiki page and also add a Makefile target to build the page
(for Doom, at least).
2018-05-27 20:25:43 -04:00
Simon Howard
9690b06aaa docgen: Fix spurious whitespace.
The text output mode included useless whitespace at the end of lines
and also occasionally generated lines containing nothing but
whitespace. Clean up the code that generates text output and fix
these bugs.
2018-03-16 21:48:55 -04:00
Simon Howard
ceefa5bbd9 docgen: Add 'game' and 'obscure' categories.
The "general options" section of the manpage(s) has become quite
cluttered, and some of the options are obscure things most people don't
need to know about. Move the really obscure ones into their own category
near the end of the manpage, and factor out the options used when
starting a game from the command line into their own section as well.

Also add some missing doc comments for Hexen command line options.
2018-03-16 21:25:20 -04:00
Jonathan Dowland
45880bd205 Implement suggestions from Fabian. Thanks! 2018-01-09 17:19:49 +00:00
Jonathan Dowland
32ccfe015a expand docgen/default.cfg.template substitutions
Move to a "substs" hash in docgen which contains pairs of strings
to substitute. Populate @GAME@, @GAME_UPPER@ and @CFGFILE@ based
on the game supplied via -g.

Make the corresponding substitutions in default.cfg.template. Now
all of {default,heretic,hexen,strife}.cfg.5 are correct for the
respective game.
2018-01-09 17:19:49 +00:00
Jonathan Dowland
c1f553b92a further manpage substitutions and fixes
Convert chocolate-setup.6 into a template file and generate outputs
based on @PROGRAM_PREFIX@.

Add @PACKAGE_SHORTNAME@ to the list of parameters handed to docgen
and make appropriate substitutions in the manpage templates.
2018-01-09 17:19:49 +00:00
Jonathan Dowland
e0b8a7e0a9 overhaul manpages, add parameters
This is in order to better support derivative engines.

Rework the manpages to be parameterized with @PROGRAM_PREFIX@ and
@PACKAGE_NAME@. Alter the `docgen` generator to substitute those
parameters. Supply those parameters via the autofoo Makefile.

Adjust the fixed path chocolate-server.6 to be generated from
server.template, similar to doom.template -> chocolate-doom.6.

Further work is required, not least renaming chocolate-setup.6,
but several further parameterizations.
2018-01-09 17:19:49 +00:00
Simon Howard
9401e974b2 docgen: Fix script.
Apparently caused by previous botched merge commit.
2017-01-30 23:00:41 -05:00
Simon Howard
c5af517b3b Merge remote-tracking branch 'origin/master' into sdl2-branch 2017-01-30 22:53:36 -05:00
Mike Swanson
765f864d84 man: make scripts Python2 compatible again.
My last commits broke functionality for Python2, but it's relatively
simple to fix.

open() becomes io.open() -- it effectively does nothing for Python3,
but for Python2 it uses a backported version of the open() call.

Python2 uses bytes and strings interchangably, but I needed to use
stdout.sys.buffer for writing arbitrary bytes data to stdout.
Conditionally call the appropriate stream depending on Python version.
2017-01-21 07:13:08 -08:00
Mike Swanson
d0c36735aa man: Make sure to add new lines in the last commit. 2017-01-19 13:03:00 -08:00
Mike Swanson
bf3747bfdd man/{docgen,simplecpp}: Force UTF-8 reading and writing regardless of locale
When encountering non-ASCII UTF-8 characters in source files (as
exists in Crispy Doom), the Python scripts would fail to work with
a UnicodeDecodeError if the locale was not a UTF-8 one (eg, the C
locale as encountered in chroot build environments).

Let's just use UTF-8 on both open() and replace print() statements with
sys.stdout.buffer.write().  This guarantees that all input and output is
UTF-8 regardless.
2017-01-19 12:48:35 -08:00
Simon Howard
aca532db25 docgen: Read included templates from relative path.
When interpreting a template file that uses the @include statement, we
must read the included file from a path relative to the first template
file, rather than relative to the working directory when invoking the
script. This will allow us to do out-of-tree builds.
2016-07-18 00:02:58 -04:00
Fabian Greffrath
ad37a8ff33 Bash-Completion: First attempt at programatically creating the parameters list 2015-10-26 18:44:30 +01:00
Mike Swanson
ad027ef6db man: Use \- to denote dashes. Fixes #512 2015-03-25 16:06:11 -07:00
Simon Howard
b1d51276a2 Split manpage.template into separate files for different games.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2614
2013-08-10 23:32:29 +00:00
Simon Howard
f0f56055d8 Initial docgen changes to generate manpages for Heretic, Hexen, Strife.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2568
2013-03-24 01:38:37 +00:00
Simon Howard
463bcf013c Add a M_CheckParmWithArgs function, that behaves like M_CheckParm but
also checks that extra options were provided on the command line (thanks
Sander van Dijk).

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2223
2010-12-18 23:55:07 +00:00
Simon Howard
167d4df40b Update Python scripts to work in Python 3.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2162
2010-11-09 16:10:52 +00:00
Simon Howard
0c2b0232b6 Don't sort config file variables alphabetically. Throw an exception for
unknown documentation comments.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1093
2008-02-26 22:10:06 +00:00
Simon Howard
3951c995eb Replace manpage header, footer, environment files with a single template
file. Generate documentation for the default.cfg and chocolate-doom.cfg
configuration files.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1091
2008-02-25 23:50:07 +00:00
Simon Howard
f5040263b6 Add environment variable section to manpage.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 996
2007-12-30 04:51:56 +00:00
Simon Howard
0054a2e16c Add a list of wiki pages to link to and automatically insert links.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 987
2007-12-13 23:04:58 +00:00
Simon Howard
21a82fa124 Add @vanilla tag for Vanilla doom command line options. Add missing
documentation for -nosound, -nomusic, -nosfx. Fix up some bugs with the
docgen wikitext output and allow control over output of Vanilla options.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 984
2007-12-13 22:26:16 +00:00
Simon Howard
b826c4691d Remove command line options from README; move to autogenerated CMDLINE
file.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 812
2006-12-26 18:01:25 +00:00
Simon Howard
2ac909b51f Fix up some text escaping errors. Add wikitext output for docgen.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 809
2006-12-25 02:40:14 +00:00
Simon Howard
0d3b41b4a0 Javadoc-style self-documenting system for command line options.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 806
2006-12-24 23:53:15 +00:00