flnews_post_proc 1.62 → 1.70
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/doc/fr/html/flnews_post_proc.html +33 -342
- 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 +8 -2
- data/doc/html/flnews_post_proc.html +33 -342
- 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 +8 -2
- data/lib/newsgroups.rb +25 -5
- data/lib/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1154fced020bd8562041d85157d723b91cd81466678718cd4ea92f4f04a9b286
|
4
|
+
data.tar.gz: de908508f8abeb90fea5d4ce2a656085db492688fd43dcb6dfb63d24c625ef8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88b0acd2b3587720ec3850039a23df22d81b572aa3abfc18ed61e63ed42c89166be41b5ae4b5b194bd2a773b684ed73ab4afd3cd30d85483db4444e6bbc2e3e9
|
7
|
+
data.tar.gz: 3555138eb59e5d59e2fffbd3bf5c9459d7b80cc7c039379b461e1ee6edda7618203f6b80c47661a12ae6eb0fc7f84a74640cb36a19045ef3e554265998522d8d
|
data/README.md
CHANGED
@@ -83,7 +83,8 @@ some users may not always agree with the result and for arbitrary reasons:
|
|
83
83
|
would like to replace it against another, based on the newsgroup you are
|
84
84
|
about to post to.
|
85
85
|
The post-processor program sets specific signatures as configured for one
|
86
|
-
or several newsgroups.
|
86
|
+
or several newsgroups. You can even define a list of signatures and have
|
87
|
+
the program pick one from the list.
|
87
88
|
|
88
89
|
* Some custom headers may serve to convey additional information to
|
89
90
|
interested readers of your post, like GnuPG key IDs, your language skills
|
@@ -210,6 +211,9 @@ intact.
|
|
210
211
|
|
211
212
|
**GROUP_SIGS**
|
212
213
|
A signature line per Newsgroup.
|
214
|
+
If a file is named instead, the program will pick randomly one signature from
|
215
|
+
that file. The file should contain signatures, separated by 1 empty line.
|
216
|
+
|
213
217
|
ATTN! In multi line signatures, you have to use \r\n for line breaks.
|
214
218
|
|
215
219
|
CONTENT: A newsgroup or regexp per line, followed by a colon, a space and a String.
|
@@ -217,6 +221,7 @@ intact.
|
|
217
221
|
DEFAULT: As configured in flnews
|
218
222
|
|
219
223
|
EXAMPLE: alt.test: _"Signature for alt.test\\\\r\\\\nsecond line"_
|
224
|
+
EXAMPLE: comp.*: /home/user/.my_sigs
|
220
225
|
|
221
226
|
**CUSTOM_HEADERS**
|
222
227
|
Additional headers for the outgoing article
|
@@ -3,360 +3,47 @@
|
|
3
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<meta name="generator" content="Docutils 0.
|
7
|
-
<title>
|
6
|
+
<meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" />
|
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
|
-
|
17
|
-
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
18
|
-
customize this style sheet.
|
15
|
+
Stylesheet for use with Docutils.
|
19
16
|
*/
|
20
17
|
|
21
|
-
/*
|
22
|
-
|
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 }
|
18
|
+
/* The defaults for docutils */
|
19
|
+
@import url(html4css1.css);
|
57
20
|
|
58
|
-
|
59
|
-
|
21
|
+
body {
|
22
|
+
background-color:#e0f0a0;
|
23
|
+
font-family: Verdana,Helvetica,Univers;
|
60
24
|
}
|
61
25
|
|
62
|
-
|
63
|
-
|
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 }
|
26
|
+
h1 {color:darkblue;font-size:1.5em;}
|
27
|
+
h1.title {color:#a0a0f0;font-size:2em;}
|
106
28
|
|
107
|
-
|
108
|
-
|
109
|
-
font-style: normal }
|
29
|
+
p, ul.simple, ol.simple, dt {margin-left:2em;}
|
30
|
+
dd {margin-left:4em;}
|
110
31
|
|
111
|
-
|
112
|
-
|
113
|
-
|
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;}
|
114
37
|
|
115
|
-
|
116
|
-
|
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 }
|
128
|
-
|
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 }
|
137
|
-
|
138
|
-
div.sidebar p.rubric {
|
139
|
-
font-family: sans-serif ;
|
140
|
-
font-size: medium }
|
141
|
-
|
142
|
-
div.system-messages {
|
143
|
-
margin: 5em }
|
144
|
-
|
145
|
-
div.system-messages h1 {
|
146
|
-
color: red }
|
147
|
-
|
148
|
-
div.system-message {
|
149
|
-
border: medium outset ;
|
150
|
-
padding: 1em }
|
151
|
-
|
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 }
|
165
|
-
|
166
|
-
h2.subtitle {
|
167
|
-
text-align: center }
|
168
|
-
|
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;
|
38
|
+
em {color:#000080;
|
39
|
+
background-color:#ffffa0;
|
191
40
|
}
|
192
41
|
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
.align-center {
|
197
|
-
clear: both ;
|
198
|
-
text-align: center }
|
199
|
-
|
200
|
-
.align-right {
|
201
|
-
text-align: right }
|
202
|
-
|
203
|
-
/* reset inner alignment in figures */
|
204
|
-
div.align-right {
|
205
|
-
text-align: inherit }
|
206
|
-
|
207
|
-
/* div.align-center * { */
|
208
|
-
/* text-align: left } */
|
209
|
-
|
210
|
-
.align-top {
|
211
|
-
vertical-align: top }
|
212
|
-
|
213
|
-
.align-middle {
|
214
|
-
vertical-align: middle }
|
215
|
-
|
216
|
-
.align-bottom {
|
217
|
-
vertical-align: bottom }
|
218
|
-
|
219
|
-
ol.simple, ul.simple {
|
220
|
-
margin-bottom: 1em }
|
221
|
-
|
222
|
-
ol.arabic {
|
223
|
-
list-style: decimal }
|
224
|
-
|
225
|
-
ol.loweralpha {
|
226
|
-
list-style: lower-alpha }
|
227
|
-
|
228
|
-
ol.upperalpha {
|
229
|
-
list-style: upper-alpha }
|
230
|
-
|
231
|
-
ol.lowerroman {
|
232
|
-
list-style: lower-roman }
|
233
|
-
|
234
|
-
ol.upperroman {
|
235
|
-
list-style: upper-roman }
|
236
|
-
|
237
|
-
p.attribution {
|
238
|
-
text-align: right ;
|
239
|
-
margin-left: 50% }
|
240
|
-
|
241
|
-
p.caption {
|
242
|
-
font-style: italic }
|
243
|
-
|
244
|
-
p.credits {
|
245
|
-
font-style: italic ;
|
246
|
-
font-size: smaller }
|
247
|
-
|
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}
|
286
|
-
|
287
|
-
span.classifier {
|
288
|
-
font-family: sans-serif ;
|
289
|
-
font-style: oblique }
|
290
|
-
|
291
|
-
span.classifier-delimiter {
|
292
|
-
font-family: sans-serif ;
|
293
|
-
font-weight: bold }
|
294
|
-
|
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 }
|
306
|
-
|
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;
|
42
|
+
blockquote {background-color:#ffc090;
|
43
|
+
padding:0.5em;
|
44
|
+
border-radius:0.5em;
|
351
45
|
}
|
352
46
|
|
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
47
|
</style>
|
361
48
|
</head>
|
362
49
|
<body>
|
@@ -411,7 +98,9 @@ spécifiques, à chaque fois pour une ou plusieurs newsgroups.</p>
|
|
411
98
|
la remplacer contre une autre, selon le groupe dans lequel vous êtes en train
|
412
99
|
de poster.</p>
|
413
100
|
<p>flnews_post_proc peut faire exactement ça, quand vous avez configuré quel
|
414
|
-
signature doit apparaître dans quel newsgroup ou liste de newsgroups
|
101
|
+
signature doit apparaître dans quel newsgroup ou liste de newsgroups. Le
|
102
|
+
logiciel peut même choisir par hazard une signature, si un fichier, qui en
|
103
|
+
contient plusieurs, est noté dans la configuration.</p>
|
415
104
|
</li>
|
416
105
|
<li><p class="first">Quelques entêtes supplémentaires peuvent servir à transmettre des informations
|
417
106
|
aux lecteurs intéressés, comme l'ID de votre clé GnuPG, vos connaissances en
|
@@ -534,13 +223,15 @@ dans l'introduction resultant.</p>
|
|
534
223
|
</div>
|
535
224
|
</dd>
|
536
225
|
<dt><strong>GROUP_SIGS</strong></dt>
|
537
|
-
<dd><p class="first">Une signature par newsgroup ou expression
|
538
|
-
|
226
|
+
<dd><p class="first">Une signature par newsgroup ou expression ou le chemin d'accès d'un fichier,
|
227
|
+
contenant plusieurs signatures, séparé par une ligne vide.</p>
|
228
|
+
<p>ATTN! Vous devez noter \r\n pour les sautes de lignes, si une signature
|
539
229
|
s'étend sur plusieurs lignes.</p>
|
540
230
|
<p>CONTENU : un newsgroup ou expression par ligne, suivi de deux poins, un espace
|
541
231
|
et une chaîne de caractères.</p>
|
542
232
|
<p>PAR DÉFAUT : Comme configuré dans flnews.</p>
|
543
|
-
<p
|
233
|
+
<p>EXEMPLE : fr.test: "Signature pour alt.test\r\nseconde ligne"</p>
|
234
|
+
<p class="last">EXEMPLE : alt.fr.test: /home/[utilisateur]/.signatures</p>
|
544
235
|
</dd>
|
545
236
|
<dt><strong>CUSTOM_HEADERS</strong></dt>
|
546
237
|
<dd><p class="first">Entêtes supplémentaires pour l'article sortant.</p>
|
Binary file
|
Binary file
|
@@ -62,7 +62,9 @@ et ce pour des raisons arbitraires :
|
|
62
62
|
de poster.
|
63
63
|
|
64
64
|
flnews_post_proc peut faire exactement ça, quand vous avez configuré quel
|
65
|
-
signature doit apparaître dans quel newsgroup ou liste de newsgroups.
|
65
|
+
signature doit apparaître dans quel newsgroup ou liste de newsgroups. Le
|
66
|
+
logiciel peut même choisir par hazard une signature, si un fichier, qui en
|
67
|
+
contient plusieurs, est noté dans la configuration.
|
66
68
|
|
67
69
|
* Quelques entêtes supplémentaires peuvent servir à transmettre des informations
|
68
70
|
aux lecteurs intéressés, comme l'ID de votre clé GnuPG, vos connaissances en
|
@@ -198,7 +200,9 @@ variables définis dans ce fichier peuvent être classées en deux catégories :
|
|
198
200
|
| fr\\.*: "C'était dans %fup_group%, que %fup_name% c'est exprimé ainsi"
|
199
201
|
|
200
202
|
**GROUP_SIGS**
|
201
|
-
Une signature par newsgroup ou expression
|
203
|
+
Une signature par newsgroup ou expression ou le chemin d'accès d'un fichier,
|
204
|
+
contenant plusieurs signatures, séparé par une ligne vide.
|
205
|
+
|
202
206
|
ATTN! Vous devez noter \\r\\n pour les sautes de lignes, si une signature
|
203
207
|
s'étend sur plusieurs lignes.
|
204
208
|
|
@@ -209,6 +213,8 @@ variables définis dans ce fichier peuvent être classées en deux catégories :
|
|
209
213
|
|
210
214
|
EXEMPLE : fr.test: "Signature pour alt.test\\r\\nseconde ligne"
|
211
215
|
|
216
|
+
EXEMPLE : alt.fr.test: /home/[utilisateur]/.signatures
|
217
|
+
|
212
218
|
**CUSTOM_HEADERS**
|
213
219
|
Entêtes supplémentaires pour l'article sortant.
|
214
220
|
|
@@ -3,360 +3,47 @@
|
|
3
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<meta name="generator" content="Docutils 0.
|
7
|
-
<title>
|
6
|
+
<meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" />
|
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
|
-
|
17
|
-
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
18
|
-
customize this style sheet.
|
15
|
+
Stylesheet for use with Docutils.
|
19
16
|
*/
|
20
17
|
|
21
|
-
/*
|
22
|
-
|
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 }
|
18
|
+
/* The defaults for docutils */
|
19
|
+
@import url(html4css1.css);
|
57
20
|
|
58
|
-
|
59
|
-
|
21
|
+
body {
|
22
|
+
background-color:#e0f0a0;
|
23
|
+
font-family: Verdana,Helvetica,Univers;
|
60
24
|
}
|
61
25
|
|
62
|
-
|
63
|
-
|
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 }
|
26
|
+
h1 {color:darkblue;font-size:1.5em;}
|
27
|
+
h1.title {color:#a0a0f0;font-size:2em;}
|
106
28
|
|
107
|
-
|
108
|
-
|
109
|
-
font-style: normal }
|
29
|
+
p, ul.simple, ol.simple, dt {margin-left:2em;}
|
30
|
+
dd {margin-left:4em;}
|
110
31
|
|
111
|
-
|
112
|
-
|
113
|
-
|
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;}
|
114
37
|
|
115
|
-
|
116
|
-
|
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 }
|
128
|
-
|
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 }
|
137
|
-
|
138
|
-
div.sidebar p.rubric {
|
139
|
-
font-family: sans-serif ;
|
140
|
-
font-size: medium }
|
141
|
-
|
142
|
-
div.system-messages {
|
143
|
-
margin: 5em }
|
144
|
-
|
145
|
-
div.system-messages h1 {
|
146
|
-
color: red }
|
147
|
-
|
148
|
-
div.system-message {
|
149
|
-
border: medium outset ;
|
150
|
-
padding: 1em }
|
151
|
-
|
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 }
|
165
|
-
|
166
|
-
h2.subtitle {
|
167
|
-
text-align: center }
|
168
|
-
|
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;
|
38
|
+
em {color:#000080;
|
39
|
+
background-color:#ffffa0;
|
191
40
|
}
|
192
41
|
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
.align-center {
|
197
|
-
clear: both ;
|
198
|
-
text-align: center }
|
199
|
-
|
200
|
-
.align-right {
|
201
|
-
text-align: right }
|
202
|
-
|
203
|
-
/* reset inner alignment in figures */
|
204
|
-
div.align-right {
|
205
|
-
text-align: inherit }
|
206
|
-
|
207
|
-
/* div.align-center * { */
|
208
|
-
/* text-align: left } */
|
209
|
-
|
210
|
-
.align-top {
|
211
|
-
vertical-align: top }
|
212
|
-
|
213
|
-
.align-middle {
|
214
|
-
vertical-align: middle }
|
215
|
-
|
216
|
-
.align-bottom {
|
217
|
-
vertical-align: bottom }
|
218
|
-
|
219
|
-
ol.simple, ul.simple {
|
220
|
-
margin-bottom: 1em }
|
221
|
-
|
222
|
-
ol.arabic {
|
223
|
-
list-style: decimal }
|
224
|
-
|
225
|
-
ol.loweralpha {
|
226
|
-
list-style: lower-alpha }
|
227
|
-
|
228
|
-
ol.upperalpha {
|
229
|
-
list-style: upper-alpha }
|
230
|
-
|
231
|
-
ol.lowerroman {
|
232
|
-
list-style: lower-roman }
|
233
|
-
|
234
|
-
ol.upperroman {
|
235
|
-
list-style: upper-roman }
|
236
|
-
|
237
|
-
p.attribution {
|
238
|
-
text-align: right ;
|
239
|
-
margin-left: 50% }
|
240
|
-
|
241
|
-
p.caption {
|
242
|
-
font-style: italic }
|
243
|
-
|
244
|
-
p.credits {
|
245
|
-
font-style: italic ;
|
246
|
-
font-size: smaller }
|
247
|
-
|
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}
|
286
|
-
|
287
|
-
span.classifier {
|
288
|
-
font-family: sans-serif ;
|
289
|
-
font-style: oblique }
|
290
|
-
|
291
|
-
span.classifier-delimiter {
|
292
|
-
font-family: sans-serif ;
|
293
|
-
font-weight: bold }
|
294
|
-
|
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 }
|
306
|
-
|
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;
|
42
|
+
blockquote {background-color:#ffc090;
|
43
|
+
padding:0.5em;
|
44
|
+
border-radius:0.5em;
|
351
45
|
}
|
352
46
|
|
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
47
|
</style>
|
361
48
|
</head>
|
362
49
|
<body>
|
@@ -403,7 +90,8 @@ chosen for one or several newsgroups.</p>
|
|
403
90
|
would like to replace it against another, based on the newsgroup you are
|
404
91
|
about to post to.
|
405
92
|
The post-processor program sets specific signatures as configured for one
|
406
|
-
or several newsgroups
|
93
|
+
or several newsgroups. You can even specify that a signature should be
|
94
|
+
picked randomly from a file, containing several signatures.</p>
|
407
95
|
</li>
|
408
96
|
<li><p class="first">Some custom headers may serve to convey additional information to
|
409
97
|
interested readers of your post, like GnuPG key IDs, your language skills
|
@@ -507,11 +195,14 @@ introductory string.</p>
|
|
507
195
|
<p class="last">EXAMPLE: alt.test: "Thus spoke %fup_name% on that baleful %fup_date%:"</p>
|
508
196
|
</dd>
|
509
197
|
<dt><strong>GROUP_SIGS</strong></dt>
|
510
|
-
<dd><p class="first">A signature line per Newsgroup.
|
511
|
-
|
198
|
+
<dd><p class="first">A signature line per Newsgroup or a file path. The file should contain signatures,
|
199
|
+
already formatted and separated by 1 empty line. The program will randomly pick
|
200
|
+
one signature from the list.</p>
|
201
|
+
<p>ATTN! In multi line signatures, you have to use \r\n for line breaks.</p>
|
512
202
|
<p>CONTENT: A newsgroup or regexp per line, followed by a colon, a space and a String.</p>
|
513
203
|
<p>DEFAULT: As configured in flnews</p>
|
514
|
-
<p
|
204
|
+
<p>EXAMPLE: alt.test: "Signature for alt.test\r\nsecond line"</p>
|
205
|
+
<p class="last">EXAMPLE: comp.*: /home/[user]/.my_sigs</p>
|
515
206
|
</dd>
|
516
207
|
<dt><strong>CUSTOM_HEADERS</strong></dt>
|
517
208
|
<dd><p class="first">Additional headers for the outgoing article</p>
|
Binary file
|
Binary file
|
@@ -50,7 +50,8 @@ some users may not always agree with the result and for arbitrary reasons:
|
|
50
50
|
would like to replace it against another, based on the newsgroup you are
|
51
51
|
about to post to.
|
52
52
|
The post-processor program sets specific signatures as configured for one
|
53
|
-
or several newsgroups.
|
53
|
+
or several newsgroups. You can even specify that a signature should be
|
54
|
+
picked randomly from a file, containing several signatures.
|
54
55
|
|
55
56
|
* Some custom headers may serve to convey additional information to
|
56
57
|
interested readers of your post, like GnuPG key IDs, your language skills
|
@@ -167,7 +168,10 @@ categories:
|
|
167
168
|
EXAMPLE: alt.test: "Thus spoke %fup_name% on that baleful %fup_date%:"
|
168
169
|
|
169
170
|
**GROUP_SIGS**
|
170
|
-
A signature line per Newsgroup.
|
171
|
+
A signature line per Newsgroup or a file path. The file should contain signatures,
|
172
|
+
already formatted and separated by 1 empty line. The program will randomly pick
|
173
|
+
one signature from the list.
|
174
|
+
|
171
175
|
ATTN! In multi line signatures, you have to use \\r\\n for line breaks.
|
172
176
|
|
173
177
|
CONTENT: A newsgroup or regexp per line, followed by a colon, a space and a String.
|
@@ -175,6 +179,8 @@ categories:
|
|
175
179
|
DEFAULT: As configured in flnews
|
176
180
|
|
177
181
|
EXAMPLE: alt.test: "Signature for alt.test\\r\\nsecond line"
|
182
|
+
|
183
|
+
EXAMPLE: comp.*: /home/[user]/.my_sigs
|
178
184
|
|
179
185
|
**CUSTOM_HEADERS**
|
180
186
|
Additional headers for the outgoing article
|
data/lib/newsgroups.rb
CHANGED
@@ -75,6 +75,7 @@ class Newsgroups
|
|
75
75
|
|
76
76
|
# replace all \n by \r\n
|
77
77
|
def correct_linebreaks(text)
|
78
|
+
debug 'correcting linebreaks in ' << text
|
78
79
|
warned = false
|
79
80
|
# find all lonely \n
|
80
81
|
while text.match(/([^\r])\n/) do
|
@@ -82,6 +83,7 @@ class Newsgroups
|
|
82
83
|
warned ||= true
|
83
84
|
# ... and silently marry them to \r
|
84
85
|
text.gsub!($~[0],$~[1] + "\r\n")
|
86
|
+
text.gsub!("\n ", "\n")
|
85
87
|
# Luxury you can afford.
|
86
88
|
end # \n
|
87
89
|
text
|
@@ -93,27 +95,31 @@ class Newsgroups
|
|
93
95
|
# 1 group
|
94
96
|
group = @groups[0]
|
95
97
|
gsigs = @config.GROUP_SIGS
|
98
|
+
tsig = nil
|
96
99
|
|
97
100
|
if gsigs && gsigs.respond_to?(:to_hash)
|
98
101
|
# find the signature for the group
|
99
102
|
# either by name
|
100
103
|
if gsigs.keys.include?(group)
|
101
|
-
|
102
|
-
debug('signature is ' <<
|
104
|
+
tsig = gsigs[group]
|
105
|
+
debug('signature is ' << tsig ) if tsig
|
103
106
|
# .., or by applying a regexp.
|
104
107
|
else
|
105
108
|
gsigs.each do |g, s|
|
106
|
-
unless
|
109
|
+
unless tsig
|
107
110
|
rg = Regexp.new(g)
|
108
111
|
sm = group.match(rg)
|
109
112
|
debug('signature for group(s) ' << g << ': ' << s) if sm
|
110
113
|
if sm
|
111
|
-
|
112
|
-
@signature.gsub!("\n ", "\n")
|
114
|
+
tsig = s
|
113
115
|
end # if sm
|
114
116
|
end # if no signature
|
115
117
|
end # gsigs.each
|
116
118
|
end # gsigs for group?
|
119
|
+
if tsig && tsig.start_with?('/')
|
120
|
+
tsig = pick_sig(tsig)
|
121
|
+
end
|
122
|
+
@signature = correct_linebreaks(tsig) if tsig
|
117
123
|
else # gsigs and is hash?
|
118
124
|
msg = "Cannot read the signatures from the configuration."
|
119
125
|
msg << "\nPlease verify that GROUP_SIGS is set."
|
@@ -121,6 +127,20 @@ class Newsgroups
|
|
121
127
|
end
|
122
128
|
end
|
123
129
|
|
130
|
+
# pick a random signature
|
131
|
+
def pick_sig(sigfile)
|
132
|
+
debug 'picking signature from ' << sigfile.to_s
|
133
|
+
if sigfile && !sigfile.empty? && File.exist?(sigfile) && File.readable?(sigfile)
|
134
|
+
allSigs = File::read(sigfile).split("\n\n")
|
135
|
+
numSigs = allSigs.length
|
136
|
+
srand(Time.now.nsec)
|
137
|
+
allSigs[rand(numSigs)]
|
138
|
+
else
|
139
|
+
error 'Cannot read signature from file ' << sigfile
|
140
|
+
nil
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
124
144
|
# define the no_archive header.
|
125
145
|
def set_no_archive
|
126
146
|
@no_archive = nil
|
data/lib/version.rb
CHANGED
@@ -14,9 +14,9 @@
|
|
14
14
|
=end
|
15
15
|
|
16
16
|
PROGNAME = 'flnews_post_proc'
|
17
|
-
PROGVERSION = "1.
|
17
|
+
PROGVERSION = "1.70"
|
18
18
|
AUTHORS = "Michael Uplawski"
|
19
19
|
EMAIL = "michael.uplawski@uplawski.eu"
|
20
20
|
YEARS = "2023 - 2024"
|
21
|
-
SUMMARY = "
|
21
|
+
SUMMARY = "Read random signature from file"
|
22
22
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flnews_post_proc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.70'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Uplawski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: diffy
|
@@ -105,5 +105,5 @@ requirements: []
|
|
105
105
|
rubygems_version: 3.5.3
|
106
106
|
signing_key:
|
107
107
|
specification_version: 4
|
108
|
-
summary:
|
108
|
+
summary: Read random signature from file
|
109
109
|
test_files: []
|