Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Nov 2016 17:48:47 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r49651 - head/share/xml
Message-ID:  <201611081748.uA8HmluI020986@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611081748.uA8HmluI020986>