source: appstream-generator/docs/ @ 4841

Last change on this file since 4841 was 4841, checked in by Juanma, 2 years ago

Initial release

File size: 5.5 KB
1# Generator Project Configuration
3This document describes the options and fields which can be set in an `asgen-config.json` file.
5## JSON file example
7An example `asgen-config.json` file may look like this:
10"ProjectName": "Tanglu",
11"ArchiveRoot": "/srv/",
12"MediaBaseUrl": "",
13"HtmlBaseUrl": "",
14"Backend": "debian",
16  {
17    "validateMetainfo": true
18  },
20  {
21    "chromodoris":
22      {
23        "sections": ["main", "contrib"],
24        "architectures": ["amd64", "i386"]
25      },
26    "chromodoris-updates":
27        {
28          "dataPriority": 10,
29          "baseSuite": "chromodoris",
30          "sections": ["main", "contrib"],
31          "architectures": ["amd64", "i386"]
32        }
33  }
37## Description of fields
39### Toplevel fields
41Key | Comment
42------------ | -------------
43ProjectName | The name of your project or distribution which ships AppStream metadata.
44Backend | The backend that should be used to obtain the raw data. Defaults to `debian` if not set.
45MetadataType | The type of the resulting AppStream metadata. Can be one of `YAML` or `XML`. If omitted, the backend's default value is used.
46ArchiveRoot | A local URL to the mirror of your archive, containing the dists/ and pool/ directories
47MediaBaseUrl | The http or https URL which should be used in the generated metadata to fetch media like screenshots or icons
48HtmlBaseUrl | The http or https URL to the web location where the HTML hints will be published. (This setting is optional, but recommended)
49Oldsuites | This key exists to support migration from an alternative appstream generator. Given a list of suite names, the output HTML will link to `suitename/index.html`.
50Suites | Suites which should be recognized by the generator. Each suite has the components and architectures which should be searched for metadata as children. See below for more information.
51Features | Disable or enable selected generator features. For a detailed description see below.
52CAInfo | Set the CA certificate bundle file to use for SSL peer verification. If this is not set, the generator will use the system default.
53AllowedCustomKeys | Set which keys of the <custom/> tag are allowed to be propagated to the collection metadata output. This key takes a list of custom-key strings as value.
54ExportDirs | Set where to export data. The dictionary requires full paths set for the "Media", "Data", "Hints" or "Html" key. In case a value is missing, the default locations are used.
57### Suite fields
59The `Suites` field contains a dictionary of the suites which should be processed as value. These suites can contain a selection of properties:
61Key | Comment
62------------ | -------------
63sections | A list of sections the suite possesses. The "sections" are also known as archive components in the Debian world. *(required)*
64architectures | A list of architectures which should be processed for this suite. *(required)*
65baseSuite | An optional base suite name which should be used in addition to the child suite to resolve icons (only the `main` section of that suite is considered).
66dataPriority | An integer value representing the priority the data generated for this suite should have. Metadata with a higher priority will override existing data (think of an `-updates` suite wanting to override data shipped with the base suite). If this is not set, AppStream client tools will assume the priority being `0`.
67useIconTheme | Set a specific icon theme name with highest priority for this suite. This is useful if you want a different default icon theme providing icons for generic icon names (by default, the default themes of KDE and GNOME are used).
68immutable | If set to `true`, the state of the metadata files and exported data will be frozen, and no more changes to the data for this suite will be allowed. This only works if the `immutableSuites` feature is enabled.
71### Enabling and disabling features
73Several features of the metadata generator can be toggled to make it work in different scenarios.
74The following feature values are recognized, and can be enabled or disabled in the JSON document. If no explicit value is set for a feature, the generator will pick its default value, which is sane in most cases.
76Name | Comment
77------------ | -------------
78validateMetainfo | Validate the AppStream upstream metadata. The validation is slow, but will produce better feedback and issue hints if enabled. *Default: `ON`*
79processDesktop | Process .desktop files which do not have a metainfo file. If disabled, all data without metainfo file will be ignored. *Default: `ON`*
80noDownloads | Do not attempt any downloads. This will implicitly disable any handling of screenshots and possibly other features. Using this flag is discouraged. *Default: `OFF`*
81createScreenshotsStore | Mirror screenshots and create thumbnails of them in `media/`. This will yield the best experience with software-centers, and also allow full control over which screenshots are displayed. Disabling this will make clients pull screenshots from 3rd-party upstream servers. *Default: `ON`*
82optimizePNGSize | Use `optipng` to reduce the size of PNG images. Optipng needs to be installed. *Default: `ON`*
83metadataTimestamps | Write timestamps into generated metadata files. *Default: `ON`*
84immutableSuites | Allow suites to be marked as immutable. This is useful for distributions with fixed releases, but not for rolling release distributions or continuously updated repositories. *Default: `ON`*
85processFonts | Include font metadata and render fonts. *Default: `ON`*
Note: See TracBrowser for help on using the repository browser.