1 KHelpCenter documentation meta data structure
2 =============================================
4 KHelpCenter uses meta data files which describe the documentation available in
5 the system. Each document is represented by a meta data file and shown as an
6 entry in the KHelpCenter navigation tree view. The meta data contains
7 information about title and short description of the document, the location of
8 the document and some more information like how to search the document and
9 translations of title and description. Document hierarchy is represented as
10 hierarchy of the meta data files. Directories are also described by a meta data
11 file which contains the same information as a document meta data file.
13 Format of the meta data files
14 -----------------------------
16 The meta files adhere to the Desktop Entry Standard
17 (http://www.freedesktop.org/Standards/desktop-entry-spec). Documentation
18 specific extensions are covered by an own namespace using the prefix "X-DOC-".
19 The following table describes all keys which are currently used by
24 Name string Title of document
25 Name[xx] string Translated title for language xx
26 Comment string Short description of document
27 Comment[xx] string Translated short description for
29 Icon string Name of icon for document
30 X-DocPath URI Location of document. In addition to the
31 standard URI schemes like http: and file:
32 all schemes which are supported through
33 kioslaves can be used. In particular the
34 following non-standard URI schemes are
36 help: KDE manual identified by app name
37 ghelp: GNOME manual identified by app name
40 cgi: output of CGI script
41 X-DocPath[xx] URI Language specific location for
43 Lang langcode Language of document
44 X-DOC-Identifier string Unique identifier for document, if this
45 entry is not present the base name of the
46 file is used as identifier
47 X-DOC-Indexer command Command used for creating a search index
49 The following symbols are replaced by the
52 X-DOC-IndexTestFile filename Name of file whose existence indicates
53 the existence of a usable search index
54 X-DOC-Search command Command used for searching, the output
55 of the command should be HTML which is
57 The following symbols in the command are
58 replaced by the corresponding values:
59 %k - Words to be searched for
60 %n - Maximum number of results
61 %m - Method for combining search words,
63 %l - Language of documents to be searched
64 %s - Scope of search. This is a list of
65 identifiers as given by the
66 X-DOC-Identifier entry or the bas
67 name of the desktop file if not
69 X-DOC-SearchMethod string If this entry is 'htdig' htdig is used to
70 index and search the document. The
71 Indexer, IndexTestFile and Search entries
72 aren't required in this case.
73 X-DOC-SearchEnabledDefault bool If set to 'true' the document is searched
74 by default, if set to 'false' it is not.
75 This setting is overridden by user
76 selected search scopes.
77 X-DOC-Weight int A number indicating the position of the
78 document within the list of siblings. A
79 greater weight indicates that the document
80 is 'heavier', thus shown below 'lighter'
81 documents. The default weight is 0.
82 X-KDE-KHelpcenter string If this entry is set to one of the
83 following values a set of documents
84 generated by other means than desktop file
85 meta info is inserted at the place
86 specified by the desktop file:
87 'apps' manuals of applications
89 'scrollkeeper' scrollkeeper docs
90 'kinfocenter' kinfocenter docs
91 'kcontrol' kcontrol module docs
92 'konqueror' konqueror plugin docs
93 'kioslave' kioslave docs
95 X-DOC-DocumentType string Type of document. The type is used to look
96 up corresponding search handlers.
101 A list of directories given by the config entry "MetaInfoDirs" in the "General"
102 group of the help center configuration file "khelpcenterrc" (at
103 $KDEDIRS/share/config) is scanned for desktop files. They are merged to a common
104 hierarchy. If the "MetaInfoDirs" entry is empty the directory at
105 $KDEDIRS/share/apps/khelpcenter/plugins is used.
110 The hierarchy of the documents shown in the help center is reflected by the
111 hierarchy of the desktop files in the filesystem. Directories can have an
112 associated desktop file with the name ".directory". It can contain all the
113 keys described above.
118 In addition to translation of meta information like title and short description
119 of documents which is contained in the meta file, translations of whole
120 documents are handled. Each translation of a document has an own desktop file.
121 The language of the document is indicated by adding the language code as
122 additional suffix to the filename of the desktop file. The language suffix
123 is added before the ".desktop" suffix (Example: 'apache.de.desktop' would be the
124 file name for the german translation of the apache documentation).
126 KHelpCenter shows only the documents whose language is contained in the list of
127 used languages configured for the desktop in the control center. A document
128 corresponding to a desktop file without language suffix is always shown.