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 750534 - Allow multiple output formats
Allow multiple output formats
Status: RESOLVED OBSOLETE
Product: gobject-introspection
Classification: Platform
Component: g-ir-doctool
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-06-07 22:45 UTC by Philip Chimento
Modified: 2018-02-08 12:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Output formats (25.80 KB, patch)
2015-06-07 22:45 UTC, Philip Chimento
none Details | Review

Description Philip Chimento 2015-06-07 22:45:02 UTC
Created attachment 304740 [details] [review]
Output formats

I'd like to allow multiple output formats of g-ir-doc-tool via a --format switch. The default format would be "mallard" so the feature would be entirely optional and if you didn't use it, the current behaviour would remain unchanged.

My use case is outputting easy-to-scrape HTML for DevDocs [1] [2]. The HTML that yelp-build generates from the Mallard XML is not easy to scrape for various reasons, and scraping it is also fragile to changes in yelp-build's XSLT. To see an early draft of how I would be using this feature, see [3].

Tomeu's JSON output branch [4] can also be implemented as an output format if desired. The existing --write-sections-file option can be an output format as well. In this patch it is special-cased so as not to disturb the existing code, but it could just as well be implemented as an output format with templates. I could take a crack at that if there was any interest.

[1] http://devdocs.io
[2] https://github.com/Thibaut/devdocs
[3] https://github.com/ptomato/gobject-introspection/tree/wip/ptomato/devdocs
[4] https://git.gnome.org/browse/gobject-introspection/diff/giscanner/docmain.py?h=wip/docs-json&id=f5548c41883fe0b1a08493bf9cc075a0311d1ade
Comment 1 Philip Chimento 2015-06-07 22:47:25 UTC
Hmm, the renames in the patch don't get shown by Bugzilla's review interface. Note that I moved everything in giscanner/doctemplates to giscanner/doctemplates/mallard.
Comment 2 Colin Walters 2015-09-30 03:46:05 UTC
I'll be honest I haven't closely followed the documentation story lately.  How does this relate to the JSON branch?
Comment 3 Philip Chimento 2015-09-30 18:56:43 UTC
It doesn't relate to the JSON branch directly.

In [3] above I'm trying to generate output that can easily be scraped by Devdocs. It's the "spiritual successor" to the JSON branch, but instead of outputting something for which we have to write our own web app to display, we make use of an existing web app.
Comment 4 GNOME Infrastructure Team 2018-02-08 12:35:39 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/gobject-introspection/issues/134.