Today Richard Hughes released new version of appstream-glib – 0.2.0.
This is a big release with many features and bugfixes since previous version (0.7.0). Read NEWS file.
About some of them I will talk here.
- Merged createrepo_as with appstream-glib. A new experimental command ‘appstream-builder‘ has been added and can be used by distributors to build metadata. Normal users don’t need this or the shared library libappstream-bulder, and this can be split off into a subpackage by downstream if required.
appstream-builder has the same syntax as had createrepo_as. Just use new command.
- Add an m4 file to easily validate AppData and MetaInfo files
Now you can easy validate and install AppStream metadata. Let me give some notes, how to use it.
Add this to your configure.ac
:
APPSTREAM_XML
Now you have --disable-appstream-util
in configure options for disable validating your AppStream metadata.
Add something like this to your Makefile.am
in directory with your AppStream:
@APPSTREAM_XML_RULES@ appstream_in_files = gedit.appdata.xml.in appstream_XML = $(appstream_in_files:.xml.in=.xml) @INTLTOOL_XML_RULE@ EXTRA_DIST = $(appdata_in_files) CLEANFILES = $(appstream_XML)
Also add AppStream files to po/POTFILES.in
(if you are using Intltool).
- Add ‘appstream appdata-from-desktop’ to autogenerate a boilerplate file
Sure, there typo. Should be appstream-util appdata-from-desktop. Syntax:
foo.desktop bar.appdata.xml
or
foo.desktop.in bar.appdata.xml.in
This will create typical AppData file from .desktop
file.
- Add bash-completion files for appstream-builder and appstream-util
For this utils I’ve added bash-completion scripts. It’s appending any of available options/commands. For the commands it’s completing all allowed extensions. Note for appdata-from-desktop:
First argument completing with regexp .desktop(.in)?$
from existing files. Second arg completing from first with replace desktop
with appdata.xml
. This might help you to create appdata.xml with the same name and with the same path. Anyway you can choose another filename.
- Allow validating multiple files
Now you can execute something like this command
appstream-util validate /usr/share/appdata/*
It will validate all files which referenced above and print notes for each files with errors.
- Make the project translatable using transifex
Now you can translate appstream-glib using transifex. Start translating now!
If you found any bugs/feature requests/patches – feel free to create new issue on GitHub.