[Git][NTPsec/ntpsec][master] Link checker cleanup.
Eric S. Raymond
gitlab at mg.gitlab.com
Sat Dec 24 17:32:36 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
4126a75c by Eric S. Raymond at 2016-12-24T12:32:10-05:00
Link checker cleanup.
- - - - -
2 changed files:
- devel/linkcheck
- wscript
Changes:
=====================================
devel/linkcheck
=====================================
--- a/devel/linkcheck
+++ b/devel/linkcheck
@@ -1,19 +1,27 @@
#!/usr/bin/env python
#
-# linkcheck - check link integrity in the document tree
+# linkcheck - check link integrity in an asciidoc document tree
#
-# Run this script from docs/
+# Output is a list of unsatisfied references in the format of GCC
+# error messages, suitable for stepping through with Emacs compilation
+# mode.
+#
+# Optional argument is the root directory of the tree, otherwise it
+# is run from the corrent directory.
#
# SPDX-License-Identifier: BSD-2-clause
from __future__ import print_function, division
-import os, re
+import os, re, sys
boxanchor_re = re.compile(r"\[\[([a-z0-9_-]*)\]\]")
linkanchor_re = re.compile(r"anchor:([a-z0-9_-]*)\[\]")
refanchor_re = re.compile(r"link:([^.]*).html#([a-z0-9_-]*)")
-prefix = "docs/"
+if len(sys.argv) > 1:
+ prefix = sys.argv[1]
+else:
+ prefix = ""
def tabulate(path):
iostack.append((0, open(path)))
=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -251,7 +251,7 @@ def cxfreeze(ctx):
def linkcheck(ctx):
"Report references without anchors in the documentation."
- ctx.exec_command("devel/linkcheck")
+ ctx.exec_command("devel/linkcheck docs/")
# The following sets edit modes for GNU EMACS
# Local Variables:
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/4126a75c31d7c469d39f25e1e2ecde4a546a59a2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20161224/681a4acb/attachment.html>
More information about the vc
mailing list