You are not logged in.
Pages: 1
Hi,
I'm working on another revision of SliTaz's fake man, it will be faster to find relevant sections if they are not specified, and use a more complete source of man pages (linux.die.net).
I've come to wonder why, in order to display local html docs, we request retawq only to run [c]retawq --dump[/c], loosing all html markup & links... Since we're making a fake man, why not launch retawq for good if it is available?
Offline
Hi Lucas,
Retawq is nice and small. It gives good results when browsing linux.die.net man pages:
[c]retawq linux.die.net/man/1/ash[/c]
The only problem for me: how to exit it?? :-D
Ctrl+Z ?
In other hand, retawq not supported UTF-8. Really? Yes.
We can use [c]man[/c] to read local documentation in HTML format:
[c]man tazpkg[/c]
Here, as I found from [c]/usr/share/man[/c] sources, HTML is dumped using retawq. The only problem here is: lines of text is half-filled because text is in UTF-8 and each Cyrillic symbol here takes two bytes.
Let's direct open that HTML page in retawq:
[c]retawq file:///usr/share/doc/tazpkg/tazpkg.ru.html[/c]
Oh, no.
To summarize. The using of retawq is limited. You can use it to display English man pages from linux.die.net (but how to exit it?:)
But it is better not to use it everywhere in /usr/share/man.
Also, please take a look at my (weird) script in which I convert local HTML page to display it in the terminal:
[c]tazpkg -h gi[/c]
Regular expression is a "heart" of this script: http://hg.slitaz.org/tazpkg/file/879df9728956/modules/help#l140
Offline
Hi Aleksej,
The only problem for me: how to exit it??
Hit the M key -> opens the context menu.
Then select Quit :-D
EDIT: or uppercase Q
Offline
Oh, no.
LOL!
OK, so if retawq is available I'll use it to display online manpages, otherwise just to dump text.
If it's not, I can use your regexp to translate HTML to text. For online pages, w3.org offers a translation service that's not bad: http://www.w3.org/services/html2txt .
Offline

Note, regexp is far from ideal
It not processes unordered lists (that I added to html later, after I finished to develop regexp):
[c]<ul>
<li>...</li>
<li>...</li>
</ul>[/c]
You can find the bug executing next command:
[c]tazpkg -h convert[/c]
Offline
Noted, but I'm not sure I'd be able to patch it, it's so complicated. Maybe a small list of the meaning of your control codes (A^H etc.) would help.
Offline
OK, I'll write a couple of lines in the README.devel.
PS: http://hg.slitaz.org/tazpkg/rev/bbc6b0a453a7
Offline
Hi Aleksej,
Very nice "couple" of lines! I see you support description lists, do you plan to use them in the doc? (I see none in tazpkg.html.)
Offline
Hi Lucas,
No, I planned it early.
We can use the same code to get command line help in other SliTaz tools where dl may be useful.
Offline
Pages: 1
[ Generated in 0.026 seconds, 7 queries executed - Memory usage: 1.55 MiB (Peak: 1.77 MiB) ]