File: chap-Quickstart.html

package info (click to toggle)
appstream 1.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,408 kB
  • sloc: ansic: 51,906; xml: 10,459; cpp: 4,721; python: 538; sh: 260; makefile: 24
file content (510 lines) | stat: -rw-r--r-- 48,788 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Metadata Quickstart | AppStream | AppStream 1.0</title><meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /><link rel="stylesheet" type="text/css" href="static/css/style.css" /><link rel="stylesheet" type="text/css" href="static/css/highlight.css" /><meta name="generator" content="DAPS 3.3.2" /><meta name="product-name" content="AppStream" /><meta name="product-number" content="1.0" /><meta name="book-title" content="AppStream" /><meta name="chapter-title" content="Chapter 5. Metadata Quickstart" /><meta name="description" content="These pages are designed to give upstream authors compressed information on how to write metadata for their applications. The documents describe just the basic information, and don't resemble the whole specification, to give upstreams an easy way to get started with AppStream. 5.1 For GUI applicatio…" /><link rel="home" href="index.html" title="AppStream" /><link rel="up" href="index.html" title="AppStream" /><link rel="prev" href="sect-AppStream-Misc-URIHandler.html" title="4.2. URI Handler" /><link rel="next" href="sect-Quickstart-Addons.html" title="5.2. For upstream projects providing addons" />
<script src="static/js/highlight.min.js" type="text/javascript"></script><script>

document.addEventListener('DOMContentLoaded', (event) => {
  document.querySelectorAll('.verbatim-wrap.highlight').forEach((block) => {
    hljs.highlightBlock(block);
  });
});
hljs.configure({
  useBR: false
});

</script></head><body class="offline js-off"><div class="bypass-block"><a href="#_content">Jump to content</a><a href="#_bottom-navigation">Jump to page navigation: previous page [access key p]/next page [access key n]</a></div><div id="_outer-wrap"><div id="_white-bg"><div id="_header"><div id="_logo"><a href="https://www.freedesktop.org/software/appstream/docs/"><img src="static/images/logo.png" alt="Logo" /><span>AppStream</span></a></div><div class="crumbs"><a class="book-link" href="index.html" title="AppStream"><span class="book-icon">AppStream</span></a><span> › </span><a class="crumb" href="chap-Quickstart.html">Metadata Quickstart</a></div><div class="clearme"></div></div></div><div id="_toolbar-wrap"><div id="_toolbar"><div id="_toc-area" class="inactive"><a id="_toc-area-button" class="tool" title="Contents" accesskey="c" href="index.html"><span class="tool-spacer"><span class="toc-icon">Contents</span><span class="clearme"></span></span><span class="tool-label">Contents</span></a><div class="active-contents bubble-corner"></div><div class="active-contents bubble"><div class="bubble-container"><h6>AppStream</h6><div id="_bubble-toc"><ol><li class="inactive"><a href="chap-AppStream-About.html"><span class="number">1 </span><span class="name">About AppStream</span></a></li><li class="inactive"><a href="chap-Metadata.html"><span class="number">2 </span><span class="name">Upstream Metadata</span></a></li><li class="inactive"><a href="chap-CatalogData.html"><span class="number">3 </span><span class="name">Catalog Metadata</span></a></li><li class="inactive"><a href="chap-AppStream-Misc.html"><span class="number">4 </span><span class="name">Miscellaneous</span></a></li><li class="inactive"><a href="chap-Quickstart.html"><span class="number">5 </span><span class="name">Metadata Quickstart</span></a></li><li class="inactive"><a href="chap-Validation.html"><span class="number">6 </span><span class="name">Data Validation</span></a></li><li class="inactive"><a href="chap-AppStream-ManualPages.html"><span class="number">7 </span><span class="name">Manual pages</span></a><ol>
	<a href="re01.html#id-1.8.3.1">appstreamcli</a>
	2012-2024Matthias Klumpp
	AppStream
	26 July,2012
	appstreamcli1appstreamcliHandle AppStream metadata formats and query AppStream dataappstreamcliCOMMAND<a href="re01.html#id-1.8.3.5">Description</a>
			This manual page documents briefly the appstreamcli command.
		
			appstreamcli 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.
		
			For more information about the AppStream project and the other components which are part of it, take a look at
			the AppStream pages at Freedesktop.org.
		<a href="re01.html#id-1.8.3.6">Options</a>get IDGet a component from the metadata pool by its identifier.ssearch TERMSearch the AppStream component pool for a given search term.what-provides TYPE TERM
						Return components which provide a given item. An item type can be specified using the
						TYPE parameter, a value to search for has to be
						supplied using the TERM parameter.
					Examples:
						Get components which handle the "text/xml" mediatype.
					
						appstreamcli what-provides mediatype "text/xml"
					
						Get component which provides the "libfoo.so.2" library.
					
						appstreamcli what-provides lib libfoo.so.2
					refreshrefresh-cache
						Trigger a database refresh, if necessary.
						In case you want to force the database to be rebuilt, supply the --force flag.
					This command must be executed with root permission.status
						Display various information about the installed metadata and
						the metadata cache.
					os-info
						Show information about the current operating system from the metadata
						index.
						This requires the operating system to provide a operating-system
						component for itself.
					dump ID
						Dump the complete XML descriptions of components with the given ID that were found in the
						metadata pool.
					validate FILES
						Validate AppStream XML metadata for compliance with the specification.
					
						Both XML metadata types, upstream and distro XML, are handled.
						The format type which should be validated is determined automatically.
					
						The --pedantic flag triggers a more pedantic
						validation of the file, including minor and style issues in the report.
					validate-tree DIRECTORY
						Validate AppStream XML metadata found in a file-tree.
					
						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.
					check-license LICENSE
						Test a license string or license expression for validity and display details about it.
					
						This will check whether the license string is considered to be valid for AppStream, and return
						a non-zero exit code if it is not. The command will also display useful information like the
						canonical ID of a license, whether it is suitable as license for AppStream metadata,
						and whether the license is considered to be for Free and Open Source software or proprietary software.
					
						AppStream will consider any license as Free and Open Source that is marked as suitable by either the
						Free Software Foundation (FSF), Open Source Initiative (OSI) or explicit license list
						of the Debian Free Software Guidelines (DFSG).
					install ID
						Install a software component by its ID using the package manager or Flatpak.
					
						This resolves the AppStream component ID to an installation candidate and then
						calls either the native package manager or Flatpak (if available) to install
						the component.
					remove ID
						Uninstall a software component by its ID using the package manager or Flatpak.
					
						This will uninstall software matching the selected ID using either the native
						package manager or Flatpak (if available).
					put FILE
						Install a metadata file into the right directory on the current machine.
					compare-versionsvercmp VER1 [CMP] VER2
						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.
					
						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 appstreamcli will exit with a non-zero exit status in case the comparison
						failed.
						The comparison operator can be one of the following:
					eq - Equal tone - Not equal tolt - Less thangt - Greater thanle - Less than or equal toge - Greater than or equal tonew-template TYPE FILE
						Create a metainfo file template to be used by software projects. The --from-desktop option can be used
						to use a .desktop file as template for generating the example file.
					
						The generated files contain example entries which need to be filed in with the actual desired values by the project author.
					
						The first TYPE parameter is the name of an AppStream component type. For a complete list check out
						the documentation or the help output
						of appstreamcli for this subcommand.
					make-desktop-file MI_FILE DESKTOP_FILE
						Create a XDG desktop-entry file from a metainfo file.
						If the desktop-entry file specified in DESKTOP_FILE already exists, it will get extended with
						the new information extracted from the metainfo file. Otherwise a new file will be created.
					
						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 --exec flag can be used
						to explicitly define a binary to launch. Other methods of launching the application are currently not supported.
					
						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 &lt;icon/&gt; tag of type "stock" to describe
						the stock icon that should be used as well as a &lt;categories/&gt; tag containing the categories the application should
						be placed in.
					news-to-metainfo NEWS_FILE MI_FILE [OUT_FILE]
						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 MI_FILE already exists, it will be augmented with the new release entries, otherwise the release entries
						will be written without any wrapping component.
						If [OUT_FILE] is specified, instead of acting on MI_FILE 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.
					
						The --format option can be used to enforce reading the input file in a specific format ("text" or "yaml") in case the format autodetection fails.
						The --limit option is used to limit the amount of release entries written (the newest entries will always be first).
					metainfo-to-news MI_FILE NEWS_FILE
						This command reverses the news-to-metainfo command and writes a NEWS file as text or YAML using the XML
						contained in a metainfo file. If NEWS_FILE is set to "-", the resulting data
						will be written to stdout instead of to a file.
					
						The --format option can be used to explicitly specify the output format ("yaml" or "text"). If it is not set,
						appstreamcli will guess which format is most suitable.
					convert FILE1 FILE1
						Converts AppStream XML metadata into its YAML representation and vice versa.
					compose
						Composes an AppStream metadata catalog from a directory tree with metainfo files.
						This command is only available if the org.freedesktop.appstream.compose
						component is installed.
						See appstreamcli-compose1
						for more information.
					--detailsPrint out more information about a found component.--no-colorDon't print colored output.--no-netDo not access the network when validating metadata.
						The same effect can be achieved by setting the AS_VALIDATE_NONET environment variable
						before running appstreamcli.
					--versionDisplay the version number of appstreamcli<a href="re01.html#id-1.8.3.7">See Also</a>pkcon1.<a href="re01.html#id-1.8.3.8">AUTHOR</a>
	This manual page was written by Matthias Klumpp matthias@tenstral.net.

	<a href="re02.html#id-1.8.4.1">appstreamcli compose</a>
	2020-2024Matthias Klumpp
	AppStream
	28 Aug,2020
	appstreamcli compose1appstreamcli-composeCompose AppStream metadata catalog from directory treesappstreamcli composeCOMMAND<a href="re02.html#id-1.8.4.5">Description</a>
			This manual page documents briefly the appstreamcli compose command.
		
			The appstreamcli compose tool is used to construct AppStream metadata catalogs from directory trees.
			The tool will also perform many related metadata generation actions, like resizing icons and
			screenshots and merging in data from referenced desktop-entry files as well as translation status
			information.
			Therefore, the tool provides a fast way to test how the final processed metadata for an application
			that is shipped to users may look like.
			It also provides a way to easily generate AppStream data for projects which do not need a more complex data
			generator like appstream-generator.
		
			In order for the appstreamcli compose command to be available, you may need to install the
			optional compose module for appstreamcli first.
		
			For more information about the AppStream project and the other components which are part of it, take a look at
			the AppStream pages at Freedesktop.org.
		<a href="re02.html#id-1.8.4.6">Options</a>SOURCE-DIRECTORIES
						A list of directories to process needs to be provided as positional parameters.
						Data from all directories will be combined into one output namespace.
					--origin NAME
						Set the AppStream data origin identifier. This can be a value like
						"debian-unstable-main" or "flathub".
					--result-root DIR
						Sets the directory where all generated output that is deployed to a user's
						machine is exported to. If this parameter is not set and we only have one
						directory to process, we use that directory as default output path.
					
						If both --data-dir and --icons-dir are
						set, --result-root is not necessary and no data will be
						written to that directory.
					--data-dir DIR
						Override the directory where the generated AppStream metadata catalog
						will be written to. Data will be written directly to this directory, and
						no supdirectories will be created (unlike when using --result-root
						to set an output location).
					--icons-dir DIR
						Override the directory where the cached icons are exported to.
					--hints-dir DIR
						Set a directory where hints reported generated during metadata processing
						are saved to. If this parameter is not set, no HTML/YAML hint reports
						will be saved.
					--media-dir DIR
						If set, creates a directory with media content (icons, screenshots, ...) that
						can be served via a webserver. The metadata will be extended to include information
						about these remote media.
					--media-baseurl URL
						The URL under which the contents of a directory set via --media-dir
						will be served. This value must be set if a media directory is created.
					--prefix DIR
						Set the default prefix that is used in the processed directories. If
						none is set explicitly, /usr is assumed.
					--print-report MODE
						Print the issue hints report (that gets exported as HTML and YAML
						document when --hints-dir was set) to the console
						in text form.
					
						Various print modes are supported: on-error only prints a
						short report if the run failed (default), short generates
						an abridged report that is always printed and full results
						in a detailed report to be printed.
					--no-partial-urls
						If set, all URLs in the generated data will be absolute and media_baseurl will not be used.
						This makes changing the media mirror harder without regenerating all data and is generally not recommended,
						to increase flexibility.
					--icon-policy POLICY-STRING
						Override the existing icon policy with a custom one. The icon policy sets how icons of
						different sizes should be dealt with. They can be in the icon cache only, be a remote icon in
						the media location or be both cached and available in the remote location.
					
						The icon-policy string is comprised of comma-separated %{size}x%{size}@%{scale}=%{state} statements.
						The size and scale are that of the respective icon, with the scale being allowed to be
						omitted if it is 1. The state can be one of remote, cached or
						cached-remote.
					
						By default, a policy of 48x48=cached,48x48@2=cached,64x64=cached,64x64@2=cached,128x128=cached-remote,128x128@2=cached-remote
						is selected.
					--allow-custom CUSTOM-KEY-NAMES
						By default, all custom entries set in MetaInfo input data are removed.
						This flag allows one to whitelist custom keys to be propagated to the final catalog output data.
						The custom-key names should be provided as a comma-separated list.
					--components COMPONENT-IDs
						Set a comma-separated list of AppStream component IDs that should be
						considered for the generated metadata. All components that exist in
						the input data but are not mentioned in this list will be ignored
						for the generated output.
					--no-colorDon't print colored output.--verboseDisplay extra debugging information--versionDisplay the version number of appstreamcli compose<a href="re02.html#id-1.8.4.7">See Also</a>
			appstreamcli1,
			appstream-generator1.
		<a href="re02.html#id-1.8.4.8">AUTHOR</a>
	This manual page was written by Matthias Klumpp matthias@tenstral.net.
</ol></li><li class="inactive"><a href="chap-AppStream-API.html"><span class="number">8 </span><span class="name">AppStream API Reference</span></a></li><li class="inactive"><a href="ix01.html"><span class="number"> </span><span class="name">Index</span></a></li></ol></div><div class="clearme"></div></div></div></div><div id="_nav-area" class="inactive"><div class="tool"><span class="nav-inner"><span class="tool-label">Navigation</span><a accesskey="p" class="tool-spacer" title="4.2. URI Handler" href="sect-AppStream-Misc-URIHandler.html"><span class="prev-icon">←</span></a><a accesskey="n" class="tool-spacer" title="5.2. For upstream projects providing addons" href="sect-Quickstart-Addons.html"><span class="next-icon">→</span></a></span></div></div></div></div><div id="_fixed-header-wrap" class="inactive"><div id="_fixed-header"><div class="crumbs"><a class="book-link" href="index.html" title="AppStream"><span class="book-icon">AppStream</span></a><span> › </span><a class="crumb" href="chap-Quickstart.html">Metadata Quickstart</a></div><div class="buttons"><a class="top-button button" href="#">Top</a><div class="button"><a accesskey="p" class="tool-spacer" title="4.2. URI Handler" href="sect-AppStream-Misc-URIHandler.html"><span class="prev-icon">←</span></a><a accesskey="n" class="tool-spacer" title="5.2. For upstream projects providing addons" href="sect-Quickstart-Addons.html"><span class="next-icon">→</span></a></div><div class="clearme"></div></div><div class="clearme"></div></div></div><div id="_content" class=""><div class="documentation"><div class="chapter" id="chap-Quickstart"><div class="titlepage"><div><div class="version-info">Applies to  <span class="productname">AppStream</span> <span class="productnumber">1.0</span></div><div><h1 class="title"><span class="number">5 </span><span xmlns:dm="urn:x-suse:ns:docmanager" class="name">Metadata Quickstart</span> <a title="Permalink" class="permalink" href="chap-Quickstart.html">#</a></h1></div></div></div><div class="line"><div class="toc"><dl><dt><span class="section"><a href="chap-Quickstart.html#sect-Quickstart-DesktopApps"><span class="number">5.1 </span><span class="name">For GUI application upstream maintainers</span></a></span></dt><dt><span class="section"><a href="sect-Quickstart-Addons.html"><span class="number">5.2 </span><span class="name">For upstream projects providing addons</span></a></span></dt><dt><span class="section"><a href="sect-Quickstart-Distros.html"><span class="number">5.3 </span><span class="name">For distributors packaging Appstream metadata</span></a></span></dt><dt><span class="section"><a href="sect-Quickstart-Translation.html"><span class="number">5.4 </span><span class="name">Translating Metadata</span></a></span></dt></dl></div></div><p>
		These pages are designed to give upstream authors compressed information on how to write metadata
		for their applications.
		The documents describe just the basic information, and don't resemble the whole specification, to
		give upstreams an easy way to get started with AppStream.
	</p><div class="sect1" id="sect-Quickstart-DesktopApps"><div class="titlepage"><div><div><h2 class="title" id="sect-Quickstart-DesktopApps"><span class="number">5.1 </span><span xmlns:dm="urn:x-suse:ns:docmanager" class="name">For GUI application upstream maintainers</span> <a title="Permalink" class="permalink" href="chap-Quickstart.html#sect-Quickstart-DesktopApps">#</a></h2></div></div></div><div class="sect2" id="qsr-app-introduction"><div class="titlepage"><div><div><h3 class="title" id="qsr-app-introduction"><span class="number">5.1.1 </span><span xmlns:dm="urn:x-suse:ns:docmanager" class="name">Introduction</span> <a title="Permalink" class="permalink" href="chap-Quickstart.html#qsr-app-introduction">#</a></h3></div></div></div><p>
			Every software center that exists allows the user to look at screenshots and a long description of the application before it is installed.
			For most users it allows them to answer the question <span class="quote">“<span class="quote">Do I want to install this application?</span>”</span>.
			Traditionally in Linux distributions, we have none of this data for the vast majority of our desktop user-installable applications.
			The packages-descriptions are describing all contents of a package, and not just a single application. They are also often written in a technical
			language and refer to other packages, which makes it hard for beginners to understand what the application they want to install really does.
			Additionally, if you are not using Debian or Ubuntu, the package descriptions are often untranslated.
			Also, packages do not provide some metadata users might be interested in before installing an application.
		</p><p>
			To solve this, we have defined a new data file, which the upstream project can optionally translate using the same technique as
			<a class="ulink" href="https://specifications.freedesktop.org/desktop-entry-spec/latest/" target="_blank">Desktop Entry files<span class="ulink-url"> (https://specifications.freedesktop.org/desktop-entry-spec/latest/)</span></a> or GSetting schemas.
			The application metainfo specification is a subset of the AppStream metadata (see <a class="xref" href="chap-CatalogData.html#sect-AppStream-XML" title="3.1. AppStream Catalog XML">Section 3.1, “AppStream Catalog XML”</a>) and extends
			the generic component metadata with fields specific for applications (see <a class="xref" href="chap-Metadata.html#sect-Metadata-GenericComponent" title="2.1. Generic Component">Section 2.1, “Generic Component”</a>).
		</p><p>
			The application-metainfo files override any values which are automatically fetched by the AppStream data generator.
			Applications can ship one or more files in <code class="filename">/usr/share/metainfo/%{id}.metainfo.xml</code>.
		</p><p>
			Application metainfo files can - just like all other metainfo files - be translated. See the section about translation for more information about that.
		</p><div id="id-1.6.3.2.6" class="admonition note normal"><img class="symbol" alt="Note" title="Note" src="static/images/icon-note.png" /><h6>Note</h6><p>
				All tags defined in the generic component specification are valid for components of type <code class="literal">desktop-application</code> as well,
				an application is just defined as a specialized component, which has the additional benefit of being displayed in a software-center application.
			</p></div><div id="id-1.6.3.2.7" class="admonition tip normal"><img class="symbol" alt="Tip" title="Tip" src="static/images/icon-tip.png" /><h6>Tip</h6><p>
				To get you started quickly, the AppStream project provides a web-based form to quickly generate valid metainfo XML for some of the most
				common use cases. Check it out on <a class="ulink" href="https://www.freedesktop.org/software/appstream/metainfocreator/#/" target="_blank">freedesktop.org/software/appstream/metainfocreator<span class="ulink-url"> (https://www.freedesktop.org/software/appstream/metainfocreator/#/)</span></a>.
			</p></div></div><div class="sect2" id="qsr-app-example"><div class="titlepage"><div><div><h3 class="title" id="qsr-app-example"><span class="number">5.1.2 </span><span xmlns:dm="urn:x-suse:ns:docmanager" class="name">Example file</span> <a title="Permalink" class="permalink" href="chap-Quickstart.html#qsr-app-example">#</a></h3></div></div></div><p>
			The file should contain something like this:
		</p><div class="verbatim-wrap highlight XML"><pre class="programlisting">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!-- Copyright 2013 First Lastname &lt;your@email.com&gt; --&gt;
&lt;component type="desktop-application"&gt;
  &lt;id&gt;org.gnome.gnome-power-statistics&lt;/id&gt;
  &lt;metadata_license&gt;FSFAP&lt;/metadata_license&gt;
  &lt;project_license&gt;GPL-2.0+&lt;/project_license&gt;
  &lt;name&gt;Power Statistics&lt;/name&gt;
  &lt;summary&gt;Observe power management&lt;/summary&gt;

  &lt;description&gt;
    &lt;p&gt;
      Power Statistics is a program used to view historical and current battery
      information and will show programs running on your computer using power.
    &lt;/p&gt;
    &lt;p&gt;Example list:&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;First item&lt;/li&gt;
      &lt;li&gt;Second item&lt;/li&gt;
    &lt;/ul&gt;
    &lt;p&gt;
      You probably only need to install this application if you are having problems
      with your laptop battery, or are trying to work out what programs are using
      significant amounts of power.
    &lt;/p&gt;
  &lt;/description&gt;

  &lt;launchable type="desktop-id"&gt;org.gnome.gnome-power-statistics.desktop&lt;/launchable&gt;

  &lt;screenshots&gt;
    &lt;screenshot type="default"&gt;
      &lt;caption&gt;The options dialog&lt;/caption&gt;
      &lt;image&gt;http://www.hughsie.com/en_US/main.png&lt;/image&gt;
    &lt;/screenshot&gt;
    &lt;screenshot&gt;
      &lt;image&gt;http://www.hughsie.com/en_US/preferences.png&lt;/image&gt;
    &lt;/screenshot&gt;
  &lt;/screenshots&gt;

  &lt;url type="homepage"&gt;http://www.gnome.org/projects/en_US/gnome-power-manager&lt;/url&gt;
  &lt;project_group&gt;GNOME&lt;/project_group&gt;

  &lt;provides&gt;
    &lt;binary&gt;gnome-power-statistics&lt;/binary&gt;
  &lt;/provides&gt;

  &lt;releases&gt;
    &lt;release version="3.12.2" date="2013-04-12"&gt;
      &lt;description&gt;
        &lt;p&gt;Fixes issues X, Y and Z&lt;/p&gt;
      &lt;/description&gt;
    &lt;/release&gt;
  &lt;/releases&gt;
&lt;/component&gt;</pre></div></div><div class="sect2" id="qsr-app-contents"><div class="titlepage"><div><div><h3 class="title" id="qsr-app-contents"><span class="number">5.1.3 </span><span xmlns:dm="urn:x-suse:ns:docmanager" class="name">Recommended metadata file contents</span> <a title="Permalink" class="permalink" href="chap-Quickstart.html#qsr-app-contents">#</a></h3></div></div></div><p>
			This is a list of tags you might want to define for your application. For a full list of all possible tags, take a look at
			the definition of a generic component (<a class="xref" href="chap-Metadata.html#spec-component-filespec" title="2.1.3. XML Specification">Section 2.1.3, “XML Specification”</a>) and an application-component (<a class="xref" href="sect-Metadata-Application.html#spec-appdata-filespec" title="2.3.2. File specification">Section 2.3.2, “File specification”</a>).
		</p><div class="variablelist"><dl class="variablelist"><dt id="id-1.6.3.4.3.1"><span class="term">&lt;id/&gt;</span></dt><dd><p>
					The <code class="code">&lt;id/&gt;</code> tag value contains the unique identifier for this application. It is usually modeled after the .desktop filename
					and follows a reverse-DNS scheme. For the full naming guidelines see <a class="xref" href="chap-Metadata.html#tag-id-generic">&lt;id/&gt;</a>.
				</p><p>
					Example: If your application's <code class="filename">.desktop</code> file is named <code class="filename">org.example.FooBar.desktop</code>, a good component-id would be
					<code class="code">org.example.FooBar</code>.
				</p></dd><dt id="id-1.6.3.4.3.2"><span class="term">&lt;metadata_license/&gt;</span></dt><dd><p>
					The <code class="code">&lt;metadata_license/&gt;</code> tag is indicating the content license that you are releasing the one
					metainfo file under. This is not typically the same as the project license. Omitting the license value can result
					in your data not being incorporated into the distribution metadata (so this is a required tag).
				</p><p>
					A <a class="ulink" href="https://en.wikipedia.org/wiki/Permissive_software_licence" target="_blank">permissive<span class="ulink-url"> (https://en.wikipedia.org/wiki/Permissive_software_licence)</span></a> license ensures your data can
					be combined with arbitrary other data in one file, without license conflics (this means copyleft licenses like the GPL are
					not suitable as metadata license).
					Possible license identifiers include:
				</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>FSFAP</p></li><li class="listitem"><p>CC0-1.0</p></li><li class="listitem"><p>CC-BY-3.0</p></li><li class="listitem"><p>CC-BY-SA-3.0</p></li><li class="listitem"><p>GFDL-1.3</p></li><li class="listitem"><p>MIT</p></li></ul></div><p>
					The license codes correspond to the identifiers found at the <a class="ulink" href="http://spdx.org/licenses/" target="_blank">SPDX OpenSource License Registry<span class="ulink-url"> (http://spdx.org/licenses/)</span></a>.
					Take a look at <a class="xref" href="chap-Metadata.html#tag-metadata_license">&lt;metadata_license/&gt;</a> for more details about this tag.
				</p><p>
					If you are unsure about which license to pick, the <a class="ulink" href="https://spdx.org/licenses/FSFAP.html" target="_blank">FSFAP<span class="ulink-url"> (https://spdx.org/licenses/FSFAP.html)</span></a> or FSFUL license statement is usually
					a good choice, as it is short and safe to combine with other licenses.
				</p></dd><dt id="id-1.6.3.4.3.3"><span class="term">&lt;project_license/&gt;</span></dt><dd><p>
					The <code class="literal">&lt;project_license/&gt;</code> tag is indicating the license(s) this application is released under.
					Take a look at the specification of the <a class="xref" href="chap-Metadata.html#tag-project_license">&lt;project_license/&gt;</a> tag for details on how to properly use it.
				</p></dd><dt id="id-1.6.3.4.3.4"><span class="term">&lt;name/&gt;</span></dt><dd><p>
					It is highly recommended to have this tag present and contain a name of your application as value.
				</p><p>
					In theory you can omit this tag and have the AppStream generator of a Linux distribution automatically use the <code class="literal">Name</code> field
					of the associated <code class="filename">.desktop</code> file (In which case one <a class="xref" href="chap-Quickstart.html#qsr-app-launchable-info">&lt;launchable/&gt;</a> tag must be present).
					However, a large amount of tools expect the metainfo file to be complete and self-sufficient now, which is why omitting this tag will render it
					invalid for tools like Flatpak and others use cases which do not involve a metadata preprocessing step.
				</p><p>
					If no <code class="literal">name</code> tag (and no <code class="literal">Name</code> desktop-entry field) is present, the metadata
					is considered invalid and will be ignored by the AppStream generator.
				</p></dd><dt id="id-1.6.3.4.3.5"><span class="term">&lt;summary/&gt;</span></dt><dd><p>
					It is highly recommended to have this tag present and contain a brief summary of what your application is about.
				</p><p>
					In theory you can omit this tag and have the AppStream generator of a Linux distribution automatically use the <code class="literal">Comment</code> field
					of the associated <code class="filename">.desktop</code> file (In which case one <a class="xref" href="chap-Quickstart.html#qsr-app-launchable-info">&lt;launchable/&gt;</a> tag must be present).
					However, a large amount of tools expect the metainfo file to be complete and self-sufficient now, which is why omitting this tag will render it
					invalid for tools like Flatpak and others use cases which do not involve a metadata preprocessing step.
				</p><p>
					If no <code class="literal">summary</code> tag (and no <code class="literal">Comment</code> desktop-entry field) is present, the metadata
					is considered invalid and will be ignored by the AppStream generator.
				</p></dd><dt id="id-1.6.3.4.3.6"><span class="term">&lt;description/&gt;</span></dt><dd><p>
					The long description is an important part of the file. Important things to consider when writing the application description:
				</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>Include 2-3 paragraphs of interesting easy to read prose.</p></li><li class="listitem"><p>Ensure you provide a description of what the application actually does.</p></li><li class="listitem"><p>Describe any important features.</p></li><li class="listitem"><p>Do not use possily trademarked product names when refering to competitors.</p></li><li class="listitem"><p>Break down each paragraph into easily translated paragraphs.</p></li><li class="listitem"><p>Use lists sparingly.</p></li><li class="listitem"><p>Never refer to installable items as packages.</p></li><li class="listitem"><p>Never start the first sentence with "This application..."</p></li><li class="listitem"><p>Try not use more than 100 words.</p></li><li class="listitem"><p>Do not be too geeky. Aim for an intelligent semi-technical reader.</p></li><li class="listitem"><p>Don't mention what language an application is written in, users don't care</p></li><li class="listitem"><p>Only mention what the application can do now, rather than what is planned</p></li></ul></div><p>
					Do not assume the format is HTML. Only paragraph, ordered list and unordered list are supported at this time, as well as emphasis and inline code.
					See <a class="xref" href="chap-Metadata.html#tag-description">&lt;description/&gt;</a> for more information.
				</p><p>
					In metainfo files, this tag should be translated by-paragraph, meaning that in a translated file, each translated <code class="literal">&lt;p/&gt;</code> child
					has a language property.
				</p></dd><dt id="qsr-app-launchable-info"><span class="term">&lt;launchable/&gt;</span> <a title="Permalink" class="permalink" href="chap-Quickstart.html#qsr-app-launchable-info">#</a></dt><dd><p>
				This tag indicates a possible method to launch the software. Usually you want the application to be launchable by its .desktop file ID.
			</p><p>
				The tag makes it possible for software centers to offer launching an application immediately after installation. It also connects the metainfo file
				with a .desktop file, so AppStream metadata generators and the distribution can absorb its metadata into the final AppStream output.
			</p><p>
				See <a class="xref" href="chap-Metadata.html#tag-launchable">&lt;launchable/&gt;</a> for a detailed description of the tag.
				Example:
			</p><div class="verbatim-wrap highlight XML"><pre class="programlisting">&lt;launchable type="desktop-id"&gt;org.gnome.Sysprof2.desktop&lt;/launchable&gt;</pre></div></dd><dt id="qsr-app-screenshots-info"><span class="term">&lt;screenshots/&gt;</span> <a title="Permalink" class="permalink" href="chap-Quickstart.html#qsr-app-screenshots-info">#</a></dt><dd><p>
					A screenshot presents your application to the outside world, and could be seen by hundreds or thousands of people.
				</p><p>
					The <code class="code">&lt;screenshots/&gt;</code> tag contains multiple <code class="code">&lt;screenshot/&gt;</code> children, where at least one of them must have the property
					<code class="code">type="default"</code> to indicate the application's primary screenshot. Every <code class="code">&lt;screenshot/&gt;</code> tag must have at least
					one <code class="code">&lt;image/&gt;</code> child, which may define the width and height of the referenced image in it's properties.
					The value of the <code class="code">&lt;image/&gt;</code> tag is a direct URL to a screenshot uploaded to a public location on the web.
				</p><p>
					Optionally, a <code class="code">&lt;screenshot/&gt;</code> tag may have a <code class="code">&lt;caption/&gt;</code> child, defining a short (not more than 180 characters!)
					description of what the user can see on the referenced screenshot.
				</p><p>
					Screenshots are an important part of how people choose which applications to install, so it's important to get them right.
					Consistent, good looking screenshots will make your application look more attractive and will expand your userbase.
					Consistent screenshots also provide a more predictable experience for people using the software center.
				</p><p>
					Screenshot size, shape and format:
				</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>
							Use an aspect ratio that works for the applications's UI, use 16:9 as long as that is sensible.
						</p></li><li class="listitem"><p>
							Screenshots should ideally be in the PNG format, but JPEG and WebP images are also fine. Keep in mind though that the images are converted into PNG
							in any case by the distributor of a software collection.
						</p></li><li class="listitem"><p>
							Do not scale screenshots below their original size.
						</p></li><li class="listitem"><p>
							Generally try to keep any window size small to make the content more visible when it is scaled down in software center frontends
						</p></li></ul></div><p>
					Basic guidelines for things to include (and not include) in your screenshots:
				</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>
							Use the default theme, icon set, font, and window decorations of your desktop environment. Avoid including your own tweaks to the standard distribution offering.
						</p></li><li class="listitem"><p>Screenshots should be taken with English as the display language.</p></li><li class="listitem"><p>
							Your default screenshot should give an overview of your application, and should show an entire application window.
							It can be combined with screenshots which show specific aspects of the application.
						</p></li><li class="listitem"><p>
							Screenshots should not show anything outside the application's windows (including the background wallpaper).
							If you are taking a screenshot of the whole window, use your screenshot tool's "window" mode (including any window borders in the screenshot, and ensuring that the resulting image has an
							alpha mask for the rounded corners).
						</p></li><li class="listitem"><p>
							Some applications, such as games, primarily run full screen. Screenshots of these applications should be taken with the application
							running full screen - there should be no visible window controls in the screenshot.
						</p></li><li class="listitem"><p>
							Use window screenshots with baked-in default shadows
						</p></li><li class="listitem"><p>
							Do not include content that might be considered offensive or controversial, and avoid showing personal information. Remember that your screenshots will be visible to the internet at large.
						</p></li></ul></div><p>
					Additional advice on how to take effective screenshots:
				</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>
							Each of your screenshots should focus on one thing and one thing only. Screenshot one window at a time, and avoid having
							overlapping windows or user interface elements.
							This will make it much easier for people to understand what you are showing them.
						</p></li><li class="listitem"><p>If a screenshot is demonstrating a single feature or aspect of the application, crop it to exclude irrelevant detail.</p></li><li class="listitem"><p>
							Screenshots often need to feature content, such as images, documents, web pages or videos. Don’t show your application in an ‘empty’
							state, and try and use high quality content which has positive associations and broad appeal.
						</p></li><li class="listitem"><p>
							In general, you shouldn't include the mouse pointer in your screenshots.
						</p></li></ul></div><p>
					Some advice for a good screenshot caption:
				</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>The caption should be short. Try not to use more than a few words to describe the image.</p></li><li class="listitem"><p>Try not to state the obvious: "Main window displaying an image" is something the user can see on the screenshot already.</p></li><li class="listitem"><p>Try not to repeat the application's name in the caption.</p></li><li class="listitem"><p>Do not end your caption with a fullstop.</p></li></ul></div><p>
					Some examples of good and bad screenshot choices:
				</p><div class="informaltable"><table class="informaltable" border="0"><colgroup><col width="0.5in" /><col width="0.5in" /></colgroup><tbody><tr><td>
									<div class="mediaobject"><a href="images/screxample_xterm-bad.png"><img src="images/screxample_xterm-bad.png" width="450" /></a><div class="caption"><p>
												<span class="bold"><strong>BAD:</strong></span> Not on Linux
											</p></div></div>
								</td><td>
									<div class="mediaobject"><a href="images/screxample_geany-good.png"><img src="images/screxample_geany-good.png" width="450" /></a><div class="caption"><p><span class="bold"><strong>GOOD</strong></span></p></div></div>
								</td></tr><tr><td>
									<div class="mediaobject"><a href="images/screxample_xmedcon-bad.png"><img src="images/screxample_xmedcon-bad.png" width="450" /></a><div class="caption"><p>
												<span class="bold"><strong>BAD:</strong></span> Not 16:9, shows the whole desktop and too many small windows
											</p></div></div>
								</td><td>
									<div class="mediaobject"><a href="images/screxample_xonotic-good.png"><img src="images/screxample_xonotic-good.png" width="450" /></a><div class="caption"><p>
												<span class="bold"><strong>GOOD:</strong></span> No window border required for fullscreen game
											</p></div></div>
								</td></tr><tr><td>
									<div class="mediaobject"><a href="images/screxample_gameconqueror-bad.png"><img src="images/screxample_gameconqueror-bad.png" width="450" /></a><div class="caption"><p>
												<span class="bold"><strong>BAD:</strong></span> Uses custom font, custom color theme and is not 16:9
											</p></div></div>
								</td><td>
									<div class="mediaobject"><a href="images/screxample_wireshark-good.png"><img src="images/screxample_wireshark-good.png" width="450" /></a><div class="caption"><p><span class="bold"><strong>GOOD</strong></span></p></div></div>
								</td></tr></tbody></table></div></dd><dt id="id-1.6.3.4.3.9"><span class="term">&lt;url/&gt;</span></dt><dd><p>
					This is a recommended tag for links of type <code class="code">homepage</code>.
					Links of type <code class="code">homepage</code> should be a link to the upstream homepage for the application.
				</p><p>
					For other possible values, tage a look at the tag's description at <a class="xref" href="chap-Metadata.html#tag-url">&lt;url/&gt;</a>.
				</p></dd><dt id="id-1.6.3.4.3.10"><span class="term">&lt;project_group/&gt;</span></dt><dd><p>
					This tag is described for generic components at <a class="xref" href="chap-Metadata.html#tag-project_group">&lt;project_group/&gt;</a>. You should use it for your application if appropriate.
				</p></dd><dt id="id-1.6.3.4.3.11"><span class="term">&lt;developer/&gt;</span></dt><dd><p>
					The <code class="code">&lt;developer/&gt;</code> tag is designed to represent the developers or project responsible for development of the project described in the metadata.
				</p><p>
					See <a class="xref" href="chap-Metadata.html#tag-developer">&lt;developer/&gt;</a> for its detailed generic description.
				</p></dd><dt id="id-1.6.3.4.3.12"><span class="term">&lt;update_contact/&gt;</span></dt><dd><p>
					The <code class="code">&lt;update_contact/&gt;</code> tag is an optional tag which can be added to provide an email address distributors can use to contact the project
					about invalid or incomplete metadata, or in case the specification has changed, about old metadata. It can also be used to ask general questions in case of
					an update of the component described in the metadata file. Spam protection using <code class="code">_AT_</code> is valid.
				</p><p>
					Example:
				</p><div class="verbatim-wrap highlight XML"><pre class="programlisting">&lt;update_contact&gt;developer_AT_example.com&lt;/update_contact&gt;</pre></div></dd></dl></div></div><div class="sect2" id="qsr-app-contents-suggestions"><div class="titlepage"><div><div><h3 class="title" id="qsr-app-contents-suggestions"><span class="number">5.1.4 </span><span xmlns:dm="urn:x-suse:ns:docmanager" class="name">Suggested metadata file contents</span> <a title="Permalink" class="permalink" href="chap-Quickstart.html#qsr-app-contents-suggestions">#</a></h3></div></div></div><p>
			It is useful to add these tags as well if they make sense for the described application.
			They are not strictly required to be present though.
		</p><div class="variablelist"><dl class="variablelist"><dt id="id-1.6.3.5.3.1"><span class="term">&lt;releases/&gt;</span></dt><dd><p>
					The application metainfo may include one <code class="code">&lt;releases/&gt;</code> tag, which
					has one or multiple <code class="code">&lt;release/&gt;</code> subnodes to define the version and release date of this
					application. For details, see <a class="xref" href="chap-Metadata.html#tag-releases">&lt;releases/&gt;</a> .
				</p><p>
					It is very useful to attach short release-notes to a <code class="code">&lt;release/&gt;</code> using the <code class="code">&lt;description/&gt;</code>
					subnode. These release-notes should contain brief information about what is new in the release, in a way which is understandable by non-technical users.
				</p></dd><dt id="id-1.6.3.5.3.2"><span class="term">&lt;provides/&gt;</span></dt><dd><p>
					This tag is described in detail for generic components at <a class="xref" href="chap-Metadata.html#tag-provides">&lt;provides/&gt;</a>.
				</p><p>
					If your application ships a binary in a location in the default <code class="envar">PATH</code>, it is useful to add at least a child of type
					<code class="code">&lt;binary/&gt;</code> to make it easily possible to find your application's metadata using the name of its binary.
				</p></dd></dl></div></div></div></div></div><div class="page-bottom"><div id="_bottom-navigation"><a class="nav-link" href="sect-Quickstart-Addons.html"><span class="next-icon">→</span><span class="nav-label">For upstream projects providing addons</span></a><a class="nav-link" href="sect-AppStream-Misc-URIHandler.html"><span class="prev-icon">←</span><span class="nav-label">URI Handler</span></a></div></div></div><div id="_inward"></div></div><div id="_footer-wrap"><div id="_footer"><p>©
        2025 
        Freedesktop.org, the AppStream Project</p></div></div></body></html>