texinfo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: report with biggest nodes


From: Patrice Dumas
Subject: Re: report with biggest nodes
Date: Thu, 19 Jan 2012 22:24:39 +0100
User-agent: Mutt/1.4.2.2i

On Thu, Jan 19, 2012 at 11:00:38AM -0800, Karl Berry wrote:
> 
> I guess you did integrate it, with SORT_ELEMENT_COUNT[_COUNT_WORDS]?
> So we should remove texi_sort_elements_counts.pl and replace it with a
> one-liner like detexinfo?  Have to think on the name :).

It is not exactly the ame as detexinfo, since the SORT_ELEMENT_COUNT
output goes to a file selected using SORT_ELEMENT_COUNT.  Normal output
is also generated as with -E.  It should be redirected.  A trick is to
use -o '', as in that case the result is not output to a file, but
returned as a string, and then ignored in texi2any.  So could be like

  exec texi2any -o '' --set-init-variable SORT_ELEMENT_COUNT=- "$@"

Looking at the --version or --help of this command could be confusing, 
though, even more than with detexinfo --help, as the -o/--output 
would not apply to the output...  But maybe this is not really 
important.

>     But now other tools could use the code...
> 
> But it seems undesirable for other tools to duplicate the code yet
> again, so I'm glad you pushed it into tp.  If I followed what happened
> correctly.

That was not really my point, my point is that the 
  texi_sort_elements_count.pl
script could be used as a starting point for any command line program
written in perl that interfaces with the parser, and wants to use 
command line options consistent with texi2any.  Ok, I didn't said
any of this in my mail, but that was nevertheless the idea ;-).

-- 
Pat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]