File: sect-Metadata-InputMethod.html

package info (click to toggle)
appstream 0.7.3-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,660 kB
  • ctags: 2,618
  • sloc: xml: 10,142; ansic: 8,362; cpp: 1,905; python: 236; sh: 58; makefile: 13
file content (53 lines) | stat: -rw-r--r-- 7,661 bytes parent folder | download
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>2.5. Input Methods</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta name="generator" content="publican 3.2.1" /><meta name="package" content="AppStream-AppStream-0.7-en-US-0.0-0" /><link rel="home" href="index.html" title="AppStream" /><link rel="up" href="chap-Metadata.html" title="Chapter 2. Upstream Metadata" /><link rel="prev" href="sect-Metadata-Codec.html" title="2.4. Codecs" /><link rel="next" href="chap-DistroData.html" title="Chapter 3. Distribution Metadata and Services" /></head><body><p id="title"><a class="left" href="http://www.freedesktop.org/wiki/Distributions/AppStream/"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="http://www.freedesktop.org/software/appstream/docs/"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="sect-Metadata-Codec.html"><strong>Prev</strong></a></li><li class="home">AppStream</li><li class="next"><a accesskey="n" href="chap-DistroData.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="sect-Metadata-InputMethod"></a>2.5. Input Methods</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="spec-imdata-introduction"></a>2.5.1. Introduction</h3></div></div></div><div class="para">
			It is a nice feature for a software center to allows users the installation of additional input-methods. This meta-info specification describes how metadata about input-methods should be structured.
		</div><div class="para">
			Software components providing an input-method can ship one or more files in <code class="filename">/usr/share/appdata/%{id}.metainfo.xml</code>.
		</div><div class="para">
			Input-method metadata files can - just likle all other metainfo files - be translated. See the section about translation for more information about that.
		</div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="spec-imdata-example"></a>2.5.2. Example file</h3></div></div></div><div class="para">
			The input-method meta-info file should look like this:
		</div><pre class="programlisting">
<span class="perl_Keyword">&lt;?xml</span> version="1.0" encoding="UTF-8"<span class="perl_Keyword">?&gt;</span>
<span class="perl_Keyword">&lt;component</span><span class="perl_Others"> type=</span><span class="perl_String">"inputmethod"</span><span class="perl_Keyword">&gt;</span>
  <span class="perl_Keyword">&lt;id&gt;</span>mathwriter-ibus.db<span class="perl_Keyword">&lt;/id&gt;</span>
  <span class="perl_Keyword">&lt;metadata_license&gt;</span>CC0<span class="perl_Keyword">&lt;/metadata_license&gt;</span>
  <span class="perl_Keyword">&lt;name&gt;</span>Mathwriter<span class="perl_Keyword">&lt;/name&gt;</span>
  <span class="perl_Keyword">&lt;summary&gt;</span>Math symbols input method<span class="perl_Keyword">&lt;/summary&gt;</span>
  <span class="perl_Keyword">&lt;description&gt;</span>
    <span class="perl_Keyword">&lt;p&gt;</span>
      The input method is designed for entering mathematical symbols.
    <span class="perl_Keyword">&lt;/p&gt;</span>
    <span class="perl_Keyword">&lt;p&gt;</span>
      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.
    <span class="perl_Keyword">&lt;/p&gt;</span>
  <span class="perl_Keyword">&lt;/description&gt;</span>
  <span class="perl_Keyword">&lt;url</span><span class="perl_Others"> type=</span><span class="perl_String">"homepage"</span><span class="perl_Keyword">&gt;</span>https://github.com/mike-fabian/ibus-table-others<span class="perl_Keyword">&lt;/url&gt;</span>
<span class="perl_Keyword">&lt;/component&gt;</span>
</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="spec-imdata-filespec"></a>2.5.3. File specification</h3></div></div></div><div class="para">
			Note that the XML root must have the <code class="literal">type</code> property set to <code class="code">inputmethod</code>. This clearly identified this metainfo document as describing an input-method instead of a generic software-component.
		</div><div class="variablelist"><dl class="variablelist"><dt><span class="term">&lt;id/&gt;</span></dt><dd><div class="para">
						For input-methods, the <code class="literal">%{id}</code> is the same name as the input-method's database filename.
					</div></dd><dt><span class="term">&lt;metadata_license/&gt;</span></dt><dd><div class="para">
						The <code class="code">&lt;metadata_license/&gt;</code> tag is required. See <a class="xref" href="chap-Metadata.html#sect-Metadata-GenericComponent">Section 2.1, “Generic Component”</a> for a description of this tag.
					</div></dd><dt><span class="term">&lt;name/&gt;</span></dt><dd><div class="para">
						Set a name for your input-method.
					</div></dd><dt><span class="term">&lt;summary/&gt;</span></dt><dd><div class="para">
						A short description of the input-method described in this metainfo file.
					</div></dd><dt><span class="term">&lt;description/&gt;</span></dt><dd><div class="para">
						Add a long description of the input-method.
					</div><div class="para">
						Do not assume the format is HTML. Only paragraph, ordered list and unordered list are supported at this time.
					</div></dd><dt><span class="term">&lt;screenshots/&gt;</span></dt><dd><div class="para">
						A screenshot may be included, showing the input-method in use in an application.
					</div><div class="para">
						Refer to <a class="xref" href="chap-Metadata.html#tag-screenshots">&lt;screenshots/&gt;</a> for a detailed description of this tag.
					</div></dd><dt><span class="term">&lt;url/&gt;</span></dt><dd><div class="para">
						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. See See <a class="xref" href="chap-Metadata.html#tag-url">&lt;url/&gt;</a> for a description of this tag.
					</div></dd><dt><span class="term">&lt;provides/&gt;</span></dt><dd><div class="para">
						This tag is described for generic components at <a class="xref" href="chap-Metadata.html#tag-provides">&lt;provides/&gt;</a> in detail.
					</div><div class="para">
						You can add one or more children of type <code class="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 <code class="literal">provides</code> tag for input-methods.
					</div></dd></dl></div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="sect-Metadata-Codec.html"><strong>Prev</strong>2.4. Codecs</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="chap-DistroData.html"><strong>Next</strong>Chapter 3. Distribution Metadata and Services</a></li></ul></body></html>