Open fedelibre opened 2 years ago
Hi! appstream-util
does not do an equivalent thing to appstreamcli
here. What you need to do is run appstream-util news-to-appdata ./NEWS
(no other parameters) and then the tool will print release description markup (and just that) to stdout.
Ok, I see.
Unfortunately it parses the NEWS file differently from appstreamcli, as it assumes that each item in a list is on a single line. In other words, every line within a section becomes a <li>element</li>
.
I'm working on a too long and verbose NEWS file. It's time to simplify it.
Can you help me with the sed script to copy the output of appstream-util in the right place of the appdata file? (i.e. before the last line </application>
or after the previous line <content_rating
)
I don't know how to use appstream-util stdout within the sed command. Here's what I tried:
appstream-util news-to-appdata NEWS | xargs sed -i '/^<content_rating/a STDOUT' /app/share/appdata/org.denemo.Denemo.appdata.xml
where STDOUT should be replaced by appstream-util stdout.
Or do you know better ways?
before the last line
</application>
If you have any <application>
tag in your metainfo file, you should seriously think about upgrading that file to a newer version of the AppStream spec - that stuff has been deprecated for about 8 years now ;-)
Honest question: Is there a reason why you can't use appstreamcli
, which makes you not require all sed
magic?
Honest question: Is there a reason why you can't use
appstreamcli
, which makes you not require allsed
magic?
The only reason is that appstreamcli is not available in Freedesktop SDK 21.08, so I have to build appstream and all its dependencies within my application manifest. Probably I'd better fo this. And maybe ask Freedesktop to include appstreamcli.
Wait, I've just realized there's a freedesktop appstream.cli extension!
Jup, but including it in the SDK directly is also probably a good idea (but I'll leave that call to the Flatpak people, I don't have enough experience with building runtimes yet to say that this is a good idea for sure ^^)
I'm trying to use the
appstream-util news-to-appdata
script present in the 21.08 Freedesktop SDK flatpak package, but I can't find any information about the syntax to be used. I'm using it within an application flatpak manifest, because upstream devs could not add the script in their build system.I tried this (taken from appstreamcli) but it didn't work:
Here's the short error message: