appstream-glib
appstream-glib copied to clipboard
Add support for news-to-metainfo
Appstreamcli recently gained support to converting NEWS files to appstream-metadata/metainfo ones. While currently appstream-utils can do something like that, appstreamcli has some advantages:
- You can limit the number of releases to convert
- You can merge the resulting xml in the existing metainfo file, so you can have a workflow like this:
+------+ +-------------------+
| NEWS | | *.metainfo.xml.in |(localized, without releases info)
+--+---+ +---------+---------+
| |
+----------------+
v
appstreamcli news-to-metainfo --limit=3
+
|
v
+--+--------------+
| *.metainfo.xml | (with the las 3 releases info)
+-----------------+
The relevant code is in https://github.com/ximion/appstream/blob/master/src/as-news-convert.c, sadly I'm not proficient enough in C to make a MR