After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 616509 - Man pages browsing
Man pages browsing
Status: RESOLVED OBSOLETE
Product: devhelp
Classification: Applications
Component: General
unspecified
Other All
: Normal enhancement
: ---
Assigned To: devhelp-maint
devhelp-maint
Depends on:
Blocks:
 
 
Reported: 2010-04-22 12:47 UTC by Michele Comignano
Modified: 2021-05-17 15:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michele Comignano 2010-04-22 12:47:57 UTC
Using devhelp I'm feeling the lack of man pages.
Would be great if devhelp managed unix man pages browsing too!

A man pages "book" divided in numbered sections each of whom containing the man pages for that section.

Devhelp is great anyway this is only my modest suggestion.

Thanks.
Comment 1 Sébastien Wilmet 2015-05-18 11:18:48 UTC
It's better for an application to be specialized in only one thing. Do one thing but do it well™. Devhelp is specialized for GTK-Doc APIs, and I think it should not be extended. If you want, you can create a GUI application to read man pages.
Comment 2 Sébastien Wilmet 2017-06-29 10:41:44 UTC
For manpage browsing to work, without any change in the Devhelp code:
- Devhelp index files could be generated;
- and have an HTML version for each manpage.
Comment 3 Sébastien Wilmet 2018-01-21 17:05:48 UTC
(In reply to Sébastien Wilmet from comment #1)
> It's better for an application to be specialized in only one thing. Do one
> thing but do it well™. Devhelp is specialized for GTK-Doc APIs, and I think
> it should not be extended. If you want, you can create a GUI application to
> read man pages.

Actually I've changed my mind over the years. It's better to keep Devhelp as a generic API browser (if adding GNOME-specific features in the future, it should be possible to disable those features, or ask the user whether to enable them). And it would be great to have manpages in Devhelp. But it's better for Devhelp to support only one index file format (*.devhelp2 files), to keep things simple.

In the git repo there is the man2xml.py script in the attic/ directory. It could be worthwhile to look in more details at that script.
Comment 4 Michele Comignano 2018-01-22 21:17:36 UTC
Supporting one index file format is a good point for maintainability.
Reading at man2xml.py I understand it creates an index for man pages.
Is that something that could be done at start to build the graphical tree on the left side? I the translation code from man page to devhelp render-able content available?
Comment 5 Sébastien Wilmet 2018-01-24 09:41:35 UTC
(In reply to Michele Comignano from comment #4)
> Reading at man2xml.py I understand it creates an index for man pages.

I think it creates an index but with the format version 1 (which is now deprecated), so the code needs to be a little adapted for the version 2.

> Is that something that could be done at start to build the graphical tree on
> the left side?

Creating on-the-fly *.devhelp2 index files + HTML files could be done during Devhelp startup if it doesn't take too much time. The advantage would be to always have the latest versions (of the man pages currently installed on the system). But it can be more difficult to make it work with Flatpak (with Flatpak it's generally not a good idea to look at host files).

> I the translation code from man page to devhelp render-able
> content available?

The man pages need to be available in HTML. I'm sure there are various tools that can do that.

In GNOME, Yelp can do that:
$ yelp man:cp

looking at the code (libyelp/yelp-man-document.c), it seems that yelp uses yelp/xslt/man2html.xsl to generate on-the-fly the HTML.
Comment 6 Sébastien Wilmet 2018-08-18 16:19:28 UTC
After playing a bit with man2html (with the man2html-core Fedora package), I think a good solution would be to write a script that generates all HTML pages for the man-pages sections 2 and 3 of the Linux man-pages project:

https://www.kernel.org/doc/man-pages/

And the script writes the Devhelp index file too, of course, and install the files in a location where Devhelp will see it.

Once this works, it could then be integrated into the Devhelp UI. Except if in the future Devhelp has a books download infrastructure, in that case the man-pages book would just be another book to download.

By taking the man-pages from the Linux man-pages project, it's a curated list, normally the links will work, etc.
Comment 7 GNOME Infrastructure Team 2021-05-17 15:49:44 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/devhelp/-/issues/38.