svn commit: r49651 - head/share/xml
Mathieu Arnold
mat at FreeBSD.org
Tue Nov 8 17:48:48 UTC 2016
Author: mat
Date: Tue Nov 8 17:48:47 2016
New Revision: 49651
URL: https://svnweb.freebsd.org/changeset/doc/49651
Log:
Add hints on how to add and sort man-ref entries.
Sponsored by: Absolight
Modified:
head/share/xml/man-refs.ent
head/share/xml/man-refs.pl
Modified: head/share/xml/man-refs.ent
==============================================================================
--- head/share/xml/man-refs.ent Tue Nov 8 17:09:34 2016 (r49650)
+++ head/share/xml/man-refs.ent Tue Nov 8 17:48:47 2016 (r49651)
@@ -21,6 +21,9 @@
lexicographical order by the entity (i.e., the dots used in place of
special characters should not be expanded when comparing).
+ This can be used to sort a section:
+ sed -E 's,.*refentrytitle>(.*)</refentrytit.*,\1 &,' | env LANG=C sort -u -k 1,1 | sed -Ee 's,[^ ]* [^ ]* ,,'
+
$FreeBSD$
-->
Modified: head/share/xml/man-refs.pl
==============================================================================
--- head/share/xml/man-refs.pl Tue Nov 8 17:09:34 2016 (r49650)
+++ head/share/xml/man-refs.pl Tue Nov 8 17:48:47 2016 (r49651)
@@ -1,5 +1,13 @@
#!/usr/bin/perl -w
# $FreeBSD$
+#
+# To get the entities sorted the same way as the current man-refs.ent file is, this command can be used:
+#
+# find -s /usr/share/man/ -name '*.gz' | \
+# sed -Ee 's,.*([[:digit:]])/(.*)\.[^.]+\.gz,\1 \2 &,' | \
+# env LANG=C sort -k 1,1n -k 2,2 | \
+# sed -e 's/.* //' | \
+# perl share/xml/man-refs.pl
use strict;
More information about the svn-doc-head
mailing list