On Wed, Aug 21, 2019 at 05:51:00PM +0000, Niels Thykier wrote: > Colin Watson: > > Does this make sense to you? If so, do you have any opinions on the > > interface? (I'm open to it being a new program rather than having to > > stuff even more complexity into man's command-line interface, which > > would also make it easy to detect whether the new interface is > > available.) > > So basically, I envision something like any of the 4 following usage > patterns (as a starting point): [...]
Thanks for the input. Something along these lines should be doable. I would be inclined to just take multiple file names and rely on xargs rather than bothering with "--null --files-from -". --suffix would, I think, want to strip off any compression extension before appending the suffix. > In all cases, I assume that compression is retained (e.g. if the file > was gzip compressed, then the output file should be as well. This is an > assumption in the current dh_installman as well) This is a bit fiddly: man-db currently knows how to decompress files but never needs to compress them. Are you sure this is necessary? Firstly, dh_compress is normally run after dh_installman; secondly, as far as I can see this is *not* in fact an assumption in the current dh_installman, and indeed it takes care to remove compressed pages before renaming the (uncompressed) output files over the input files. > The tool could be man itself with a special flag. Though I can > appreciate your comment about man's command-line interface being > complex, so it might indeed be better to do it as a separate tool for > that reason alone. I think I might actually extend manconv instead; it already does a certain amount of what you need here and just needs autodetection of input encoding and the multiple-files interface. manconv is currently installed in man-db's libexecdir, but I could easily move it onto $PATH. Since it isn't currently on $PATH, that would provide you with an easy way to test whether this new interface is supported (I could also add "manconv --has-bulk" or something, but I don't think it's necessary in this case). -- Colin Watson [cjwat...@debian.org]