File: metainfo-inputmethod.xml

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 (151 lines) | stat: -rw-r--r-- 4,972 bytes parent folder | download | duplicates (4)
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
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "AppStream.ent">
%BOOK_ENTITIES;
]>

<section id="sect-Metadata-InputMethod">
	<title>Input Methods</title>

	<section id="spec-imdata-introduction">
		<title>Introduction</title>
		<para>
			It is a nice feature for a software center to allows users the installation of additional input methods.
			This metainfo specification describes how metadata about input methods should be structured.
		</para>
		<para>
			Software components providing an input method can ship one or more files in
			<filename>/usr/share/metainfo/%{id}.metainfo.xml</filename>.
		</para>
		<para>
			Input method metadata files can – just like all other metainfo files – be translated. See the section about translation for more information.
		</para>
	</section>

	<section id="spec-imdata-example">
		<title>Example file</title>
		<para>
			The input method metainfo file should look like this:
		</para>
		<programlisting language="XML">
<![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<component type="inputmethod">
  <id>com.github.ibus.mathwriter-ibus.db</id>
  <metadata_license>FSFAP</metadata_license>
  <name>Mathwriter</name>
  <summary>Math symbols input method</summary>
  <description>
    <p>
      The input method is designed for entering mathematical symbols.
    </p>
    <p>
      Input methods are typing systems allowing users to input complex languages.
      They are necessary because these contain too many characters to simply be laid
      out on a traditional keyboard.
    </p>
  </description>
  <url type="homepage">https://github.com/mike-fabian/ibus-table-others</url>
</component>]]></programlisting>
	</section>

	<section id="spec-imdata-filespec">
		<title>File specification</title>
		<para>
			Note that the XML root must have the <literal>type</literal> property set to <literal>inputmethod</literal>.
			This clearly identifies this metainfo document as describing an input method instead of a generic software component.
		</para>

		<variablelist>
			<varlistentry id="tag-id-inputmethod">
			<term>&lt;id/&gt;</term>
			<listitem>
				<para>
					For input methods, the <literal>%{id}</literal> should follow the standard reverse-domain-name scheme.
					For the product name part, it is recommended to take the database filename of the input method.
				</para>
			</listitem>
			</varlistentry>

			<varlistentry>
			<term>&lt;metadata_license/&gt;</term>
			<listitem>
				<para>
					The <code>&lt;metadata_license/&gt;</code> tag is required. See <xref linkend="sect-Metadata-GenericComponent"/> for a description of this tag.
				</para>
			</listitem>
			</varlistentry>

			<varlistentry>
			<term>&lt;name/&gt;</term>
			<listitem>
				<para>
					Set a name for your input method.
				</para>
			</listitem>
			</varlistentry>

			<varlistentry>
			<term>&lt;summary/&gt;</term>
			<listitem>
				<para>
					A short description of the input method described in this metainfo file.
				</para>
			</listitem>
			</varlistentry>

			<varlistentry>
			<term>&lt;description/&gt;</term>
			<listitem>
				<para>
					Add a long description of the input method.
				</para>
				<para>
					Do not assume the format is HTML. Only paragraph, ordered list and unordered list are supported at this time.
				</para>
			</listitem>
			</varlistentry>

			<varlistentry>
			<term>&lt;screenshots/&gt;</term>
			<listitem>
				<para>
					A screenshot may be included, showing the input method in use in an application.
				</para>
				<para>
					Refer to <xref linkend="tag-screenshots"/> for a detailed description of this tag.
				</para>
			</listitem>
			</varlistentry>

			<varlistentry>
			<term>&lt;url/&gt;</term>
			<listitem>
				<para>
					This is a recommended tag for links of type <code>homepage</code>.
					Links of type <code>homepage</code> should be a link to the upstream homepage for the application.
					See See <xref linkend="tag-url"/> for a description of this tag.
				</para>
			</listitem>
			</varlistentry>

			<varlistentry>
			<term>&lt;provides/&gt;</term>
			<listitem>
				<para>
					This tag is described for generic components at <xref linkend="tag-provides"/> in detail.
				</para>
				<para>
					You can add one or more children of type <code>&lt;library/&gt;</code> in case you publish some additional shared libraries.
					If not, and there are no public binaries involved, you may omit the <literal>provides</literal> tag for input methods.
				</para>
			</listitem>
			</varlistentry>
		</variablelist>

		<para>
			For a component of type <literal>inputmethod</literal>, the following tags are required and must be present:
			<xref linkend="tag-id-inputmethod"/>, <xref linkend="tag-name"/>,
			<xref linkend="tag-summary"/>, <xref linkend="tag-metadata_license"/>.
		</para>
	</section>
</section>