~ubuntu-branches/ubuntu/saucy/dhelp/saucy-proposed

« back to all changes in this revision

Viewing changes to doc/dhelp.html

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Hornburg (Racke)
  • Date: 2002-04-21 15:57:26 UTC
  • Revision ID: james.westby@ubuntu.com-20020421155726-kthmtdcq5s9q3k6d
Tags: 0.5.11
* made "other documents" link relative (Closes: #82757)
* avoid Perl warnings if browser undefined
* really set the defaults for console/X browsers
* removed gnome-help-browser from list of X browsers (Closes: #143869,
        thanks to Thomas Langen <langen@langensoft.de> for reporting it)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<HTML>
 
2
<TITLE>dhelp</TITLE>
 
3
<BODY BGCOLOR=#FFFFFF>
 
4
<IMG SRC="debian.jpg" ALT="Debian GNU/Linux"><p>
 
5
<H1>dhelp</H1>
 
6
 
 
7
<H2>What's dhelp?</H2>
 
8
dhelp is an online help system for Debian GNU/Linux. A Debian package 
 
9
can register its HTML documents and dhelp builds an index of
 
10
all documents.
 
11
 
 
12
The user doesn't need a WWW server to browse the HTML tree.
 
13
 
 
14
<H2>How to use dhelp</H2>
 
15
If you have installed a WWW server on your system simply browse
 
16
<BLOCKQUOTE><TT><A HREF="http://localhost/doc/HTML/index.html">
 
17
http://localhost/doc/HTML/index.html</A></TT></BLOCKQUOTE><P>
 
18
 
 
19
If you haven't installed a WWW server use the dhelp command:
 
20
 
 
21
<BLOCKQUOTE>$ dhelp</BLOCKQUOTE>
 
22
 
 
23
<H2>The .dhelp file</H2>
 
24
 
 
25
Programs supporting dhelp have to install a <tt>.dhelp</tt> file
 
26
in every directory under <tt>/usr/share/doc</tt>. For every HTML file that 
 
27
should appear in the dhelp index the <tt>.dhelp</tt> file have to contain
 
28
the following section:<P>
 
29
 
 
30
<DL>
 
31
<DT><TT>&lt;item&gt;</TT>
 
32
<DT><TT>&lt;directory&gt;</TT>
 
33
<DD>Defines in which section of the index the document should be linked.
 
34
    I suggest that you use the same names like in <em>Section:</em>
 
35
    in <tt>control</tt>. For example for a game you would use
 
36
    <tt>games</tt>. A German document should linked to <tt>de/games</tt>
 
37
    and so on.
 
38
    You can find all supported sections in 
 
39
    <tt><A HREF=".dhelp">.dhelp</A></tt>. You can create additional
 
40
    sections if necessary.
 
41
<DT><TT>&lt;dirtitle&gt;</TT>
 
42
<DD>Defines the title of a new section. 
 
43
<DT><TT>&lt;linkname&gt;</TT>
 
44
<DD>This short text appears as link text in the index. This
 
45
    is typical the filename without the <tt>.html suffix</tt>.
 
46
<DT><TT>&lt;filename&gt;</TT>
 
47
<DD>The filename of the HTML file with a path relative to the
 
48
    <tt>.dhelp</tt> file. If your document is called
 
49
    <tt>/usr/share/doc/dhelp/test.html</tt> and the <tt>.dhelp</tt>
 
50
    is installed in <tt>/usr/share/doc/dhelp</tt> you must use
 
51
    <tt>test.html</tt>.
 
52
<DT><PRE>
 
53
&lt;description&gt;
 
54
...
 
55
&lt;/description&gt;
 
56
</PRE>
 
57
<DD>
 
58
A long description of the content of the document (optional).
 
59
<DT><TT>&lt;/item&gt;</TT>
 
60
</DL><P>
 
61
 
 
62
You can have only one tag per line! Something like the following will
 
63
not work:<P>
 
64
 
 
65
<PRE>
 
66
&lt;item&gt;&lt;directory&gt;de/foo
 
67
  &lt;dirtitle&gt;The foo section
 
68
  &lt;linkname&gt;foo
 
69
 &lt;filename&gt;foo.html
 
70
&lt;descrip&gt;foo foo foo&lt;/descrip&gt;&lt;/item&gt;
 
71
</PRE>
 
72
 
 
73
You have to use this:<P>
 
74
 
 
75
<PRE>
 
76
&lt;item&gt;
 
77
&lt;directory&gt;de/foo
 
78
&lt;dirtitle&gt;The foo section
 
79
&lt;linkname&gt;foo
 
80
&lt;filename&gt;foo.html
 
81
&lt;descrip&gt;
 
82
foo foo foo
 
83
&lt;/descrip&gt;
 
84
&lt;/item&gt;
 
85
</PRE>
 
86
 
 
87
You can have several &lt;item&gt; sections in one <tt>.dhelp</tt>
 
88
file. 
 
89
 
 
90
 
 
91
<H2>Add a .dhelp file to the index</H2>
 
92
 
 
93
To add a <tt>.dhelp</tt> file to the document index you have
 
94
to call <tt>dhelp_parse</tt>:<P>
 
95
 
 
96
<BLOCKQUOTE># dhelp_parse -a /usr/share/doc/directory</BLOCKQUOTE>
 
97
 
 
98
I would suggest to add the following to your package <tt>postinst</tt>
 
99
script:<P>
 
100
 
 
101
<BLOCKQUOTE><PRE>
 
102
if [ -f /usr/sbin/dhelp_parse ]; then
 
103
  /usr/sbin/dhelp_parse -a /usr/share/doc/directory
 
104
fi
 
105
</PRE></BLOCKQUOTE><P>
 
106
 
 
107
In <tt>prerm</tt> you should use:<P>
 
108
 
 
109
<BLOCKQUOTE><PRE>
 
110
if [ -f /usr/sbin/dhelp_parse ]; then
 
111
  /usr/sbin/dhelp_parse -d /usr/share/doc/directory
 
112
fi
 
113
</PRE></BLOCKQUOTE><P>
 
114
 
 
115
<!--
 
116
If your package conforms to the latest policy, the <tt>postinst</tt>
 
117
script should look like this:<P>
 
118
 
 
119
<BLOCKQUOTE><PRE>
 
120
if [ -f /usr/sbin/dhelp_parse ]; then
 
121
  /usr/sbin/dhelp_parse -a /usr/share/doc/directory
 
122
fi
 
123
 
 
124
if [ -f /usr/sbin/dhelp_parse_fsstnd ]; then
 
125
  /usr/sbin/dhelp_parse_fsstnd -a /usr/doc/directory
 
126
fi
 
127
</PRE></BLOCKQUOTE><P>
 
128
 
 
129
In <tt>prerm</tt> you should use:<P>
 
130
 
 
131
<BLOCKQUOTE><PRE>
 
132
if [ -f /usr/sbin/dhelp_parse ]; then
 
133
  /usr/sbin/dhelp_parse -d /usr/share/doc/directory
 
134
fi
 
135
 
 
136
if [ -f /usr/sbin/dhelp_parse_fsstnd ]; then
 
137
  /usr/sbin/dhelp_parse_fsstnd -d /usr/doc/directory
 
138
fi
 
139
</PRE></BLOCKQUOTE><P>
 
140
-->
 
141
 
 
142
Or you can use the script <tt>dh_dhelp</tt>. This script installs
 
143
the <tt>debian/dhelp</tt> file in <tt>/usr/share/doc/package</tt> and
 
144
creates the <tt>postinst</tt> and <tt>prerm</tt> scripts of all
 
145
<tt>.dhelp</tt> files found in <tt>/usr/share/doc</tt>. 
 
146
 
 
147
 
 
148
<H2>Scripts for .dhelp file</H2>
 
149
 
 
150
<H3>sgml2dhelp</H3>
 
151
 
 
152
If the HTML files were produced by the sgml-tools (linuxdoc-sgml)
 
153
you can use the script <tt><a href="sgml2dhelp.pl">sgml2dhelp.pl</a></tt>.
 
154
This script produces a <tt>.dhelp</tt>, a <tt>.dwww-index</tt>,
 
155
and a <tt>index.html</tt> file.<P>
 
156
 
 
157
Run this script in every directory containing HTML files. 
 
158
You have to call the script with to options:<P>
 
159
 
 
160
<BLOCKQUOTE>
 
161
<b>sgml2dhelp</b> <i>&lt;dhelp section&gt; &lt;dwww section&gt;</i> 
 
162
</BLOCKQUOTE>
 
163
 
 
164
If your documents should go in the German HOWTO section for example, you
 
165
have to enter:<P>
 
166
 
 
167
<BLOCKQUOTE><TT># dhelp.build de/HOWTO general</TT></BLOCKQUOTE> <P>
 
168
 
 
169
<h3>dhelp2dwww</h3>
 
170
 
 
171
If you have written a <tt>.dhelp</tt>, you can convert it to
 
172
a <tt>.dwww-index</tt> file with the script 
 
173
<tt><a href="dhelp2dwww.pl">dhelp2dwww.pl</a></tt>.<p>
 
174
 
 
175
<blockquote>
 
176
<b>dhelp2dwww</b> <i>&lt;dwww section&gt;</i>
 
177
</blockquote>
 
178
 
 
179
<H2>What can I do for dhelp?</H2>
 
180
 
 
181
If you like dhelp please ask maintainers of Debian packages including
 
182
HTML documentation to add dhelp support.<P>
 
183
 
 
184
If you have any comments or problems please feel free to send
 
185
an email to the dhelp package maintainer: 
 
186
<A HREF="mailto:dhelp@packages.debian.org">dhelp@packages.debian.org</A>
 
187
 
 
188
</BODY>
 
189
</HTML>
 
 
b'\\ No newline at end of file'