flnews_post_proc 1.72 → 1.73
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 +5 -3
- data/doc/fr/html/flnews_post_proc.html +14 -7
- 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 +15 -8
- data/doc/html/flnews_post_proc.html +31 -340
- 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 +7 -3
- data/lib/body.rb +1 -1
- data/lib/newsgroups.rb +46 -1
- data/lib/version.rb +3 -3
- 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: 2dc06bd3fe25834f7366d0165349d8d00c5f1678e5ca0551b21a6c64a05de131
|
4
|
+
data.tar.gz: 69f83400debeae671fddf69d0c151d0dbead9b06f1c132a85aff36a8c6196ad4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4694d0f990232d43c55a2eda2f352edbbeedb5a2fab3def80b285b9bc9feb26bb7d71fabc0de60ef3268d011efc4e637c982bb71d4189bbaaae5087b4c01c58
|
7
|
+
data.tar.gz: 76214a9427048497785a5f0ea2758117adb1a518dbcddf3d1e7b0c3add53edd64443ed9c55ec33cf672c761818cae19ffce8b80a9f124d0ed0c625708d73d8b4
|
data/README.md
CHANGED
@@ -121,10 +121,12 @@ some users may not always agree with the result and for arbitrary reasons:
|
|
121
121
|
|
122
122
|
Dialog to override settings
|
123
123
|
---------------------------
|
124
|
+
ATTN! As of version 1.72, YAD and Zenity are no longer used for the dialog.
|
125
|
+
|
124
126
|
You can have a dialog displayed just before the post-processor is invoked, to
|
125
|
-
**disable** some configuration options. Provided that
|
126
|
-
|
127
|
-
|
127
|
+
**disable** some configuration options. Provided that Whiptail or only xterm
|
128
|
+
are available on your computer, you can choose from the following options.
|
129
|
+
You **cannot** use the dialog to enable options which
|
128
130
|
have not yet been set in the configuration.
|
129
131
|
|
130
132
|
* Signatures, as set in the configuration **can be ignored**. Either
|
@@ -138,12 +138,14 @@ l'objet plus précisement=% »</p>
|
|
138
138
|
</div>
|
139
139
|
<div class="section" id="dialogue-pour-desactiver-des-options">
|
140
140
|
<h2>Dialogue pour désactiver des options</h2>
|
141
|
+
<p>ATTN! Depuis la version 1.72, YAD et Zenity ne sont plus utilisés pour le
|
142
|
+
dialogue.</p>
|
141
143
|
<p>Juste avant d'entrer en action, flnews_post_proc peut afficher un dialogue, qui
|
142
144
|
vous laisse <strong>désactiver</strong> des options fixées dans la configuration. Sous
|
143
|
-
condition
|
144
|
-
|
145
|
-
|
146
|
-
des options, qui ne l'ont pas été auparavant :</p>
|
145
|
+
condition que Whiptail ou seulement xterm est disponible, vous pouvez choisir
|
146
|
+
dans les options suivantes, ceux que vous voulez ignorer pour l'article en
|
147
|
+
préparation.
|
148
|
+
Vous <strong>ne pouvez pas</strong> activer des options, qui ne l'ont pas été auparavant :</p>
|
147
149
|
<ul class="simple">
|
148
150
|
<li>Signatures, comme définis dans la configuration <strong>peuvent être ignorées</strong>.
|
149
151
|
Soit une signature par défaut sera appliquée, si prévue, ou aucune.</li>
|
@@ -224,9 +226,14 @@ dans l'introduction resultant.</p>
|
|
224
226
|
</dd>
|
225
227
|
<dt><strong>GROUP_SIGS</strong></dt>
|
226
228
|
<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
|
228
|
-
|
229
|
-
|
229
|
+
contenant plusieurs signatures, séparé par une ligne vide. Vous pouvez inclure
|
230
|
+
(“source”) le contenu d'autres fichiers dans la liste des signatures, en
|
231
|
+
indiquant dans le fichier d'origine le nom de l'autre fichier après un point
|
232
|
+
et un espace, comme dans:
|
233
|
+
. /home/user/.plus_de_signatures
|
234
|
+
Ceci ne fonctionne que dans le fichier indiqué dans la configuration, pas dans
|
235
|
+
les fichiers inclus. Prenez soin d'insérer une ligne vide entre chaque ligne
|
236
|
+
qui inclut un fichier et la suivante.</p>
|
230
237
|
<p>CONTENU : un newsgroup ou expression par ligne, suivi de deux poins, un espace
|
231
238
|
et une chaîne de caractères.</p>
|
232
239
|
<p>PAR DÉFAUT : Comme configuré dans flnews.</p>
|
Binary file
|
Binary file
|
@@ -105,12 +105,15 @@ et ce pour des raisons arbitraires :
|
|
105
105
|
|
106
106
|
Dialogue pour désactiver des options
|
107
107
|
------------------------------------
|
108
|
+
ATTN! Depuis la version 1.72, YAD et Zenity ne sont plus utilisés pour le
|
109
|
+
dialogue.
|
110
|
+
|
108
111
|
Juste avant d'entrer en action, flnews_post_proc peut afficher un dialogue, qui
|
109
112
|
vous laisse **désactiver** des options fixées dans la configuration. Sous
|
110
|
-
condition
|
111
|
-
|
112
|
-
|
113
|
-
des options, qui ne l'ont pas été auparavant :
|
113
|
+
condition que Whiptail ou seulement xterm est disponible, vous pouvez choisir
|
114
|
+
dans les options suivantes, ceux que vous voulez ignorer pour l'article en
|
115
|
+
préparation.
|
116
|
+
Vous **ne pouvez pas** activer des options, qui ne l'ont pas été auparavant :
|
114
117
|
|
115
118
|
* Signatures, comme définis dans la configuration **peuvent être ignorées**.
|
116
119
|
Soit une signature par défaut sera appliquée, si prévue, ou aucune.
|
@@ -201,10 +204,14 @@ variables définis dans ce fichier peuvent être classées en deux catégories :
|
|
201
204
|
|
202
205
|
**GROUP_SIGS**
|
203
206
|
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
|
-
|
206
|
-
|
207
|
-
|
207
|
+
contenant plusieurs signatures, séparé par une ligne vide. Vous pouvez inclure
|
208
|
+
(“source”) le contenu d'autres fichiers dans la liste des signatures, en
|
209
|
+
indiquant dans le fichier d'origine le nom de l'autre fichier après un point
|
210
|
+
et un espace, comme dans:
|
211
|
+
. /home/user/.plus_de_signatures
|
212
|
+
Ceci ne fonctionne que dans le fichier indiqué dans la configuration, pas dans
|
213
|
+
les fichiers inclus. Prenez soin d'insérer une ligne vide entre chaque ligne
|
214
|
+
qui inclut un fichier et la suivante.
|
208
215
|
|
209
216
|
CONTENU : un newsgroup ou expression par ligne, suivi de deux poins, un espace
|
210
217
|
et une chaîne de caractères.
|
@@ -4,360 +4,46 @@
|
|
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 }
|
48
|
-
|
49
|
-
a.toc-backref {
|
50
|
-
text-decoration: none ;
|
51
|
-
color: black }
|
52
|
-
|
53
|
-
blockquote.epigraph {
|
54
|
-
margin: 2em 5em ; }
|
55
|
-
|
56
|
-
dl.docutils dd {
|
57
|
-
margin-bottom: 0.5em }
|
18
|
+
/* The defaults for docutils */
|
19
|
+
@import url(html4css1.css);
|
58
20
|
|
59
|
-
|
60
|
-
|
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 }
|
26
|
+
h1 {color:darkblue;font-size:1.5em;}
|
27
|
+
h1.title {color:#a0a0f0;font-size:2em;}
|
107
28
|
|
108
|
-
|
109
|
-
|
110
|
-
font-style: normal }
|
29
|
+
p, ul.simple, ol.simple, dt {margin-left:2em;}
|
30
|
+
dd {margin-left:4em;}
|
111
31
|
|
112
|
-
|
113
|
-
|
114
|
-
|
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;}
|
115
37
|
|
116
|
-
|
117
|
-
|
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 }
|
142
|
-
|
143
|
-
div.system-messages {
|
144
|
-
margin: 5em }
|
145
|
-
|
146
|
-
div.system-messages h1 {
|
147
|
-
color: red }
|
148
|
-
|
149
|
-
div.system-message {
|
150
|
-
border: medium outset ;
|
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;
|
348
|
-
}
|
349
|
-
table.docutils.booktabs th {
|
350
|
-
border-bottom: thin solid;
|
351
|
-
text-align: left;
|
42
|
+
blockquote {background-color:#ffc090;
|
43
|
+
padding:0.5em;
|
44
|
+
border-radius:0.5em;
|
352
45
|
}
|
353
46
|
|
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
|
-
|
361
47
|
</style>
|
362
48
|
</head>
|
363
49
|
<body>
|
@@ -512,8 +198,13 @@ introductory string.</p>
|
|
512
198
|
<dt><strong>GROUP_SIGS</strong></dt>
|
513
199
|
<dd><p class="first">A signature line per Newsgroup or a file path. The file should contain signatures,
|
514
200
|
already formatted and separated by 1 empty line. The program will randomly pick
|
515
|
-
one signature from the list
|
516
|
-
|
201
|
+
one signature from the list. You can source another file inside the original
|
202
|
+
signature file: a line starting with a point and a space will indicate that
|
203
|
+
additional signatures should be picked from the named file, like in:
|
204
|
+
. /home/user/.other_signature_file
|
205
|
+
This works only in the file named in the configuration, not in the sourced files.
|
206
|
+
Remember to separate lines sourcing a file by an empty line, also separate several
|
207
|
+
such lines by an empty line between them.</p>
|
517
208
|
<p>CONTENT: A newsgroup or regexp per line, followed by a colon, a space and a String.</p>
|
518
209
|
<p>DEFAULT: As configured in flnews</p>
|
519
210
|
<p>EXAMPLE: alt.test: "Signature for alt.test\r\nsecond line"</p>
|
Binary file
|
Binary file
|
@@ -172,9 +172,13 @@ categories:
|
|
172
172
|
**GROUP_SIGS**
|
173
173
|
A signature line per Newsgroup or a file path. The file should contain signatures,
|
174
174
|
already formatted and separated by 1 empty line. The program will randomly pick
|
175
|
-
one signature from the list.
|
176
|
-
|
177
|
-
|
175
|
+
one signature from the list. You can source another file inside the original
|
176
|
+
signature file: a line starting with a point and a space will indicate that
|
177
|
+
additional signatures should be picked from the named file, like in:
|
178
|
+
. /home/user/.other_signature_file
|
179
|
+
This works only in the file named in the configuration, not in the sourced files.
|
180
|
+
Remember to separate lines sourcing a file by an empty line, also separate several
|
181
|
+
such lines by an empty line between them.
|
178
182
|
|
179
183
|
CONTENT: A newsgroup or regexp per line, followed by a colon, a space and a String.
|
180
184
|
|
data/lib/body.rb
CHANGED
data/lib/newsgroups.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#encoding: UTF-8
|
2
2
|
=begin
|
3
3
|
/***************************************************************************
|
4
|
-
* 2023-
|
4
|
+
* 2023-2025, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
5
5
|
* This program is free software; you can redistribute it and/or modify *
|
6
6
|
* it under the terms of the WTFPL 2.0 or later, see *
|
7
7
|
* http://www.wtfpl.net/about/ *
|
@@ -127,6 +127,50 @@ class Newsgroups
|
|
127
127
|
end
|
128
128
|
end
|
129
129
|
|
130
|
+
def pick_sig(sigfile)
|
131
|
+
# finds sourced files
|
132
|
+
srcregex = /^\.\s(.*)/
|
133
|
+
# delimiter for signature blocks in the file
|
134
|
+
delim = "\n\n"
|
135
|
+
|
136
|
+
if File.exist?(sigfile) && File.readable?(sigfile)
|
137
|
+
debug 'found sourced signature file ' << sigfile
|
138
|
+
ssigs = Array.new
|
139
|
+
all_sigs = Array.new
|
140
|
+
File::read(sigfile).split(delim).collect do |item|
|
141
|
+
item.strip!
|
142
|
+
# find a sourced file
|
143
|
+
psrc = item.match(srcregex)
|
144
|
+
if(psrc )
|
145
|
+
psrc = psrc[1]
|
146
|
+
if File.exist?(psrc) && File.readable?(psrc)
|
147
|
+
ssigs = File.read(psrc).split(delim)
|
148
|
+
else
|
149
|
+
warn 'cannot find or read sourced signature file: ' << psrc
|
150
|
+
end
|
151
|
+
else
|
152
|
+
# else take the block, as is
|
153
|
+
all_sigs << item
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
# add sourced signatures
|
158
|
+
all_sigs.concat(ssigs) if !ssigs.empty?
|
159
|
+
numSigs = all_sigs.length
|
160
|
+
|
161
|
+
# get that signature, already!
|
162
|
+
|
163
|
+
# srand(Time.now.nsec)
|
164
|
+
srand()
|
165
|
+
return all_sigs[rand(numSigs)]
|
166
|
+
else
|
167
|
+
warn 'cannot find or read signature file: ' << sigfile
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
=begin
|
172
|
+
# VERSION without sourced files
|
173
|
+
#
|
130
174
|
# pick a random signature, if a list is available.
|
131
175
|
def pick_sig(sigfile)
|
132
176
|
debug 'picking signature from ' << sigfile.to_s
|
@@ -149,6 +193,7 @@ class Newsgroups
|
|
149
193
|
end
|
150
194
|
return sig
|
151
195
|
end
|
196
|
+
=end
|
152
197
|
|
153
198
|
# write a new rearranged version of the signature file for
|
154
199
|
# better hazard.
|
data/lib/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#encoding: UTF-8
|
2
2
|
=begin
|
3
3
|
/***************************************************************************
|
4
|
-
* 2023-
|
4
|
+
* 2023-2025, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
5
5
|
* This program is free software; you can redistribute it and/or modify *
|
6
6
|
* it under the terms of the WTFPL 2.0 or later, see *
|
7
7
|
* http://www.wtfpl.net/about/ *
|
@@ -14,9 +14,9 @@
|
|
14
14
|
=end
|
15
15
|
|
16
16
|
PROGNAME = 'flnews_post_proc'
|
17
|
-
PROGVERSION = "1.
|
17
|
+
PROGVERSION = "1.73"
|
18
18
|
AUTHORS = "Michael Uplawski"
|
19
19
|
EMAIL = "michael.uplawski@uplawski.eu"
|
20
20
|
YEARS = "2023 - 2025"
|
21
|
-
SUMMARY = "
|
21
|
+
SUMMARY = "files with random signatures can source other such files"
|
22
22
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
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.73'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Uplawski
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-05
|
10
|
+
date: 2025-07-05 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: diffy
|
@@ -102,5 +102,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
requirements: []
|
103
103
|
rubygems_version: 3.6.7
|
104
104
|
specification_version: 4
|
105
|
-
summary:
|
105
|
+
summary: files with random signatures can source other such files
|
106
106
|
test_files: []
|