Add some documentation.

This commit is contained in:
Eric S. Raymond 2007-04-26 21:28:02 +00:00
parent b9c08ea5d0
commit 2add57a040
3 changed files with 22 additions and 19 deletions

View file

@ -38,6 +38,7 @@ collisions:
@echo "# Report on duplicate resource files."
@./macroscope --collisions $(EXCLUDE) $(TOPDIR)
# Generate a reference page for the utility macros.
macro-reference.xhtml:
@cat helpheader.xhtml >macro-reference.xhtml
@./macroscope --extracthelp --exclude data/scenarios --exclude data/tutorial --exclude data/campaigns $(EXCLUDE) $(TOPDIR) >>macro-reference.xhtml

View file

@ -379,18 +379,18 @@ if __name__ == "__main__":
sys.stderr.write("""\
Usage: macroscope [options] dirpath
Options may be any of these:
-h, --help Emit this help message and quit
-c, --crossreference Report resolved macro references (implies -w 1)
-C, --collisions Report duplicate resource files
-d, --deflist Make definition list
-e reg, --exclude reg Ignore files matching
-f dir, --from dir Report only on macros defined under dir
-l, --listfiles List files that will be processed
-r ddd, --refcount=ddd Report only on macros w/references in ddd files
-u, --unresolved Report unresolved macro references
-w, --warnlevel Set to 1 to warn of duplicate definitions
--forced-used reg Ignore refcount 0 on names matching regexp
--extracthelp Extract help from macro definition comments.
-h, --help Emit this help message and quit
-c, --crossreference Report resolved macro references (implies -w 1)
-C, --collisions Report duplicate resource files
-d, --deflist Make definition list
-e regexp, --exclude regexp Ignore files matching the specified regular expression
-f dir, --from dir Report only on macros defined under dir
-l, --listfiles List files that will be processed
-r ddd, --refcount=ddd Report only on macros w/references in ddd files
-u, --unresolved Report unresolved macro references
-w, --warnlevel Set to 1 to warn of duplicate macro definitions
--forced-used regexp Ignore refcount 0 on names matching regexp
--extracthelp Extract help from macro definition comments.
The required dirpath argument may be a colon-separated directory list.
""")

View file

@ -13,8 +13,10 @@
# 2. If the messages look good, run without --dryrun; the old content
# will be left in backup files with a -bak extension.
# 3. Eyeball the changes with the --diff option.
# 4. Test the conversion.
# 5. Use either --clean to remove the -bak files or --revert to
# 4. Use macroscope, with a directory path including the Wesnoth mainline WML,
# to check that you have no unresolved references.
# 5. Test the conversion.
# 6. Use either --clean to remove the -bak files or --revert to
# undo the conversion.
#
# This script presently makes no effort to fix terrain codes outside of maps,
@ -509,16 +511,16 @@ def help():
Usage: upconvert [options]
Convert Battle of Wesnoth WML from older versions to newer ones.
Options may be any of these:
-h, --help Emit this help message and quit
-h, --help Emit this help message and quit.
-d, --dryrun List changes but don't perform them.
-o, --oldversion Specify version to begin with.
-v, --verbose -v lists changes.
-v -v warns of maps already converted.
-v -v -v names each file before it's processed
-v -v -v names each file before it's processed.
-v -v -v -v shows verbose parse details.
-c, --clean Clean up -bak files
-D, --diff Display diffs
-r, --revert Revert the conversion from the -bak files
-c, --clean Clean up -bak files.
-D, --diff Display diffs.
-r, --revert Revert the conversion from the -bak files.
""")
if __name__ == '__main__':