appstream icon indicating copy to clipboard operation
appstream copied to clipboard

Documentation: Clarification regarding keywords

Open Alexander-Wilms opened this issue 1 year ago • 3 comments
trafficstars

https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-keywords only explains how to add keywords to a metainfo file.

I also found as_metadata_parse_desktop_data(), which matches the behavior seen on Flathub, where keywords specified in .desktop files are shown on application pages.

To avoid duplicating the keywords or not having them available to search for applications in a DE's application launcher, shouldn't the documentation recommend to put the keywords in the .desktop file or at least mention the option?

Alexander-Wilms avatar Jun 09 '24 20:06 Alexander-Wilms

For desktop applications if a desktop launchable is defined, it will pull categories, keywords etc. from the desktop file and merge them with the ones defined in metainfo. The final catalogue data will have no duplicates.

But not all applications are supposed to have a desktop launchable, so the metainfo file is the only place for them.

bbhtt avatar Jun 10 '24 01:06 bbhtt

The divergence does not really hurt as long as the catalogue merges both whenever launchable is there.

But yea the docs could be improved here. I have a line saying "defining then separately in Metainfo file is not strictly necessary" on Flathub docs.

bbhtt avatar Jun 10 '24 13:06 bbhtt