Moderation
1st, this doesn't belong in
Kernel & I need some feedback from about your goals in order to decide where to move it.
Are you focussed on one particular Linux distro or version. of *nix, or is this primarily a more general scripting question?
Attempt to actually help
From 1) above I see you know where to go to find them (on my system
/usr/share/man/man1 containing 1,446 files & soft links.)
2) tells me you have a good idea of the contents, & the problems their lack of uniformity causes.
I do have one off-the-wall, but possibly good, suggestion: Use the KDE "man:"
kioslave, possibly working together w/
wget or
cURL, to do the basic work for you.
The man kioslave allows you to put "man:<command>" into Konqueror's location bar & get the man page displayed in HTML. (It even turns the "SEE ALSO" entries into clickable links.)
Both
wget &
cURL can be called from a script, but I don't know if there is is any URL on
localhost for them to reference.
I also have never played w/ trying to operate Konqueror under the control of a script, so I have no idea how easy, or even possible that would be.
I do know that Konqueror's HTML display of man pages looks pretty uniform to me. I suspect that if you produce & save the .html files, you can probably
grep,
sed,
awk the info. you need out of them. As a last resort, you could even use
perl.
It all depends on the ease of automatically producing the .html man pages -- I doubt you want to individually "Save As" them.