flnews_post_proc 1.72 → 1.74
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.
- checksums.yaml +4 -4
- data/README.md +20 -19
- data/doc/fr/html/flnews_post_proc.html +104 -85
- data/doc/fr/man/flnews_post_proc.1.gz +0 -0
- data/doc/fr/pdf/flnews_post_proc.pdf +0 -0
- data/doc/fr/rst/flnews_post_proc.rst +94 -89
- data/doc/html/flnews_post_proc.html +194 -573
- data/doc/man/flnews_post_proc.1.gz +0 -0
- data/doc/pdf/flnews_post_proc.pdf +0 -0
- data/doc/rst/flnews_post_proc.rst +174 -237
- data/lib/basic_logging.rb +1 -1
- data/lib/body.rb +2 -2
- data/lib/configuration.rb +1 -1
- data/lib/flnews_post_proc.conf +3 -3
- data/lib/flnews_post_proc.rb +1 -1
- data/lib/headers.rb +3 -10
- data/lib/newsgroups.rb +38 -19
- data/lib/override.rb +1 -1
- data/lib/version.rb +3 -3
- metadata +6 -5
@@ -4,649 +4,270 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" />
|
7
|
-
<title>
|
7
|
+
<title>flnews_post_proc</title>
|
8
8
|
<style type="text/css">
|
9
9
|
|
10
10
|
/*
|
11
|
-
:Author:
|
12
|
-
:
|
13
|
-
:
|
11
|
+
:Author: Michael Uplawski
|
12
|
+
:Contact: michael.uplawski@uplawski.eu
|
13
|
+
:License: WTFPL 2.0, see http://www.wtfpl.net/about/
|
14
14
|
|
15
|
-
|
16
|
-
Despite the name, some widely supported CSS2 features are used.
|
17
|
-
|
18
|
-
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
19
|
-
customize this style sheet.
|
15
|
+
Stylesheet for use with Docutils.
|
20
16
|
*/
|
21
17
|
|
22
|
-
/*
|
23
|
-
|
24
|
-
border: 0 }
|
25
|
-
|
26
|
-
table.borderless td, table.borderless th {
|
27
|
-
/* Override padding for "table.docutils td" with "! important".
|
28
|
-
The right padding separates the table cells. */
|
29
|
-
padding: 0 0.5em 0 0 ! important }
|
30
|
-
|
31
|
-
.first {
|
32
|
-
/* Override more specific margin styles with "! important". */
|
33
|
-
margin-top: 0 ! important }
|
34
|
-
|
35
|
-
.last, .with-subtitle {
|
36
|
-
margin-bottom: 0 ! important }
|
37
|
-
|
38
|
-
.hidden {
|
39
|
-
display: none }
|
40
|
-
|
41
|
-
.subscript {
|
42
|
-
vertical-align: sub;
|
43
|
-
font-size: smaller }
|
44
|
-
|
45
|
-
.superscript {
|
46
|
-
vertical-align: super;
|
47
|
-
font-size: smaller }
|
18
|
+
/* The defaults for docutils */
|
19
|
+
@import url(html4css1.css);
|
48
20
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
blockquote.epigraph {
|
54
|
-
margin: 2em 5em ; }
|
55
|
-
|
56
|
-
dl.docutils dd {
|
57
|
-
margin-bottom: 0.5em }
|
58
|
-
|
59
|
-
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
60
|
-
overflow: hidden;
|
21
|
+
body {
|
22
|
+
background-color:#e0f0a0;
|
23
|
+
font-family: Verdana,Helvetica,Univers;
|
61
24
|
}
|
62
25
|
|
63
|
-
|
64
|
-
|
65
|
-
font-weight: bold }
|
66
|
-
*/
|
67
|
-
|
68
|
-
div.abstract {
|
69
|
-
margin: 2em 5em }
|
70
|
-
|
71
|
-
div.abstract p.topic-title {
|
72
|
-
font-weight: bold ;
|
73
|
-
text-align: center }
|
74
|
-
|
75
|
-
div.admonition, div.attention, div.caution, div.danger, div.error,
|
76
|
-
div.hint, div.important, div.note, div.tip, div.warning {
|
77
|
-
margin: 2em ;
|
78
|
-
border: medium outset ;
|
79
|
-
padding: 1em }
|
80
|
-
|
81
|
-
div.admonition p.admonition-title, div.hint p.admonition-title,
|
82
|
-
div.important p.admonition-title, div.note p.admonition-title,
|
83
|
-
div.tip p.admonition-title {
|
84
|
-
font-weight: bold ;
|
85
|
-
font-family: sans-serif }
|
86
|
-
|
87
|
-
div.attention p.admonition-title, div.caution p.admonition-title,
|
88
|
-
div.danger p.admonition-title, div.error p.admonition-title,
|
89
|
-
div.warning p.admonition-title, .code .error {
|
90
|
-
color: red ;
|
91
|
-
font-weight: bold ;
|
92
|
-
font-family: sans-serif }
|
93
|
-
|
94
|
-
/* Uncomment (and remove this text!) to get reduced vertical space in
|
95
|
-
compound paragraphs.
|
96
|
-
div.compound .compound-first, div.compound .compound-middle {
|
97
|
-
margin-bottom: 0.5em }
|
98
|
-
|
99
|
-
div.compound .compound-last, div.compound .compound-middle {
|
100
|
-
margin-top: 0.5em }
|
101
|
-
*/
|
102
|
-
|
103
|
-
div.dedication {
|
104
|
-
margin: 2em 5em ;
|
105
|
-
text-align: center ;
|
106
|
-
font-style: italic }
|
107
|
-
|
108
|
-
div.dedication p.topic-title {
|
109
|
-
font-weight: bold ;
|
110
|
-
font-style: normal }
|
111
|
-
|
112
|
-
div.figure {
|
113
|
-
margin-left: 2em ;
|
114
|
-
margin-right: 2em }
|
115
|
-
|
116
|
-
div.footer, div.header {
|
117
|
-
clear: both;
|
118
|
-
font-size: smaller }
|
119
|
-
|
120
|
-
div.line-block {
|
121
|
-
display: block ;
|
122
|
-
margin-top: 1em ;
|
123
|
-
margin-bottom: 1em }
|
124
|
-
|
125
|
-
div.line-block div.line-block {
|
126
|
-
margin-top: 0 ;
|
127
|
-
margin-bottom: 0 ;
|
128
|
-
margin-left: 1.5em }
|
129
|
-
|
130
|
-
div.sidebar {
|
131
|
-
margin: 0 0 0.5em 1em ;
|
132
|
-
border: medium outset ;
|
133
|
-
padding: 1em ;
|
134
|
-
background-color: #ffffee ;
|
135
|
-
width: 40% ;
|
136
|
-
float: right ;
|
137
|
-
clear: right }
|
138
|
-
|
139
|
-
div.sidebar p.rubric {
|
140
|
-
font-family: sans-serif ;
|
141
|
-
font-size: medium }
|
26
|
+
h1 {color:darkblue;font-size:1.5em;}
|
27
|
+
h1.title {color:#a0a0f0;font-size:2em;}
|
142
28
|
|
143
|
-
|
144
|
-
|
29
|
+
p, ul.simple, ol.simple, dt {margin-left:2em;}
|
30
|
+
dd {margin-left:4em;}
|
145
31
|
|
146
|
-
|
147
|
-
|
32
|
+
/* correct left margin of nested block tags*/
|
33
|
+
dd p, li p {margin-left:0;}
|
34
|
+
dd * ul {margin-left:0 ! important; }
|
35
|
+
dd ul {margin-left:0 ! important; }
|
36
|
+
dd dl dt, dd dl dd {margin-left:0 ! important;}
|
148
37
|
|
149
|
-
|
150
|
-
|
151
|
-
padding: 1em }
|
152
|
-
|
153
|
-
div.system-message p.system-message-title {
|
154
|
-
color: red ;
|
155
|
-
font-weight: bold }
|
156
|
-
|
157
|
-
div.topic {
|
158
|
-
margin: 2em }
|
159
|
-
|
160
|
-
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
161
|
-
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
162
|
-
margin-top: 0.4em }
|
163
|
-
|
164
|
-
h1.title {
|
165
|
-
text-align: center }
|
166
|
-
|
167
|
-
h2.subtitle {
|
168
|
-
text-align: center }
|
169
|
-
|
170
|
-
hr.docutils {
|
171
|
-
width: 75% }
|
172
|
-
|
173
|
-
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
174
|
-
clear: left ;
|
175
|
-
float: left ;
|
176
|
-
margin-right: 1em }
|
177
|
-
|
178
|
-
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
179
|
-
clear: right ;
|
180
|
-
float: right ;
|
181
|
-
margin-left: 1em }
|
182
|
-
|
183
|
-
img.align-center, .figure.align-center, object.align-center {
|
184
|
-
display: block;
|
185
|
-
margin-left: auto;
|
186
|
-
margin-right: auto;
|
187
|
-
}
|
188
|
-
|
189
|
-
table.align-center {
|
190
|
-
margin-left: auto;
|
191
|
-
margin-right: auto;
|
38
|
+
em {color:#000080;
|
39
|
+
background-color:#ffffa0;
|
192
40
|
}
|
193
41
|
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
.align-center {
|
198
|
-
clear: both ;
|
199
|
-
text-align: center }
|
200
|
-
|
201
|
-
.align-right {
|
202
|
-
text-align: right }
|
203
|
-
|
204
|
-
/* reset inner alignment in figures */
|
205
|
-
div.align-right {
|
206
|
-
text-align: inherit }
|
207
|
-
|
208
|
-
/* div.align-center * { */
|
209
|
-
/* text-align: left } */
|
210
|
-
|
211
|
-
.align-top {
|
212
|
-
vertical-align: top }
|
213
|
-
|
214
|
-
.align-middle {
|
215
|
-
vertical-align: middle }
|
216
|
-
|
217
|
-
.align-bottom {
|
218
|
-
vertical-align: bottom }
|
219
|
-
|
220
|
-
ol.simple, ul.simple {
|
221
|
-
margin-bottom: 1em }
|
222
|
-
|
223
|
-
ol.arabic {
|
224
|
-
list-style: decimal }
|
225
|
-
|
226
|
-
ol.loweralpha {
|
227
|
-
list-style: lower-alpha }
|
228
|
-
|
229
|
-
ol.upperalpha {
|
230
|
-
list-style: upper-alpha }
|
231
|
-
|
232
|
-
ol.lowerroman {
|
233
|
-
list-style: lower-roman }
|
234
|
-
|
235
|
-
ol.upperroman {
|
236
|
-
list-style: upper-roman }
|
237
|
-
|
238
|
-
p.attribution {
|
239
|
-
text-align: right ;
|
240
|
-
margin-left: 50% }
|
241
|
-
|
242
|
-
p.caption {
|
243
|
-
font-style: italic }
|
244
|
-
|
245
|
-
p.credits {
|
246
|
-
font-style: italic ;
|
247
|
-
font-size: smaller }
|
248
|
-
|
249
|
-
p.label {
|
250
|
-
white-space: nowrap }
|
251
|
-
|
252
|
-
p.rubric {
|
253
|
-
font-weight: bold ;
|
254
|
-
font-size: larger ;
|
255
|
-
color: maroon ;
|
256
|
-
text-align: center }
|
257
|
-
|
258
|
-
p.sidebar-title {
|
259
|
-
font-family: sans-serif ;
|
260
|
-
font-weight: bold ;
|
261
|
-
font-size: larger }
|
262
|
-
|
263
|
-
p.sidebar-subtitle {
|
264
|
-
font-family: sans-serif ;
|
265
|
-
font-weight: bold }
|
266
|
-
|
267
|
-
p.topic-title {
|
268
|
-
font-weight: bold }
|
269
|
-
|
270
|
-
pre.address {
|
271
|
-
margin-bottom: 0 ;
|
272
|
-
margin-top: 0 ;
|
273
|
-
font: inherit }
|
274
|
-
|
275
|
-
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
276
|
-
margin-left: 2em ;
|
277
|
-
margin-right: 2em }
|
278
|
-
|
279
|
-
pre.code .ln { color: gray; } /* line numbers */
|
280
|
-
pre.code, code { background-color: #eeeeee }
|
281
|
-
pre.code .comment, code .comment { color: #5C6576 }
|
282
|
-
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
283
|
-
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
284
|
-
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
285
|
-
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
286
|
-
pre.code .inserted, code .inserted { background-color: #A3D289}
|
287
|
-
|
288
|
-
span.classifier {
|
289
|
-
font-family: sans-serif ;
|
290
|
-
font-style: oblique }
|
291
|
-
|
292
|
-
span.classifier-delimiter {
|
293
|
-
font-family: sans-serif ;
|
294
|
-
font-weight: bold }
|
295
|
-
|
296
|
-
span.interpreted {
|
297
|
-
font-family: sans-serif }
|
298
|
-
|
299
|
-
span.option {
|
300
|
-
white-space: nowrap }
|
301
|
-
|
302
|
-
span.pre {
|
303
|
-
white-space: pre }
|
304
|
-
|
305
|
-
span.problematic, pre.problematic {
|
306
|
-
color: red }
|
307
|
-
|
308
|
-
span.section-subtitle {
|
309
|
-
/* font-size relative to parent (h1..h6 element) */
|
310
|
-
font-size: 80% }
|
311
|
-
|
312
|
-
table.citation {
|
313
|
-
border-left: solid 1px gray;
|
314
|
-
margin-left: 1px }
|
315
|
-
|
316
|
-
table.docinfo {
|
317
|
-
margin: 2em 4em }
|
318
|
-
|
319
|
-
table.docutils {
|
320
|
-
margin-top: 0.5em ;
|
321
|
-
margin-bottom: 0.5em }
|
322
|
-
|
323
|
-
table.footnote {
|
324
|
-
border-left: solid 1px black;
|
325
|
-
margin-left: 1px }
|
326
|
-
|
327
|
-
table.docutils td, table.docutils th,
|
328
|
-
table.docinfo td, table.docinfo th {
|
329
|
-
padding-left: 0.5em ;
|
330
|
-
padding-right: 0.5em ;
|
331
|
-
vertical-align: top }
|
332
|
-
|
333
|
-
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
334
|
-
font-weight: bold ;
|
335
|
-
text-align: left ;
|
336
|
-
white-space: nowrap ;
|
337
|
-
padding-left: 0 }
|
338
|
-
|
339
|
-
/* "booktabs" style (no vertical lines) */
|
340
|
-
table.docutils.booktabs {
|
341
|
-
border: 0px;
|
342
|
-
border-top: 2px solid;
|
343
|
-
border-bottom: 2px solid;
|
344
|
-
border-collapse: collapse;
|
345
|
-
}
|
346
|
-
table.docutils.booktabs * {
|
347
|
-
border: 0px;
|
42
|
+
blockquote {background-color:#ffc090;
|
43
|
+
padding:0.5em;
|
44
|
+
border-radius:0.5em;
|
348
45
|
}
|
349
|
-
table.docutils.booktabs th {
|
350
|
-
border-bottom: thin solid;
|
351
|
-
text-align: left;
|
352
|
-
}
|
353
|
-
|
354
|
-
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
355
|
-
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
356
|
-
font-size: 100% }
|
357
|
-
|
358
|
-
ul.auto-toc {
|
359
|
-
list-style-type: none }
|
360
46
|
|
361
47
|
</style>
|
362
48
|
</head>
|
363
49
|
<body>
|
364
50
|
<div class="document" id="flnews-post-proc">
|
365
51
|
<h1 class="title">flnews_post_proc</h1>
|
366
|
-
<h2 class="subtitle" id="post-processor-for-the-flnews-newsreader">Post-Processor for the flnews
|
52
|
+
<h2 class="subtitle" id="post-processor-for-the-flnews-newsreader">Post-Processor for the flnews Newsreader</h2>
|
367
53
|
|
368
54
|
<div class="section" id="synopsis">
|
369
55
|
<h1>SYNOPSIS</h1>
|
370
|
-
<p>
|
371
|
-
automatically
|
372
|
-
|
373
|
-
<p>
|
374
|
-
|
56
|
+
<p>The post-processor is invoked by piping an article into it. This typically occurs
|
57
|
+
automatically when the "post_proc" variable is set to <cite>flnews_post_proc</cite> in the
|
58
|
+
flnews configuration file.</p>
|
59
|
+
<p>For testing purposes, you can also pipe locally stored articles into the post-processor
|
60
|
+
using a command like:</p>
|
375
61
|
<p><strong>flnews_post_proc < article</strong></p>
|
376
62
|
</div>
|
377
63
|
<div class="section" id="description">
|
378
64
|
<h1>DESCRIPTION</h1>
|
379
|
-
<p>The flnews newsreader
|
380
|
-
articles from
|
381
|
-
<p>When
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
<p>The flnews_post_proc can
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
<
|
391
|
-
|
392
|
-
<p>While the articles that flnews creates, are complete and ready to be posted,
|
393
|
-
some users may not always agree with the result and for arbitrary reasons:</p>
|
65
|
+
<p>The flnews newsreader fully supports Usenet access, enabling the reception and reading
|
66
|
+
of articles from newsgroups, as well as composing and posting them.</p>
|
67
|
+
<p>When comparing various news clients, differences will often influence your choice of
|
68
|
+
preferred client. Flnews distinguishes itself by not only offering control over its
|
69
|
+
internal behavior, but also by allowing you to modify outgoing posts just before they
|
70
|
+
are sent to the configured NNTP server.</p>
|
71
|
+
<p>The <cite>flnews_post_proc</cite> program can be used to modify and enhance a post in ways that
|
72
|
+
flnews alone cannot. It is configurable and may meet the needs of some Usenet users,
|
73
|
+
though it is primarily intended as a starting point for creating your own custom solutions.</p>
|
74
|
+
<div class="section" id="limitations-of-basic-newsreaders">
|
75
|
+
<h2>Limitations of Basic Newsreaders</h2>
|
76
|
+
<p>While flnews creates posts that are generally complete and ready for submission, there are
|
77
|
+
instances where users might find the output unsatisfactory for arbitrary reasons:</p>
|
394
78
|
<ul>
|
395
|
-
<li><p class="first">
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
My post-processor program can set an introductory line specifically
|
401
|
-
chosen for one or several newsgroups.</p>
|
79
|
+
<li><p class="first">If you're posting to different newsgroups in multiple languages, the introductory line
|
80
|
+
referencing a prior post can only be set once in the flnews configuration file. As a
|
81
|
+
result, posts to a French newsgroup, for example, may start with an introduction in
|
82
|
+
English. The post-processor can address this by setting specific introductory lines
|
83
|
+
for each newsgroup.</p>
|
402
84
|
</li>
|
403
|
-
<li><p class="first">
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
or several newsgroups. You can even specify that a signature should be
|
408
|
-
picked randomly from a file, containing several signatures.</p>
|
85
|
+
<li><p class="first">Similar issues arise when you set a standard signature and want it to vary based on
|
86
|
+
the newsgroup. The post-processor allows different signatures to be used for different
|
87
|
+
newsgroups, and you can even randomize the selection from a list of signatures stored
|
88
|
+
in a file.</p>
|
409
89
|
</li>
|
410
|
-
<li><p class="first">
|
411
|
-
|
412
|
-
|
413
|
-
You are free. I just mention face and x-face but prefer that you do not
|
414
|
-
remember I did.
|
415
|
-
Custom-headers may be defined in the configuration file for the program
|
416
|
-
and will then be added to each outgoing post.</p>
|
90
|
+
<li><p class="first">Custom headers, such as GnuPG key IDs or your language proficiency, can also be added
|
91
|
+
to posts, though signatures may be a better alternative. Custom headers can be defined
|
92
|
+
in the configuration file and will be added to outgoing posts.</p>
|
417
93
|
</li>
|
418
|
-
<li><p class="first">
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
<p><strong>ATTN</strong> As of 2024, the header “X-No-Archive“ has lost most of its utility
|
425
|
-
and it is the decision of server operators to honor it or not.</p>
|
94
|
+
<li><p class="first">Headers like "Archive" and "X-No-Archive" are sometimes set to prevent an article from
|
95
|
+
being indexed by search engines (e.g., Google). For example, test posts likely don't need
|
96
|
+
to be included in search results. The post-processor can apply both headers to all posts
|
97
|
+
sent to certain newsgroups.</p>
|
98
|
+
<p><strong>NOTE</strong>: As of 2024, the "X-No-Archive" header has limited effectiveness, and it is
|
99
|
+
up to server operators whether or not to honor it.</p>
|
426
100
|
</li>
|
427
|
-
<li><p class="first">
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
This works almost like the <ref/> link in Wikipedia, but the delimiter
|
433
|
-
can be determined in the configuration file.
|
434
|
-
Example (with %=):
|
435
|
-
This is an object %=and this becomes the footnote, describing the object
|
436
|
-
further=%</p>
|
101
|
+
<li><p class="first">Posts that include many references to other posts or URLs can become cluttered. The
|
102
|
+
post-processor can convert marked text into footnotes, similar to the <ref/> link format
|
103
|
+
used in Wikipedia, with the delimiter configurable in the configuration file.
|
104
|
+
Example (using %=):
|
105
|
+
"This is an object %=and this becomes the footnote, describing the object further=%"</p>
|
437
106
|
</li>
|
438
107
|
</ul>
|
439
108
|
</div>
|
440
|
-
<div class="section" id="dialog-
|
441
|
-
<h2>Dialog
|
442
|
-
<p>
|
443
|
-
<p>
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
configuration.</p>
|
109
|
+
<div class="section" id="dialog-for-overriding-settings">
|
110
|
+
<h2>Dialog for Overriding Settings</h2>
|
111
|
+
<p><strong>IMPORTANT</strong>: As of version 1.72, YAD or Zenity cannot be used for the dialog interface.</p>
|
112
|
+
<p>Before the post-processor runs, a dialog can be displayed to allow users to <strong>disable</strong>
|
113
|
+
certain configuration options. If Whiptail or xterm are available, you can choose to
|
114
|
+
disable the following options. You <strong>cannot</strong> enable options that haven't already been set
|
115
|
+
in the configuration.</p>
|
448
116
|
<ul class="simple">
|
449
|
-
<li>Signatures
|
450
|
-
|
451
|
-
<li>Custom
|
452
|
-
<li>The Archive
|
453
|
-
|
454
|
-
<li>Logging can be <strong>
|
117
|
+
<li>Signatures (if set in the configuration) can be <strong>ignored</strong>. A default signature will
|
118
|
+
be used, or no signature at all.</li>
|
119
|
+
<li>Custom headers can be <strong>omitted</strong>.</li>
|
120
|
+
<li>The "Archive" and "X-No-Archive" headers can be <strong>ignored</strong> if set for the current
|
121
|
+
newsgroup.</li>
|
122
|
+
<li>Logging can be <strong>disabled</strong>, if enabled.</li>
|
455
123
|
</ul>
|
456
|
-
<p>
|
124
|
+
<p>Pressing Esc or the Cancel button on the dialog will interrupt the process, and flnews
|
457
125
|
will not post the article.</p>
|
458
|
-
<p>
|
459
|
-
|
460
|
-
OVERRIDE_CONFIG).</p>
|
126
|
+
<p>To disable the dialog entirely (and apply all configured options without further interaction),
|
127
|
+
set the <strong>OVERRIDE_CONFIG</strong> option.</p>
|
461
128
|
</div>
|
462
129
|
</div>
|
463
130
|
<div class="section" id="configuration">
|
464
131
|
<h1>CONFIGURATION</h1>
|
465
|
-
<p>
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
<li>Variables
|
474
|
-
|
475
|
-
<
|
476
|
-
</
|
477
|
-
<
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
Ruby, noted as a String. Beware to mask a backslash '\' by another one,
|
484
|
-
like in the example. A capture-group '()' serves to extract the name from the
|
485
|
-
match result.</p>
|
486
|
-
<p>Leave this field empty to keep the default from the FLNews configuration
|
487
|
-
intact.</p>
|
488
|
-
<p>CONTENT: A String equivalent of a regular expression.</p>
|
132
|
+
<p>Upon first execution of the program, a copy of the original configuration file is created
|
133
|
+
in <em>/home/[user]/.flnews_post_proc.conf</em>. This file is used thereafter. Deleting it will
|
134
|
+
cause the file to be recreated, but any custom changes will be lost.</p>
|
135
|
+
<p>The configuration file uses YAML syntax and includes detailed explanations. The variables
|
136
|
+
within it fall into two categories:</p>
|
137
|
+
<ol class="arabic simple">
|
138
|
+
<li>Variables that represent values originally set by flnews, which can be used or replaced.
|
139
|
+
These elements are typically captured using regular expressions.</li>
|
140
|
+
<li>Variables that define new or modified content.</li>
|
141
|
+
</ol>
|
142
|
+
<div class="section" id="example-configuration-variables">
|
143
|
+
<h2>Example Configuration Variables</h2>
|
144
|
+
<p><strong>FUP_NAME</strong>
|
145
|
+
A regular expression that matches the name of the previous poster in a quoted post. This
|
146
|
+
string is recognized in the original article and used with the matching element from
|
147
|
+
<em>GROUP_INTRO</em>.</p>
|
148
|
+
<p>Leave this field empty to retain the default value from the FLNews configuration.</p>
|
149
|
+
<p>CONTENT: A string representing a regular expression.</p>
|
489
150
|
<p>DEFAULT: EMPTY</p>
|
490
151
|
<p>EXAMPLE1: "On \\d+.\\d+.\\d{2,4} at \\d+:\\d+ <strong>(.*)</strong> wrote:"</p>
|
491
|
-
<p
|
492
|
-
</
|
493
|
-
|
494
|
-
<
|
495
|
-
|
496
|
-
published.</p>
|
497
|
-
<p>Leave this field empty to ignore the precise group.</p>
|
498
|
-
<p>CONTENT: A String equivalent of a regular expression.</p>
|
152
|
+
<p>EXAMPLE2: "<strong>(.*)</strong> wrote:"</p>
|
153
|
+
<p><strong>FUP_GROUP</strong>
|
154
|
+
A regular expression that matches the newsgroup where the quoted post was published.</p>
|
155
|
+
<p>Leave this field empty to ignore the exact group.</p>
|
156
|
+
<p>CONTENT: A string representing a regular expression.</p>
|
499
157
|
<p>DEFAULT: EMPTY</p>
|
500
|
-
<p
|
501
|
-
</
|
502
|
-
|
503
|
-
<
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
<
|
513
|
-
<
|
514
|
-
|
515
|
-
|
516
|
-
<p>
|
517
|
-
|
518
|
-
<p>
|
519
|
-
<p>
|
520
|
-
<
|
521
|
-
|
522
|
-
<
|
523
|
-
<
|
524
|
-
<
|
525
|
-
|
526
|
-
<p>DEFAULT: undefined</p>
|
527
|
-
<div class="last line-block">
|
528
|
-
<div class="line">EXAMPLE (2 headers):</div>
|
529
|
-
<div class="line">- 'X-My-Header: nothing fancy'</div>
|
530
|
-
<div class="line">- 'X-Another-Header: care not!'</div>
|
531
|
-
</div>
|
532
|
-
</dd>
|
533
|
-
<dt><strong>NO_ARCHIVE_GROUPS</strong></dt>
|
534
|
-
<dd><p class="first">The newsgroups, where the headers “Archive: no” and “X-No-Archive: YES” shall
|
535
|
-
be set.</p>
|
536
|
-
<p>CONTENT: a dash and space, then a String, containing the name of the group or a regexp.</p>
|
537
|
-
<p>DEFAULT: empty</p>
|
538
|
-
<div class="last line-block">
|
539
|
-
<div class="line">EXAMPLE (1 group, 1 hierarchy):</div>
|
540
|
-
<div class="line">- "alt.test"</div>
|
541
|
-
<div class="line">- "^news.*"</div>
|
542
|
-
</div>
|
543
|
-
</dd>
|
544
|
-
<dt><strong>DEBUG_LOG</strong></dt>
|
545
|
-
<dd><p class="first">The name of a file, where debug messages are written. Setting this
|
546
|
-
variable will enable the log. Leave empty to disable logging.</p>
|
547
|
-
<p>CONTENT: The name of a writable file, which will be created if inexistent
|
548
|
-
and overwritten if need be.</p>
|
549
|
-
<p>DEFAULT: empty</p>
|
550
|
-
<p class="last">EXAMPLE: '/tmp/a_log-file.txt'</p>
|
551
|
-
</dd>
|
552
|
-
<dt><strong>LOG LEVEL</strong></dt>
|
553
|
-
<dd>One of debug, fatal, error, info, warn</dd>
|
554
|
-
<dt><strong>REFERENCES_SEPARATOR</strong></dt>
|
555
|
-
<dd><p class="first">A symbol or sequence of symbols marking the end of the message-body and the
|
556
|
-
beginning of a list of “references” or “footnotes”. It will only appear, if
|
557
|
-
the original message-body contains text marked for use as such a footnote.
|
558
|
-
See <em>REFERENCES_DELIMITER</em>.</p>
|
559
|
-
<p>If the option is not defined or empty, the list of footnotes will appear
|
560
|
-
below the last line of the message body and no separator will be inserted.</p>
|
561
|
-
<p>CONTENT: A quoted symbol or sequence of symbols.</p>
|
562
|
-
<p>DEFAULT: empty</p>
|
563
|
-
<p class="last">EXAMPLE: '---------'</p>
|
564
|
-
</dd>
|
565
|
-
<dt><strong>REFERENCES_DELIMITER</strong></dt>
|
566
|
-
<dd><p class="first">A sequence of at least two symbols marking the beginning of a text which will
|
567
|
-
serve as footnote (or reference). The <strong>reversed sequence</strong> musst be used to
|
568
|
-
mark the end of the text. The presence of this sequence or symbol in the
|
569
|
-
original message body will cause the enclosed text to be moved below the
|
570
|
-
message body. The <em>REFERENCES_SEPARATOR</em>, if defined, will separate the
|
571
|
-
message from the list of footnotes.
|
572
|
-
If this option is not defined or empty, footnotes are not created.</p>
|
573
|
-
<p>CONTENT a quoted symbol or sequence of symbols.</p>
|
574
|
-
<p>DEFAULT: none/empty</p>
|
575
|
-
<p class="last">EXAMPLE: '%?'</p>
|
158
|
+
<p>EXAMPLE: "wrote in <strong>(.*)</strong>:"</p>
|
159
|
+
<p><strong>GROUP_INTROS</strong>
|
160
|
+
Introductory strings referring to the previous poster in a quoted post. When the newsgroup
|
161
|
+
matches <em>FUP_GROUP</em>, these variables are used in the resulting introduction.</p>
|
162
|
+
<p>CONTENT: A newsgroup or regular expression per line, followed by a colon, space, and string.</p>
|
163
|
+
<p>DEFAULT: As configured in FLNews.</p>
|
164
|
+
<p>EXAMPLE: alt.test: "Thus spoke %fup_name% on that baleful %fup_date%:"</p>
|
165
|
+
<p><strong>GROUP_SIGS</strong>
|
166
|
+
Signature lines for each newsgroup or a path to a file containing signatures, which should be
|
167
|
+
formatted and separated by one empty line. A random signature is picked from the file for each
|
168
|
+
newsgroup. You can also source another file within the signature file by starting a line with
|
169
|
+
". /path/to/other/file".</p>
|
170
|
+
<p>CONTENT: A newsgroup or regular expression per line, followed by a colon, space, and string.</p>
|
171
|
+
<p>DEFAULT: As configured in flnews.</p>
|
172
|
+
<p>EXAMPLE: alt.test: "Signature for alt.test\r\nsecond line"
|
173
|
+
EXAMPLE: comp.*: /home/[user]/.my_sigs</p>
|
174
|
+
<p><strong>CUSTOM_HEADERS</strong>
|
175
|
+
Additional custom headers to be added to outgoing articles.</p>
|
176
|
+
<p>CONTENT: One line per header, starting with a dash and space, followed by the header name and value.</p>
|
177
|
+
<p>DEFAULT: Undefined</p>
|
178
|
+
<dl class="docutils">
|
179
|
+
<dt>EXAMPLE:</dt>
|
180
|
+
<dd><ul class="first last simple">
|
181
|
+
<li>'X-My-Header: nothing fancy'</li>
|
182
|
+
<li>'X-Another-Header: care not!'</li>
|
183
|
+
</ul>
|
576
184
|
</dd>
|
577
|
-
|
578
|
-
<
|
579
|
-
|
580
|
-
<p>
|
581
|
-
<p
|
185
|
+
</dl>
|
186
|
+
<p><strong>NO_ARCHIVE_GROUPS</strong>
|
187
|
+
Newsgroups where the "Archive: no" and "X-No-Archive: YES" headers should be set.</p>
|
188
|
+
<p>CONTENT: A line with a dash and space, followed by the group name or a regular expression.</p>
|
189
|
+
<p>DEFAULT: Empty</p>
|
190
|
+
<dl class="docutils">
|
191
|
+
<dt>EXAMPLE:</dt>
|
192
|
+
<dd><ul class="first last simple">
|
193
|
+
<li>"alt.test"</li>
|
194
|
+
<li>"^news.*"</li>
|
195
|
+
</ul>
|
582
196
|
</dd>
|
583
|
-
|
584
|
-
<
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
<p>
|
590
|
-
<p>
|
197
|
+
</dl>
|
198
|
+
<p><strong>DEBUG_LOG</strong>
|
199
|
+
The name of the file where debug messages are logged. If specified, logging will be enabled.
|
200
|
+
If empty, logging is disabled.</p>
|
201
|
+
<p>CONTENT: The name of a writable file, which will be created if it doesn't exist and overwritten if necessary.</p>
|
202
|
+
<p>DEFAULT: Empty</p>
|
203
|
+
<p>EXAMPLE: '/tmp/a_log-file.txt'</p>
|
204
|
+
<p><strong>LOG LEVEL</strong>
|
205
|
+
One of: debug, fatal, error, info, warn.</p>
|
206
|
+
<p><strong>REFERENCES_SEPARATOR</strong>
|
207
|
+
A symbol or sequence marking the end of the message body and the beginning of a footnote list.
|
208
|
+
If not defined, footnotes are appended directly after the message body.</p>
|
209
|
+
<p>CONTENT: A quoted symbol or sequence.</p>
|
210
|
+
<p>DEFAULT: Empty</p>
|
211
|
+
<p>EXAMPLE: '---------'</p>
|
212
|
+
<p><strong>REFERENCES_DELIMITER</strong>
|
213
|
+
A sequence marking the beginning and end of text to be used as a footnote or reference. The reversed
|
214
|
+
sequence is used to mark the end.</p>
|
215
|
+
<p>CONTENT: A quoted symbol or sequence.</p>
|
216
|
+
<p>DEFAULT: None (empty)</p>
|
217
|
+
<p>EXAMPLE: '%?'</p>
|
218
|
+
<p><strong>REFERENCE_FORMAT</strong>
|
219
|
+
A format string using <cite>%s</cite> for a number to replace the reference text in the body.</p>
|
220
|
+
<p>DEFAULT: " %s)" → becomes 1) ... 2) ... 3)</p>
|
221
|
+
<p>EXAMPLE: "(%s)" → becomes (1) ... (2) ... (3)</p>
|
222
|
+
<p><strong>VFY_URLS</strong>
|
223
|
+
A boolean constant determining whether URLs should be verified and corrected if necessary.
|
224
|
+
URL manipulations include adding angular brackets ('<', '>') and slashes after "http(s):".</p>
|
225
|
+
<p>CONTENT: One of YES, yes, NO, no (case insensitive).</p>
|
591
226
|
<p>DEFAULT: yes</p>
|
592
|
-
<p
|
593
|
-
</
|
594
|
-
|
595
|
-
<
|
596
|
-
options before an article is posted: GROUP_SIGS, XNAY_GROUPS, CUSTOM_HEADERS,
|
597
|
-
DEBUG_LOG and VFY_URLS. A dialog may be displayed which allows you to disable
|
598
|
-
any of these five options, so that the defaults from flnews prevail.</p>
|
599
|
-
<p>ATTN! Canceling the dialog or pushing the Esc-key does interrupt the process.
|
600
|
-
Flnews will not post the article.</p>
|
601
|
-
<p>Set this option to no, NO or similar to disable the dialog.</p>
|
227
|
+
<p>EXAMPLE: ... I leave this to your discretion.</p>
|
228
|
+
<p><strong>OVERRIDE_CONFIG</strong>
|
229
|
+
A boolean constant that controls whether configuration options can be overridden before posting.</p>
|
230
|
+
<p>Set this to "no" to disable the dialog.</p>
|
602
231
|
<p>DEFAULT: yes</p>
|
603
|
-
<p
|
604
|
-
</
|
605
|
-
</dl>
|
232
|
+
<p>EXAMPLE: No</p>
|
233
|
+
</div>
|
606
234
|
</div>
|
607
235
|
<div class="section" id="other-information">
|
608
236
|
<h1>Other Information</h1>
|
609
237
|
<div class="section" id="testing">
|
610
238
|
<h2>Testing</h2>
|
611
|
-
<p>
|
612
|
-
verified in two ways:</p>
|
239
|
+
<p>You can verify the post-processor’s effect by using one of two methods:</p>
|
613
240
|
<ol class="arabic">
|
614
|
-
<li><p class="first">
|
241
|
+
<li><p class="first">Pipe a saved post into the program:</p>
|
615
242
|
<p><strong>:~$ /usr/local/bin/[post-processor] < [test-article]</strong></p>
|
616
|
-
<p>This will show the
|
617
|
-
can also pipe the output into another file. This is a great way to test a
|
618
|
-
program during development or to test your own configuration of the program.</p>
|
243
|
+
<p>This will show the modified article, and you can pipe it into another file for further testing.</p>
|
619
244
|
</li>
|
620
|
-
<li><p class="first">
|
621
|
-
|
622
|
-
settings of the post-processor will affect the article.</p>
|
245
|
+
<li><p class="first">Post directly to a test newsgroup (e.g., alt.test). This is essential before posting to
|
246
|
+
real newsgroups, especially when the post-processor will alter the article.</p>
|
623
247
|
</li>
|
624
248
|
</ol>
|
625
249
|
</div>
|
626
250
|
<div class="section" id="source-code">
|
627
|
-
<h2>Source
|
628
|
-
<p>The gem
|
629
|
-
|
630
|
-
its content, you must</p>
|
251
|
+
<h2>Source Code</h2>
|
252
|
+
<p>The gem file for the program, available via the gem utility or rubygems.org, contains all
|
253
|
+
the source code and documentation (this page included). To extract it, do the following:</p>
|
631
254
|
<ol class="arabic simple">
|
632
|
-
<li>
|
633
|
-
<li>
|
634
|
-
<li>
|
255
|
+
<li>Extract the gem file: <cite>tar -xf flnews_post_proc-0.1.gem</cite></li>
|
256
|
+
<li>Uncompress the data archive: <cite>gunzip data.gz</cite></li>
|
257
|
+
<li>Extract the data archive: <cite>tar -xf data.tar</cite></li>
|
635
258
|
</ol>
|
636
|
-
<p>This
|
259
|
+
<p>This will create the directories <cite>bin</cite>, <cite>doc</cite>, and <cite>lib</cite>.</p>
|
637
260
|
</div>
|
638
261
|
<div class="section" id="license">
|
639
262
|
<h2>License</h2>
|
640
|
-
<p>flnews_post_proc is distributed under the
|
641
|
-
|
642
|
-
directory of the gem
|
263
|
+
<p>The flnews_post_proc is distributed under the WTFPL-2.0 or later License.
|
264
|
+
For more details, visit <a class="reference external" href="http://www.wtfpl.net/txt/copying/">http://www.wtfpl.net/txt/copying/</a> or refer to the license file in the
|
265
|
+
documentation directory of the gem.</p>
|
643
266
|
</div>
|
644
267
|
<div class="section" id="author">
|
645
268
|
<h2>Author</h2>
|
646
|
-
<
|
647
|
-
|
648
|
-
<div class="line">Michael Uplawski <<a class="reference external" href="mailto:michael.uplawski@uplawski.eu">michael.uplawski@uplawski.eu</a>></div>
|
649
|
-
</div>
|
269
|
+
<p>flnews_post_proc has been developed by
|
270
|
+
Michael Uplawski <<a class="reference external" href="mailto:michael.uplawski@uplawski.eu">michael.uplawski@uplawski.eu</a>></p>
|
650
271
|
</div>
|
651
272
|
</div>
|
652
273
|
<div class="section" id="section-1">
|