html2index 1.2.1 → 1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,441 +1,194 @@
1
- <?xml version="1.0" encoding="utf-8" ?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1
+ <?xml version="1.0" encoding="utf-8"?>
3
2
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
3
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
7
- <title>Html2index</title>
8
- <style type="text/css">
9
-
10
- /*
11
- :Author: David Goodger (goodger@python.org)
12
- :Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
13
- :Copyright: This stylesheet has been placed in the public domain.
14
-
15
- Default cascading style sheet for the HTML output of Docutils.
16
-
17
- See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
18
- customize this style sheet.
19
- */
20
-
21
- /* used to remove borders from tables and images */
22
- .borderless, table.borderless td, table.borderless th {
23
- border: 0 }
24
-
25
- table.borderless td, table.borderless th {
26
- /* Override padding for "table.docutils td" with "! important".
27
- The right padding separates the table cells. */
28
- padding: 0 0.5em 0 0 ! important }
29
-
30
- .first {
31
- /* Override more specific margin styles with "! important". */
32
- margin-top: 0 ! important }
33
-
34
- .last, .with-subtitle {
35
- margin-bottom: 0 ! important }
36
-
37
- .hidden {
38
- display: none }
39
-
40
- .subscript {
41
- vertical-align: sub;
42
- font-size: smaller }
43
-
44
- .superscript {
45
- vertical-align: super;
46
- font-size: smaller }
47
-
48
- a.toc-backref {
49
- text-decoration: none ;
50
- color: black }
51
-
52
- blockquote.epigraph {
53
- margin: 2em 5em ; }
54
-
55
- dl.docutils dd {
56
- margin-bottom: 0.5em }
57
-
58
- object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
59
- overflow: hidden;
60
- }
61
-
62
- /* Uncomment (and remove this text!) to get bold-faced definition list terms
63
- dl.docutils dt {
64
- font-weight: bold }
65
- */
66
-
67
- div.abstract {
68
- margin: 2em 5em }
69
-
70
- div.abstract p.topic-title {
71
- font-weight: bold ;
72
- text-align: center }
73
-
74
- div.admonition, div.attention, div.caution, div.danger, div.error,
75
- div.hint, div.important, div.note, div.tip, div.warning {
76
- margin: 2em ;
77
- border: medium outset ;
78
- padding: 1em }
79
-
80
- div.admonition p.admonition-title, div.hint p.admonition-title,
81
- div.important p.admonition-title, div.note p.admonition-title,
82
- div.tip p.admonition-title {
83
- font-weight: bold ;
84
- font-family: sans-serif }
85
-
86
- div.attention p.admonition-title, div.caution p.admonition-title,
87
- div.danger p.admonition-title, div.error p.admonition-title,
88
- div.warning p.admonition-title, .code .error {
89
- color: red ;
90
- font-weight: bold ;
91
- font-family: sans-serif }
92
-
93
- /* Uncomment (and remove this text!) to get reduced vertical space in
94
- compound paragraphs.
95
- div.compound .compound-first, div.compound .compound-middle {
96
- margin-bottom: 0.5em }
97
-
98
- div.compound .compound-last, div.compound .compound-middle {
99
- margin-top: 0.5em }
100
- */
101
-
102
- div.dedication {
103
- margin: 2em 5em ;
104
- text-align: center ;
105
- font-style: italic }
106
-
107
- div.dedication p.topic-title {
108
- font-weight: bold ;
109
- font-style: normal }
110
-
111
- div.figure {
112
- margin-left: 2em ;
113
- margin-right: 2em }
114
-
115
- div.footer, div.header {
116
- clear: both;
117
- font-size: smaller }
118
-
119
- div.line-block {
120
- display: block ;
121
- margin-top: 1em ;
122
- margin-bottom: 1em }
123
-
124
- div.line-block div.line-block {
125
- margin-top: 0 ;
126
- margin-bottom: 0 ;
127
- margin-left: 1.5em }
4
+ <meta name="generator" content="vim - Vi Improved, a programmer's editor; HTML Tidy for Linux version 5.8.0
5
+ "/>
6
+ <meta charset="utf-8" />
7
+ <meta name="viewport" content=
8
+ "width=device-width, initial-scale=1" />
9
+ <title>Html2index</title>
10
+ <style type="text/css">
11
+ /*<![CDATA[*/
12
+
13
+ /*
14
+ :Author: Michael Uplawski
15
+ :Contact: michael.uplawski@uplawski.eu
16
+ :License: WTFPL 2.0, see http://www.wtfpl.net/about/
17
+
18
+ Stylesheet for use with Docutils.
19
+ */
20
+
21
+ body {
22
+ background-color:#a0a090;
23
+ font-family: Verdana,Helvetica,Univers;
24
+ }
25
+
26
+ p {width: 80%;}
27
+
28
+ h1.title {color:#800080;font-size:2em;}
29
+ h2 {color:darkblue;font-size:1.5em;}
30
+ h3 {color:#3030f0;font-size:1em;}
31
+ h4 {color:#000080;font-size:1em;margin-left:2em;}
32
+
33
+ nav:before {
34
+ content:'Contents';
35
+ font-weight:bold;
36
+ color:darkblue;
37
+ font-size:1.5em;
38
+ }
39
+
40
+ p, ul.simple, ol.simple, dt {margin-left:2em;}
41
+ dd {margin-left:4em;}
42
+
43
+ /* correct left margin of nested block tags*/
44
+ dd p, li p {margin-left:0;}
45
+ dd * ul {margin-left:0 ! important; }
46
+ dd ul {margin-left:0 ! important; }
47
+ dd dl dt, dd dl dd {margin-left:0 ! important;}
48
+
49
+ dt {font-weight:bold;}
50
+ em {color:#000080;
51
+ background-color:#b0b0a0;
52
+ }
53
+ pre.literal-block {
54
+ padding:0.5em;
55
+ border-radius:0.5em;
56
+ background-color:rgba(150, 240, 250, 0.5);
57
+ margin-left:4em;
58
+ font-family: Monospace;
59
+ font-size:1.2em;
60
+ }
61
+ blockquote {background-color:#ffc090;
62
+ padding:0.5em;
63
+ width:80%;
64
+ border-radius:0.5em;
65
+ }
66
+
67
+ /*]]>*/
68
+ </style>
69
+ </head>
70
+ <body>
71
+ <main id="html2index">
72
+ <h1 class="title">HTML2Index</h1>
128
73
 
129
- div.sidebar {
130
- margin: 0 0 0.5em 1em ;
131
- border: medium outset ;
132
- padding: 1em ;
133
- background-color: #ffffee ;
134
- width: 40% ;
135
- float: right ;
136
- clear: right }
74
+ <p class="subtitle" id=
75
+ "creates-an-index-or-glossary-of-marked-expressions-in-an-html-file">
76
+ Creates an index or glossary of marked expressions in an
77
+ HTML-file</p>
137
78
 
138
- div.sidebar p.rubric {
139
- font-family: sans-serif ;
140
- font-size: medium }
79
+ <section id="synopsis">
80
+ <h2>SYNOPSIS</h2>
141
81
 
142
- div.system-messages {
143
- margin: 5em }
82
+ <p><strong>html2index -s input.html [-o output.html] [-t
83
+ template.html] [-c config] [-d]</strong>
84
+ </p>
144
85
 
145
- div.system-messages h1 {
146
- color: red }
86
+ <p><strong>html2index -v</strong>
87
+ </p>
147
88
 
148
- div.system-message {
149
- border: medium outset ;
150
- padding: 1em }
89
+ <p><strong>html2index -h</strong>
90
+ </p>
91
+ </section>
151
92
 
152
- div.system-message p.system-message-title {
153
- color: red ;
154
- font-weight: bold }
155
-
156
- div.topic {
157
- margin: 2em }
158
-
159
- h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
160
- h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
161
- margin-top: 0.4em }
162
-
163
- h1.title {
164
- text-align: center }
93
+ <section id="description">
94
+ <h2>DESCRIPTION</h2>
165
95
 
166
- h2.subtitle {
167
- text-align: center }
96
+ <p>The program identifies in an HTML source all expressions
97
+ which need to be copied to the generated index and searches
98
+ given dictionaries on the Web for an explanation of each
99
+ expression.</p>
168
100
 
169
- hr.docutils {
170
- width: 75% }
171
-
172
- img.align-left, .figure.align-left, object.align-left, table.align-left {
173
- clear: left ;
174
- float: left ;
175
- margin-right: 1em }
176
-
177
- img.align-right, .figure.align-right, object.align-right, table.align-right {
178
- clear: right ;
179
- float: right ;
180
- margin-left: 1em }
181
-
182
- img.align-center, .figure.align-center, object.align-center {
183
- display: block;
184
- margin-left: auto;
185
- margin-right: auto;
186
- }
187
-
188
- table.align-center {
189
- margin-left: auto;
190
- margin-right: auto;
191
- }
101
+ <p>The resulting glossary is written to a new HTML-file or
102
+ its HTML-code printed to STDOUT.</p>
192
103
 
193
- .align-left {
194
- text-align: left }
104
+ <p><strong>NOTE</strong>: The default dictionaries are
105
+ French: Larousse and JargonF. Non-French speakers MUST define
106
+ the dictionary by editing the configuration file
107
+ ~/.config/HTML2Index/config as described under Configuration
108
+ below.</p>
109
+ </section>
195
110
 
196
- .align-center {
197
- clear: both ;
198
- text-align: center }
111
+ <section id="options">
112
+ <h2>OPTIONS</h2>
199
113
 
200
- .align-right {
201
- text-align: right }
114
+ <dl class="field-list simple">
115
+ <dt>-d, --debug<span class="colon">:</span></dt>
202
116
 
203
- /* reset inner alignment in figures */
204
- div.align-right {
205
- text-align: inherit }
117
+ <dd>
118
+ <p>Be verbose</p>
119
+ </dd>
206
120
 
207
- /* div.align-center * { */
208
- /* text-align: left } */
121
+ <dt>-s, --source=SOURCE<span class="colon">:</span></dt>
209
122
 
210
- .align-top {
211
- vertical-align: top }
123
+ <dd>
124
+ <p>Source is the the original html-file which contains
125
+ marked expressions (see <strong>Preparations</strong>,
126
+ below).</p>
127
+ </dd>
212
128
 
213
- .align-middle {
214
- vertical-align: middle }
129
+ <dt>-o, --out=GLOSSARY<span class="colon">:</span></dt>
215
130
 
216
- .align-bottom {
217
- vertical-align: bottom }
131
+ <dd>
132
+ <p>Glossary is the generated file in HTML-format.</p>
133
+ </dd>
218
134
 
219
- ol.simple, ul.simple {
220
- margin-bottom: 1em }
135
+ <dt>-t, --template=TEMPLATE<span class=
136
+ "colon">:</span></dt>
221
137
 
222
- ol.arabic {
223
- list-style: decimal }
138
+ <dd>
139
+ <p>A html file containing placeholders for the references
140
+ to the dictionaries used and the generated glossary. The
141
+ placeholders are currently defined as %=dict_list=% and
142
+ %=glossary=%. You can set different field-delimiters and
143
+ names in the configuration-file. See below under
144
+ <em>EXAMPLE-Template</em> for a rudimentary example.</p>
145
+ </dd>
224
146
 
225
- ol.loweralpha {
226
- list-style: lower-alpha }
147
+ <dt>-c, --config=CONFIG<span class="colon">:</span></dt>
227
148
 
228
- ol.upperalpha {
229
- list-style: upper-alpha }
149
+ <dd>
150
+ <p>Configuration-file. Command-line arguments override
151
+ the settings in this file. You find a functional
152
+ configuration after the first program-execution in
153
+ <em>~/.config/HTML2Index</em>. The file is commented and
154
+ can immediately be adapted to your needs.</p>
155
+ </dd>
156
+ </dl>
230
157
 
231
- ol.lowerroman {
232
- list-style: lower-roman }
158
+ <section id="common-options">
159
+ <h3>Common Options</h3>
233
160
 
234
- ol.upperroman {
235
- list-style: upper-roman }
161
+ <p><strong>-h, --help</strong> Show this message</p>
236
162
 
237
- p.attribution {
238
- text-align: right ;
239
- margin-left: 50% }
163
+ <p><strong>-v, --version</strong> Show program version</p>
164
+ </section>
165
+ </section>
240
166
 
241
- p.caption {
242
- font-style: italic }
167
+ <section id="example-usage">
168
+ <h2>EXAMPLE Usage</h2>
243
169
 
244
- p.credits {
245
- font-style: italic ;
246
- font-size: smaller }
170
+ <p>Here is a html-page containing instructions on how to
171
+ enable and disable a touchpad using the xinput command (or
172
+ any other HTML-file) in the French (or any other)
173
+ language.</p>
247
174
 
248
- p.label {
249
- white-space: nowrap }
250
-
251
- p.rubric {
252
- font-weight: bold ;
253
- font-size: larger ;
254
- color: maroon ;
255
- text-align: center }
256
-
257
- p.sidebar-title {
258
- font-family: sans-serif ;
259
- font-weight: bold ;
260
- font-size: larger }
261
-
262
- p.sidebar-subtitle {
263
- font-family: sans-serif ;
264
- font-weight: bold }
265
-
266
- p.topic-title {
267
- font-weight: bold }
268
-
269
- pre.address {
270
- margin-bottom: 0 ;
271
- margin-top: 0 ;
272
- font: inherit }
273
-
274
- pre.literal-block, pre.doctest-block, pre.math, pre.code {
275
- margin-left: 2em ;
276
- margin-right: 2em }
277
-
278
- pre.code .ln { color: grey; } /* line numbers */
279
- pre.code, code { background-color: #eeeeee }
280
- pre.code .comment, code .comment { color: #5C6576 }
281
- pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
282
- pre.code .literal.string, code .literal.string { color: #0C5404 }
283
- pre.code .name.builtin, code .name.builtin { color: #352B84 }
284
- pre.code .deleted, code .deleted { background-color: #DEB0A1}
285
- pre.code .inserted, code .inserted { background-color: #A3D289}
175
+ <p><strong>touchpad_fr.html</strong>
176
+ </p>
286
177
 
287
- span.classifier {
288
- font-family: sans-serif ;
289
- font-style: oblique }
178
+ <section id="execution">
179
+ <h3>Execution</h3>
290
180
 
291
- span.classifier-delimiter {
292
- font-family: sans-serif ;
293
- font-weight: bold }
181
+ <p>Executing HTML2Index with the -s argument and the
182
+ HTML-file as its value, like this:</p>
294
183
 
295
- span.interpreted {
296
- font-family: sans-serif }
297
-
298
- span.option {
299
- white-space: nowrap }
300
-
301
- span.pre {
302
- white-space: pre }
303
-
304
- span.problematic {
305
- color: red }
184
+ <pre class=
185
+ "literal-block">:~$ html2index -s /[path]/touchpad_fr.html</pre>
186
+ <p>will produce output like this with expressions from the
187
+ HTML-file explained in the French language :</p>
306
188
 
307
- span.section-subtitle {
308
- /* font-size relative to parent (h1..h6 element) */
309
- font-size: 80% }
310
-
311
- table.citation {
312
- border-left: solid 1px gray;
313
- margin-left: 1px }
314
-
315
- table.docinfo {
316
- margin: 2em 4em }
317
-
318
- table.docutils {
319
- margin-top: 0.5em ;
320
- margin-bottom: 0.5em }
321
-
322
- table.footnote {
323
- border-left: solid 1px black;
324
- margin-left: 1px }
325
-
326
- table.docutils td, table.docutils th,
327
- table.docinfo td, table.docinfo th {
328
- padding-left: 0.5em ;
329
- padding-right: 0.5em ;
330
- vertical-align: top }
331
-
332
- table.docutils th.field-name, table.docinfo th.docinfo-name {
333
- font-weight: bold ;
334
- text-align: left ;
335
- white-space: nowrap ;
336
- padding-left: 0 }
337
-
338
- /* "booktabs" style (no vertical lines) */
339
- table.docutils.booktabs {
340
- border: 0px;
341
- border-top: 2px solid;
342
- border-bottom: 2px solid;
343
- border-collapse: collapse;
344
- }
345
- table.docutils.booktabs * {
346
- border: 0px;
347
- }
348
- table.docutils.booktabs th {
349
- border-bottom: thin solid;
350
- text-align: left;
351
- }
352
-
353
- h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
354
- h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
355
- font-size: 100% }
356
-
357
- ul.auto-toc {
358
- list-style-type: none }
359
-
360
- </style>
361
- </head>
362
- <body>
363
- <div class="document" id="html2index">
364
- <h1 class="title">HTML2Index</h1>
365
- <h2 class="subtitle" id="creates-an-index-or-glossary-of-marked-expressions-in-an-html-file">Creates an index or glossary of marked expressions in an HTML-file</h2>
366
-
367
- <div class="section" id="synopsis">
368
- <h1>SYNOPSIS</h1>
369
- <blockquote>
370
- <p><strong>html2index -s input.html [-o output.html] [-t template.html] [-c config] [-d]</strong></p>
371
- <p><strong>html2index -v</strong></p>
372
- <p><strong>html2index -h</strong></p>
373
- </blockquote>
374
- </div>
375
- <div class="section" id="description">
376
- <h1>DESCRIPTION</h1>
377
- <p>The program identifies in an HTML source all expressions which need to be copied
378
- to the generated index and searches given dictionaries on the Web for an
379
- explanation of each expression.</p>
380
- <p>The resulting glossary is written to a new HTML-file or its HTML-code printed to STDOUT.</p>
381
- <p><strong>NOTE</strong>: The default dictionaries are French: Larousse and JargonF. Non-French speakers MUST define the dictionary by editing the configuration file ~/.config/HTML2Index/config as described under Configuration below.</p>
382
- </div>
383
- <div class="section" id="options">
384
- <h1>OPTIONS</h1>
385
- <table class="docutils field-list" frame="void" rules="none">
386
- <col class="field-name" />
387
- <col class="field-body" />
388
- <tbody valign="top">
389
- <tr class="field"><th class="field-name">-d, --debug:</th><td class="field-body">Be verbose</td>
390
- </tr>
391
- <tr class="field"><th class="field-name" colspan="2">-s, --source=SOURCE:</th></tr>
392
- <tr class="field"><td>&nbsp;</td><td class="field-body">Source is the the original html-file
393
- which contains marked expressions (see
394
- <strong>Preparations</strong>, below).</td>
395
- </tr>
396
- <tr class="field"><th class="field-name" colspan="2">-o, --out=GLOSSARY:</th></tr>
397
- <tr class="field"><td>&nbsp;</td><td class="field-body">Glossary is the generated file in HTML-format.</td>
398
- </tr>
399
- <tr class="field"><th class="field-name" colspan="2">-t, --template=TEMPLATE:</th></tr>
400
- <tr class="field"><td>&nbsp;</td><td class="field-body">A html file containing placeholders for the references to the dictionaries used and
401
- the generated glossary. The placeholders are
402
- currently defined as %=dict_list=% and
403
- %=glossary=%. You can set different
404
- field-delimiters and names in the
405
- configuration-file. See below under
406
- <em>EXAMPLE-Template</em> for a rudimentary example.</td>
407
- </tr>
408
- <tr class="field"><th class="field-name" colspan="2">-c, --config=CONFIG:</th></tr>
409
- <tr class="field"><td>&nbsp;</td><td class="field-body">Configuration-file. Command-line arguments override the settings in this file. You find a functional
410
- configuration after the first program-execution in <em>~/.config/HTML2Index</em>. The file is commented and
411
- can immediately be adapted to your needs.</td>
412
- </tr>
413
- </tbody>
414
- </table>
415
- <div class="section" id="common-options">
416
- <h2>Common Options</h2>
417
- <p><strong>-h, --help</strong> Show this message</p>
418
- <p><strong>-v, --version</strong> Show program version</p>
419
- </div>
420
- </div>
421
- <div class="section" id="example-usage">
422
- <h1>EXAMPLE Usage</h1>
423
- <p>Here is a html-page containing instructions on how to enable and disable a
424
- touchpad using the xinput command (or any other HTML-file) in the French (or
425
- any other) language.</p>
426
- <p><strong>touchpad_fr.html</strong></p>
427
- <div class="section" id="execution">
428
- <h2>Execution</h2>
429
- <p>Executing HTML2Index with the -s argument and the HTML-file as its value, like this:</p>
430
- <pre class="literal-block">
431
- :~$ html2index -s /[path]/touchpad_fr.html
432
- </pre>
433
- <p>will produce output like this with expressions from the HTML-file explained in
434
- the French language :</p>
435
- <pre class="literal-block">
436
- vi
437
- (JargonF): 1. &nbsp;[Unix]. «&nbsp;Visual Interface&nbsp;» (littéralement, «&nbsp;interface
438
- visuelle&nbsp;», ça ne s'invente pas&nbsp;!) éditeur de texte du pléistocène codé par
189
+ <pre class="literal-block">vi
190
+ (JargonF): 1. [Unix]. « Visual Interface » (littéralement, « interface
191
+ visuelle », ça ne s'invente pas !) éditeur de texte du pléistocène codé par
439
192
  Bill Joy, aussi fondateur de Sun. Des aficionados d'Unix s'en servent
440
193
  encore, même s'il est très concurrencé par Emacs. Son principal avantage
441
194
  est que quel que soit l'état de votre système (par exemple complètement
@@ -443,157 +196,245 @@ vi
443
196
  correctement.
444
197
  La version la plus répandue est vim.
445
198
 
446
- 2. &nbsp;[nom de domaine]. Nom de domaine de premier niveau des îles Vierges étasuniennes.
199
+ 2. [nom de domaine]. Nom de domaine de premier niveau des îles Vierges étasuniennes.
447
200
  ------------------------------------------------------------
448
201
  xinput
449
- (JargonF): commande. &nbsp;[X11] Utilitaire facilitant la gestion des
202
+ (JargonF): commande. [X11] Utilitaire facilitant la gestion des
450
203
  périphériques X Window d'entrée. Il peut en fournir la liste, détailler
451
204
  leurs propriétés et modifier celles qui peuvent l'être.
452
205
  http://www.souris-libre.fr/savoir_faire/touchpad/touchpad_fr.html Exemple
453
- d'utilisation: désactivation et activation rapide du pavé tactile.
454
- </pre>
455
- <p>If you name an output file with the -o option, html2index will direct its
456
- output in HTML-format to this file.</p>
457
- </div>
458
- <div class="section" id="preparations">
459
- <h2>Preparations</h2>
460
- <div class="section" id="mark-catchwords">
461
- <h3>Mark catchwords</h3>
462
- <p>In the source-code of the original HTML- page, expressions for the future
463
- glossary are marked by means of</p>
464
- <ul class="simple">
465
- <li>a tag</li>
466
- <li>an attribute of this tag</li>
467
- <li>the value of the attribute.</li>
468
- </ul>
469
- <p>By default, the <em>span</em>-tag with an attribute <em>lang=&quot;fy&quot;</em> is used, 'fy' meaning
470
- Frisian, a language which is rarely used on the Web.., I venture.</p>
471
- <p><em>Example</em>:</p>
472
- <pre class="literal-block">
473
- &lt;span lang=&quot;fy&quot; xml:lang=&quot;fy&quot;&gt;pavé tactile&lt;/span&gt;
474
- </pre>
475
- <p>You can, though, define your own tag, attribute and attribute-value, if you prefer
476
- to mark expressions in your original html-file differently, like in</p>
477
- <p><em>Example</em>:</p>
478
- <pre class="literal-block">
479
- &lt;em class=&quot;expression&quot;&gt;Tripane&lt;/em&gt;
480
- </pre>
481
- <p>Remember that you can combine css classes and thus economize on html-elements, if
482
- you use them anyway to style your html-content. This would complicate the task for
483
- html2index only a little bit, as we will see further below.</p>
484
- </div>
485
- <div class="section" id="configuration">
486
- <h3>Configuration</h3>
487
- <p>Apart from the way that expressions are marked in the original html, you can prepare
488
- a few settings for HTML2Index, which influence its behaviour. Command-line
489
- options override the values stored in the configuration-file.</p>
490
- <p>A default configuration will be stored in the file <em>~/.config/HTML2Index/config</em> the
491
- first time that you run html2index. It should be sufficiently commented to allow you
492
- to comprehend and alter any values in the file.</p>
493
- <p>However, an explanation of each one of the available variables follows:</p>
494
- <table class="docutils field-list" frame="void" rules="none">
495
- <col class="field-name" />
496
- <col class="field-body" />
497
- <tbody valign="top">
498
- <tr class="field"><th class="field-name">debug:</th><td class="field-body"><p class="first">Does the same as the command-line options '-d' or '--debug'.
499
- Accepts the values false or true or can be left empty.
500
- If set to true, this setting causes html2index to be very verbose.
501
- Usually, you do not need to change the default value to this
502
- variable, which is <em>false</em>.</p>
503
- </td>
504
- </tr>
505
- <tr class="field"><th class="field-name">dictionaries:</th><td class="field-body"><p class="first">Here, you <strong>HAVE</strong> to define the online-dictionaries to
506
- consult, if you do not want to stick with the defaults, which are
507
- Larousse and JargonF, two French speaking sites, which also provide
508
- explanations in the French language only.</p>
509
- <p>The dictionaries are defined with four variables, each: <em>name, url, xpath, color</em>.
510
- Each dictionary-definition must start with a dash, followed by a white-space, then the
511
- first variable. Each variable-name must be enclosed by colons (see comments in the config-file).</p>
512
- <table class="docutils field-list" frame="void" rules="none">
513
- <col class="field-name" />
514
- <col class="field-body" />
515
- <tbody valign="top">
516
- <tr class="field"><th class="field-name">name:</th><td class="field-body">The name of the dictionary, how it will be referred to in the Glossary. An example could be 'Meriam-Webster'</td>
517
- </tr>
518
- <tr class="field"><th class="field-name">url:</th><td class="field-body">Note here the part from the url to a search-result in
519
- the chosen dictionary, which precedes the searched
520
- expression. You determine this string by doing a
521
- search in the online-dictionary, then copy&amp;paste the
522
- url as it is displayed in your browser. Rearrange
523
- possible request-parameters (following '?') to ensure
524
- that the searched word or expression is the very last
525
- item in the url. Remove only the searched expression
526
- and note the remainder as the value to the variable
527
- <em>url</em>.</td>
528
- </tr>
529
- <tr class="field"><th class="field-name">xpath:</th><td class="field-body">This is the xpath which identifies the HTML-element
530
- in a search-result which contains the explanation of
531
- an expression. Many resources on the Web explain how
532
- to compose an xpath. Be as specific as possible, to
533
- avoid a miss-interpretation of the xpath-expression,
534
- use html-attributes which may be applied to an HTML
535
- container-tag. Especially <em>id</em>, if present but also
536
- css-classes can help to identify a tag unambiguously.</td>
537
- </tr>
538
- <tr class="field"><th class="field-name">color:</th><td class="field-body">A hexadecimal rgb color value in single quotes is
539
- attributed to each dictionary to facilitate the
540
- identification of the dictionary which provides a
541
- specific explanation in the glossary. Exemplary
542
- colors are <em>'800000'</em> or <em>'500050'</em>. Take care to
543
- choose colors which harmonize with the background in
544
- your template-file, if you use one.</td>
545
- </tr>
546
- </tbody>
547
- </table>
548
- </td>
549
- </tr>
550
- <tr class="field"><th class="field-name">template:</th><td class="field-body"><p class="first">An HTML-file which contains placeholders. Two placeholders are needed
551
- at the time of this writing, one to name the dictionaries which are
552
- used to look-up definitions, another one to locate the spot where
553
- the new glossary will be written. See below under <em>EXAMPLE-Template</em>
554
- for a rudimentary example. The default template is internally defined.</p>
555
- </td>
556
- </tr>
557
- <tr class="field"><th class="field-name">fdelim:</th><td class="field-body"><p class="first">A character sequence which is used to mark placeholders in the
558
- HTML-template file. The default is '<em>%-</em>', meaning that a
559
- percent-symbol followed by a dash marks the beginning, a dash
560
- followed by a percent-symbol the end of a placeholder, like in
561
- <strong>%-dict-list-%</strong> for the placeholder named 'dict-list'.</p>
562
- </td>
563
- </tr>
564
- <tr class="field"><th class="field-name">placeholders:</th><td class="field-body"><p class="first">A list of placeholder names. Currently, there are only two
565
- placeholders recognized by Html2Index: <em>dict_list</em> and
566
- <em>glossary</em>. As the value to these two variables, note the name
567
- that you chose for the placeholders in your HTML-template. The
568
- defaults are <em>dict_list</em> for <em>dict_list</em> and <em>index</em> for
569
- <em>glossary</em>.</p>
570
- </td>
571
- </tr>
572
- <tr class="field"><th class="field-name">html_tag:</th><td class="field-body"><p class="first">This is the tag which encloses marked expressions in the original
573
- HTML-page (the source-file). Default is <em>span</em></p>
574
- </td>
575
- </tr>
576
- <tr class="field"><th class="field-name">html_attribute:</th><td class="field-body"><p class="first">An attribute of the html_tag which encloses marked expressions
577
- in the original HTML-page (the source-file). Default is <em>lang</em>.</p>
578
- </td>
579
- </tr>
580
- <tr class="field"><th class="field-name">html_value:</th><td class="field-body"><p class="first last">The value of an attribute of the html_tag which encloses marked
581
- expressions in the original HTML-page (the source-file). Default is
582
- <em>fy</em>.</p>
583
- </td>
584
- </tr>
585
- </tbody>
586
- </table>
587
- </div>
588
- </div>
589
- </div>
590
- <div class="section" id="example-template">
591
- <h1>EXAMPLE-Template</h1>
592
- <blockquote>
593
- Assuming that the defaults are used, the following could be a working
594
- HTML-template to use with HTML2Index:</blockquote>
595
- <pre class="literal-block">
596
- &lt;html&gt;
206
+ d'utilisation: désactivation et activation rapide du pavé tactile.</pre>
207
+ <p>If you name an output file with the -o option,
208
+ html2index will direct its output in HTML-format to this
209
+ file.</p>
210
+ </section>
211
+
212
+ <section id="preparations">
213
+ <h3>Preparations</h3>
214
+
215
+ <section id="mark-catchwords">
216
+ <h4>Mark catchwords</h4>
217
+
218
+ <p>In the source-code of the original HTML- page,
219
+ expressions for the future glossary are marked by means
220
+ of</p>
221
+
222
+ <ul class="simple">
223
+ <li>
224
+ <p>a tag</p>
225
+ </li>
226
+
227
+ <li>
228
+ <p>an attribute of this tag</p>
229
+ </li>
230
+
231
+ <li>
232
+ <p>the value of the attribute.</p>
233
+ </li>
234
+ </ul>
235
+
236
+ <p>By default, the <em>span</em>-tag with an attribute
237
+ <em>lang="fy"</em> is used, 'fy' meaning Frisian, a
238
+ language which is rarely used on the Web.., I
239
+ venture.</p>
240
+
241
+ <p><em>Example</em>:</p>
242
+
243
+ <pre class=
244
+ "literal-block">&lt;span lang="fy" xml:lang="fy"&gt;pavé tactile&lt;/span&gt;</pre>
245
+ <p>You can, though, define your own tag, attribute and
246
+ attribute-value, if you prefer to mark expressions in
247
+ your original html-file differently, like in</p>
248
+
249
+ <p><em>Example</em>:</p>
250
+
251
+ <pre class=
252
+ "literal-block">&lt;em class="expression"&gt;Tripane&lt;/em&gt;</pre>
253
+ <p>Remember that you can combine css classes and thus
254
+ economize on html-elements, if you use them anyway to
255
+ style your html-content. This would complicate the task
256
+ for html2index only a little bit, as we will see further
257
+ below.</p>
258
+ </section>
259
+
260
+ <section id="configuration">
261
+ <h4>Configuration</h4>
262
+
263
+ <p>Apart from the way that expressions are marked in the
264
+ original html, you can prepare a few settings for
265
+ HTML2Index, which influence its behaviour. Command-line
266
+ options override the values stored in the
267
+ configuration-file.</p>
268
+
269
+ <p>A default configuration will be stored in the file
270
+ <em>~/.config/HTML2Index/config</em> the first time that
271
+ you run html2index. It should be sufficiently commented
272
+ to allow you to comprehend and alter any values in the
273
+ file.</p>
274
+
275
+ <p>However, an explanation of each one of the available
276
+ variables follows:</p>
277
+
278
+ <dl class="field-list">
279
+ <dt>debug<span class="colon">:</span></dt>
280
+
281
+ <dd>
282
+ <p>Does the same as the command-line options '-d' or
283
+ '--debug'. Accepts the values false or true or can be
284
+ left empty. If set to true, this setting causes
285
+ html2index to be very verbose. Usually, you do not
286
+ need to change the default value to this variable,
287
+ which is <em>false</em>.</p>
288
+ </dd>
289
+
290
+ <dt>dictionaries<span class="colon">:</span></dt>
291
+
292
+ <dd>
293
+ <p>Here, you <strong>HAVE</strong> to define the
294
+ online-dictionaries to consult, if you do not want to
295
+ stick with the defaults, which are Larousse and
296
+ JargonF, two French speaking sites, which also
297
+ provide explanations in the French language only.</p>
298
+
299
+ <p>The dictionaries are defined with four variables,
300
+ each: <em>name, url, xpath, color</em>. Each
301
+ dictionary-definition must start with a dash,
302
+ followed by a white-space, then the first variable.
303
+ Each variable-name must be enclosed by colons (see
304
+ comments in the config-file).</p>
305
+
306
+ <dl class="field-list simple">
307
+ <dt>name<span class="colon">:</span></dt>
308
+
309
+ <dd>
310
+ <p>The name of the dictionary, how it will be
311
+ referred to in the Glossary. An example could be
312
+ 'Merriam-Webster'</p>
313
+ </dd>
314
+
315
+ <dt>url<span class="colon">:</span></dt>
316
+
317
+ <dd>
318
+ <p>Note here the part from the url to a
319
+ search-result in the chosen dictionary, which
320
+ precedes the searched expression. You determine
321
+ this string by doing a search in the
322
+ online-dictionary, then copy&amp;paste the url as
323
+ it is displayed in your browser. Rearrange
324
+ possible request-parameters (following '?') to
325
+ ensure that the searched word or expression is
326
+ the very last item in the url. Remove only the
327
+ searched expression and note the remainder as the
328
+ value to the variable <em>url</em>. For
329
+ Merriam-Webster, this url fragment would be (in
330
+ January 2026): "<a class="reference external"
331
+ href=
332
+ "https://www.merriam-webster.com/dictionary/">https://www.merriam-webster.com/dictionary/</a>"</p>
333
+ </dd>
334
+
335
+ <dt>xpath<span class="colon">:</span></dt>
336
+
337
+ <dd>
338
+ <p>This is the xpath which identifies the
339
+ HTML-element in a search-result which contains
340
+ the explanation of an expression. Many resources
341
+ on the Web explain how to compose an xpath. Be as
342
+ specific as possible, to avoid a
343
+ miss-interpretation of the xpath-expression, use
344
+ html-attributes which may be applied to an HTML
345
+ container-tag. Especially <em>id</em>, if present
346
+ but also css-classes can help to identify a tag
347
+ unambiguously.</p>
348
+ </dd>
349
+
350
+ <dt>color<span class="colon">:</span></dt>
351
+
352
+ <dd>
353
+ <p>A hexadecimal rgb color value in single quotes
354
+ is attributed to each dictionary to facilitate
355
+ the identification of the dictionary which
356
+ provides a specific explanation in the glossary.
357
+ Exemplary colors are <em>'800000'</em> or
358
+ <em>'500050'</em>. Take care to choose colors
359
+ which harmonize with the background in your
360
+ template-file, if you use one.</p>
361
+ </dd>
362
+ </dl>
363
+ </dd>
364
+
365
+ <dt>template<span class="colon">:</span></dt>
366
+
367
+ <dd>
368
+ <p>An HTML-file which contains placeholders. Two
369
+ placeholders are needed at the time of this writing,
370
+ one to name the dictionaries which are used to
371
+ look-up definitions, another one to locate the spot
372
+ where the new glossary will be written. See below
373
+ under <em>EXAMPLE-Template</em> for a rudimentary
374
+ example. The default template is internally
375
+ defined.</p>
376
+ </dd>
377
+
378
+ <dt>fdelim<span class="colon">:</span></dt>
379
+
380
+ <dd>
381
+ <p>A character sequence which is used to mark
382
+ placeholders in the HTML-template file. The default
383
+ is '<em>%-</em>', meaning that a percent-symbol
384
+ followed by a dash marks the beginning, a dash
385
+ followed by a percent-symbol the end of a
386
+ placeholder, like in <strong>%-dict-list-%</strong>
387
+ for the placeholder named 'dict-list'.</p>
388
+ </dd>
389
+
390
+ <dt>placeholders<span class="colon">:</span></dt>
391
+
392
+ <dd>
393
+ <p>A list of placeholder names. Currently, there are
394
+ only two placeholders recognized by Html2Index:
395
+ <em>dict_list</em> and <em>glossary</em>. As the
396
+ value to these two variables, note the name that you
397
+ chose for the placeholders in your HTML-template. The
398
+ defaults are <em>dict_list</em> for
399
+ <em>dict_list</em> and <em>index</em> for
400
+ <em>glossary</em>.</p>
401
+ </dd>
402
+
403
+ <dt>html_tag<span class="colon">:</span></dt>
404
+
405
+ <dd>
406
+ <p>This is the tag which encloses marked expressions
407
+ in the original HTML-page (the source-file). Default
408
+ is <em>span</em></p>
409
+ </dd>
410
+
411
+ <dt>html_attribute<span class="colon">:</span></dt>
412
+
413
+ <dd>
414
+ <p>An attribute of the html_tag which encloses marked
415
+ expressions in the original HTML-page (the
416
+ source-file). Default is <em>lang</em>.</p>
417
+ </dd>
418
+
419
+ <dt>html_value<span class="colon">:</span></dt>
420
+
421
+ <dd>
422
+ <p>The value of an attribute of the html_tag which
423
+ encloses marked expressions in the original HTML-page
424
+ (the source-file). Default is <em>fy</em>.</p>
425
+ </dd>
426
+ </dl>
427
+ </section>
428
+ </section>
429
+ </section>
430
+
431
+ <section id="example-template">
432
+ <h2>EXAMPLE-Template</h2>
433
+
434
+ <p>Assuming that the defaults are used, the following could
435
+ be a working HTML-template to use with HTML2Index:</p>
436
+
437
+ <pre class="literal-block">&lt;html&gt;
597
438
  &lt;head&gt;&lt;title&gt;Glossary&lt;/title&gt;&lt;/head&gt;
598
439
  &lt;body&gt;
599
440
  &lt;h1&gt;Glossary&lt;/h1&gt;
@@ -604,35 +445,42 @@ HTML-template to use with HTML2Index:</blockquote>
604
445
  &lt;!-- will be replaced by a definition list &lt;dl&gt;&lt;dt&gt;&lt;dd&gt;... &lt;/dd&gt;&lt;/dt&gt;&lt;/dl&gt; --&gt;
605
446
  %-glossary-%
606
447
  &lt;/body&gt;
607
- &lt;/html&gt;
608
- </pre>
609
- </div>
610
- <div class="section" id="errors-and-warnings">
611
- <h1>ERRORS and WARNINGS</h1>
612
- <blockquote>
613
- <p>html2index warns you if the output-file exists and asks you if you want
614
- to replace it with a new version.</p>
615
- <p>The program also tries to determine the file-type of the input (HTML) file and
616
- gives out a warning if the file is considered unsuitable.</p>
617
- <p>Each time, that an expression cannot be found in one of the targeted dictionaries,
618
- a warning is given. All these problematic expressions will be listed in a
619
- temporary file, which is named after html2index has terminated.</p>
620
- </blockquote>
621
- </div>
622
- <div class="section" id="source-code-and-development">
623
- <h1>SOURCE CODE and DEVELOPMENT</h1>
624
- <p>html2index is developed in Ruby and can be installed as a Ruby-Gem. As Ruby is
625
- an interpreter-language, the source-code of the installed version is always
626
- accessible. You can also decompress the gem-file to take a look at the code.</p>
627
- <table class="docutils field-list" frame="void" rules="none">
628
- <col class="field-name" />
629
- <col class="field-body" />
630
- <tbody valign="top">
631
- <tr class="field"><th class="field-name">AUTHOR:</th><td class="field-body">Michael Uplawski &lt;michael[dot]uplawski[at]uplawski[dot]eu&gt;</td>
632
- </tr>
633
- </tbody>
634
- </table>
635
- </div>
636
- </div>
448
+ &lt;/html&gt;</pre>
449
+ </section>
450
+
451
+ <section id="errors-and-warnings">
452
+ <h2>ERRORS and WARNINGS</h2>
453
+
454
+ <p>html2index warns you if the output-file exists and asks
455
+ you if you want to replace it with a new version.</p>
456
+
457
+ <p>The program also tries to determine the file-type of the
458
+ input (HTML) file and gives out a warning if the file is
459
+ considered unsuitable.</p>
460
+
461
+ <p>Each time, that an expression cannot be found in one of
462
+ the targeted dictionaries, a warning is given. All these
463
+ problematic expressions will be listed in a temporary file,
464
+ which is named after html2index has terminated.</p>
465
+ </section>
466
+
467
+ <section id="source-code-and-development">
468
+ <h2>SOURCE CODE and DEVELOPMENT</h2>
469
+
470
+ <p>html2index is developed in Ruby and can be installed as a
471
+ Ruby-Gem. As Ruby is an interpreter-language, the source-code
472
+ of the installed version is always accessible. You can also
473
+ decompress the gem-file to take a look at the code.</p>
474
+
475
+ <dl class="field-list simple">
476
+ <dt>AUTHOR<span class="colon">:</span></dt>
477
+
478
+ <dd>
479
+ <p>Michael Uplawski
480
+ &lt;michael[dot]uplawski[at]uplawski[dot]eu&gt;</p>
481
+ </dd>
482
+ </dl>
483
+ </section>
484
+ </main>
637
485
  </body>
638
486
  </html>