svn commit: r49651 - head/share/xml

Mathieu Arnold <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
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;
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-doc-all
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.