402 lines
10 KiB
HTML
402 lines
10 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of APPSTREAMCLI</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>APPSTREAMCLI</H1>
|
|
Section: appstreamcli (1)<BR>Updated: <BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
appstreamcli - Handle AppStream metadata formats and query AppStream data
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">
|
|
<B>appstreamcli</B> [<B>COMMAND</B>]
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<DD>This manual page documents briefly the
|
|
<B>appstreamcli</B>
|
|
command.
|
|
<P>
|
|
|
|
<B>appstreamcli</B>
|
|
is a small helper tool to work with AppStream metadata and access the AppStream component index from the command-line. The AppStream component index contains a list of all available software components for your distribution, matched to their package names. It is generated using AppStream XML or Debian DEP-11 data, which is provided by your distributor.
|
|
<P>
|
|
|
|
For more information about the AppStream project and the other components which are part of it, take a look at the AppStream pages at
|
|
m[blue]<B>Freedesktop.org</B>m[]<FONT SIZE="-2">[1]</FONT>.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<P>
|
|
|
|
<B>status</B>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
Display various information about the installed metadata and the metadata cache.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>get </B><B></B><I>ID</I>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
Get a component by it's identifier.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>s</B>, <B>search </B><B></B><I>TERM</I>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
Search the AppStream component database for a given search term.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>what-provides </B><B></B><I>TYPE</I><B> </B><B></B><I>TERM</I>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
Return components which provide a given item. An item type can be specified using the
|
|
<B></B><I>TYPE</I>
|
|
parameter, a value to search for has to be supplied using the
|
|
<B></B><I>TERM</I>
|
|
parameter.
|
|
<P>
|
|
Examples:
|
|
<P>
|
|
Get components which handle the "text/xml" mediatype.
|
|
<P>
|
|
<B>appstreamcli</B>
|
|
what-provides mediatype "text/xml"
|
|
<P>
|
|
Get component which provides the "libfoo.so.2" library.
|
|
<P>
|
|
<B>appstreamcli</B>
|
|
what-provides lib libfoo.so.2
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>refresh</B>, <B>refresh-cache</B>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
Trigger a database refresh, if necessary. In case you want to force the database to be rebuilt, supply the
|
|
<B>--force</B>
|
|
flag.
|
|
<P>
|
|
This command must be executed with root permission.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>dump </B><B></B><I>ID</I>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
Dump the XML description of a component with the given ID.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>validate </B><B></B><I>FILES</I>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
Validate AppStream XML metadata for compliance with the specification.
|
|
<P>
|
|
Both XML metadata types, upstream and distro XML, are handled. The filetype which should be validated is determined automatically.
|
|
<P>
|
|
The
|
|
<B>--pedantic</B>
|
|
flag triggers a more pedantic validation of the file, including minor and style issues in the report.
|
|
<P>
|
|
The
|
|
<B>--explain</B>
|
|
flag can be used to show more information and an explanation of the individual issue tag.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>validate-tree </B><B></B><I>DIRECTORY</I>
|
|
<DL COMPACT><DT id="9"><DD>
|
|
Validate AppStream XML metadata found in a file-tree.
|
|
<P>
|
|
This performs a standard validation of all found metadata, but also checks for additional errors, like the presence of .desktop files and validity of other additional metadata.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>install </B><B></B><I>ID</I>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
Install a software component by its ID.
|
|
<P>
|
|
This resolves the AppStream component ID to the package name which provides it and then calls the distribution's package manager to install the software.
|
|
<P>
|
|
This feature is experimental.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>put </B><B></B><I>FILE</I>
|
|
<DL COMPACT><DT id="11"><DD>
|
|
Install a metadata file into the right directory on the current machine.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>compare-versions </B><B></B><I>VER1</I><B> </B><B></B><I>[CMP]</I><B> </B><B></B><I>VER2</I>
|
|
<DL COMPACT><DT id="12"><DD>
|
|
Compare two version numbers. If two version numbers are given as parameters, the versions will be compared and the comparison result will be printed to stdout.
|
|
<P>
|
|
If a version number, a comparison operator and another version number are passed in as parameter, the result of the comparison operation will be printed to stdout, and
|
|
<B>appstreamcli</B>
|
|
will exit with a non-zero exit status in case the comparison failed. The comparison operator can be one of the following:
|
|
<P>
|
|
<DL COMPACT><DT id="13"><DD>
|
|
•
|
|
|
|
|
|
eq
|
|
- Equal to
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="14"><DD>
|
|
•
|
|
|
|
|
|
ne
|
|
- Not equal to
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="15"><DD>
|
|
•
|
|
|
|
|
|
lt
|
|
- Lesser than
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="16"><DD>
|
|
•
|
|
|
|
|
|
gt
|
|
- Greater than
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="17"><DD>
|
|
•
|
|
|
|
|
|
le
|
|
- Lesser than or equal to
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="18"><DD>
|
|
•
|
|
|
|
|
|
ge
|
|
- Greater than or equal to
|
|
</DL>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>new-template </B><B></B><I>TYPE</I><B> </B><B></B><I>FILE</I>
|
|
<DL COMPACT><DT id="19"><DD>
|
|
Create a metainfo file template to be used by software projects. The
|
|
<B>--from-desktop</B>
|
|
option can be used to use a .desktop file as template for generating the example file.
|
|
<P>
|
|
The generated files contain example entries which need to be filed in with the actual desired values by the project author.
|
|
<P>
|
|
The first
|
|
<I>TYPE</I>
|
|
parameter is the name of an AppStream component type. For a complete list check out
|
|
m[blue]<B>the documentation</B>m[]<FONT SIZE="-2">[2]</FONT>
|
|
or the help output of
|
|
<B>appstreamcli</B>
|
|
for this subcommand.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>make-desktop-file </B><B></B><I>MI_FILE</I><B> </B><B></B><I>DESKTOP_FILE</I>
|
|
<DL COMPACT><DT id="20"><DD>
|
|
Create a XDG desktop-entry file from a metainfo file. If the desktop-entry file specified in
|
|
<I>DESKTOP_FILE</I>
|
|
already exists, it will get extended with the new information extracted from the metainfo file. Otherwise a new file will be created.
|
|
<P>
|
|
This command will use the first
|
|
binary
|
|
mentioned in a
|
|
provides
|
|
tag of the component for the
|
|
Exec=
|
|
field of the new desktop-entry file. If this is not the desired behavior, the
|
|
<B>--exec</B>
|
|
flag can be used to explicitly define a binary to launch. Other methods of launching the application are currently not supported.
|
|
<P>
|
|
In order to generate a proper desktop-entry, this command assumes that not only the minimally required tags for an AppStream component are set, but also that it has an
|
|
<icon/>
|
|
tag of type "stock" to describe the stock icon that should be used as well as a
|
|
<categories/>
|
|
tag containing the categories the application should be placed in.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>news-to-metainfo </B><B></B><I>NEWS_FILE</I><B> </B><B></B><I>MI_FILE</I><B> </B><B></B><I>[OUT_FILE]</I>
|
|
<DL COMPACT><DT id="21"><DD>
|
|
This command converts a NEWS file as used by many open source projects into the XML used by AppStream. Since NEWS files are free text, a lot of heuristics will be applied to get reasonable results. The converter can also read a YAML version of the AppStream release description and convert it to XML as well. If the metainfo file
|
|
<I>MI_FILE</I>
|
|
already exists, it will be augmented with the new release entries, otherwise the release entries will be written without any wrapping component. If
|
|
<I>[OUT_FILE]</I>
|
|
is specified, instead of acting on
|
|
<I>MI_FILE</I>
|
|
the changed data will be written to the particular file. If any of the output filenames is set to "-", the output will instead be written to stdout.
|
|
<P>
|
|
The
|
|
<B>--format</B>
|
|
option can be used to enforce reading the input file in a specific format ("text" or "yaml") in case the format autodetection fails. The
|
|
<B>--limit</B>
|
|
option is used to limit the amount of release entries written (the newest entries will always be first).
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>metainfo-to-news </B><B></B><I>MI_FILE</I><B> </B><B></B><I>NEWS_FILE</I>
|
|
<DL COMPACT><DT id="22"><DD>
|
|
This command reverses the
|
|
<B>news-to-metainfo</B>
|
|
command and writes a NEWS file as text or YAML using the XML contained in a metainfo file. If
|
|
<I>NEWS_FILE</I>
|
|
is set to "-", the resulting data will be written to stdout instead of to a file.
|
|
<P>
|
|
The
|
|
<B>--format</B>
|
|
option can be used to explicitly specify the output format ("yaml" or "text"). If it is not set,
|
|
<B>appstreamcli</B>
|
|
will guess which format is most suitable.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>--details</B>
|
|
<DL COMPACT><DT id="23"><DD>
|
|
Print out more information about a found component.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>--no-color</B>
|
|
<DL COMPACT><DT id="24"><DD>
|
|
Don't print colored output.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>--no-net</B>
|
|
<DL COMPACT><DT id="25"><DD>
|
|
Do not access the network when validating metadata.
|
|
<P>
|
|
The same effect can be achieved by setting the
|
|
<B>AS_VALIDATE_NONET</B>
|
|
environment variable before running
|
|
<B>appstreamcli</B>.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>--version</B>
|
|
<DL COMPACT><DT id="26"><DD>
|
|
Display the version number of appstreamcli
|
|
</DL>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
|
|
pkcon (1).
|
|
<A NAME="lbAG"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<P>
|
|
|
|
This manual page was written by Matthias Klumpp
|
|
<<A HREF="mailto:matthias@tenstral.net">matthias@tenstral.net</A>>.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
<BR>
|
|
|
|
Copyright © 2012-2020 Matthias Klumpp
|
|
<BR>
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="27"> 1.<DD>
|
|
Freedesktop.org
|
|
<DL COMPACT><DT id="28"><DD>
|
|
<A HREF="https://www.freedesktop.org/wiki/Distributions/AppStream/">https://www.freedesktop.org/wiki/Distributions/AppStream/</A>
|
|
</DL>
|
|
|
|
<DT id="29"> 2.<DD>
|
|
the documentation
|
|
<DL COMPACT><DT id="30"><DD>
|
|
<A HREF="https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html">https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html</A>
|
|
</DL>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="31"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="32"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="33"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="34"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="35"><A HREF="#lbAF">SEE ALSO</A><DD>
|
|
<DT id="36"><A HREF="#lbAG">AUTHOR</A><DD>
|
|
<DT id="37"><A HREF="#lbAH">COPYRIGHT</A><DD>
|
|
<DT id="38"><A HREF="#lbAI">NOTES</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:06 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|