flnews_post_proc 1.93 → 1.95

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e6e9b868f3b13e1037ebf89c7b2d9245358bda76b115831d63b5a137af5b090
4
- data.tar.gz: 01d2e7e729338b1ac18c47050e16756ff9a13e0190333a4308c7106674125c1c
3
+ metadata.gz: 86f85342902b83f0df2a9f59647dbfafdbf7921742f8bced442e606f582c6e7d
4
+ data.tar.gz: 7c2f03b6f1e871ce1c1ba3ecc02186cfa56175a7f060bf85bd09ff277f5ac071
5
5
  SHA512:
6
- metadata.gz: 825ef12b6621d7e41d2dc39999d244a1af4d8c1a9ab80fa330b04b85c26b4acf3a5413b9172c2547d67c5899aa694b4f20247d95ba07cd92081aa54c471a961f
7
- data.tar.gz: 2e207259576e65bb114caecd37fede29a73775c13fb0059acdfdbeb1aaafa2ed2b8141c968463137ed412cb25e74d6ee53d8a22b389261e613983ea33480f485
6
+ metadata.gz: 24f04c9dbf72e92e0b1ec84642a839cb9bf9ad630d8e3efe51b928475caf0e2bce495ed078eb536848684fff505ba4a9564d34df330368db2e7983373002bb8f
7
+ data.tar.gz: 3debac044585a7697b8603ff8910e6d1b0c048f83820f627fa6e70392e61ec8b999ae1b8a12db3d728ef2bc0836cd80a0461968bd25b9487f6d32b2de9caf7e5
@@ -3,8 +3,8 @@
3
3
  <head>
4
4
  <meta name="generator" content="vim - Vi Improved, a programmer's editor; HTML Tidy for Linux version 5.8.0
5
5
  "/>
6
- <meta charset="utf-8" />
7
- <meta name="viewport" content=
6
+ <meta charset="utf-8" />
7
+ <meta name="viewport" content=
8
8
  "width=device-width, initial-scale=1" />
9
9
  <title>Flnews_post_proc</title>
10
10
  <style type="text/css">
@@ -104,7 +104,7 @@
104
104
  </li>
105
105
 
106
106
  <li>
107
- <p><a class="reference internal" href="#configuration"
107
+ <p><a class="reference internal" href="#configuration-1"
108
108
  id="toc-entry-5">CONFIGURATION</a>
109
109
  </p>
110
110
 
@@ -125,34 +125,41 @@
125
125
  </p>
126
126
 
127
127
  <ul>
128
+ <li>
129
+ <p><a class="reference internal" href=
130
+ "#creation-des-notes-de-bas-de-page-1" id=
131
+ "toc-entry-8">Création des notes de bas de page</a>
132
+ </p>
133
+ </li>
134
+
128
135
  <li>
129
136
  <p><a class="reference internal" href=
130
137
  "#remplacement-avec-signature" id=
131
- "toc-entry-8">Remplacement avec signature</a>
138
+ "toc-entry-9">Remplacement avec signature</a>
132
139
  </p>
133
140
  </li>
134
141
 
135
142
  <li>
136
143
  <p><a class="reference internal" href="#tester" id=
137
- "toc-entry-9">Tester</a>
144
+ "toc-entry-10">Tester</a>
138
145
  </p>
139
146
  </li>
140
147
 
141
148
  <li>
142
149
  <p><a class="reference internal" href="#code-source"
143
- id="toc-entry-10">Code source</a>
150
+ id="toc-entry-11">Code source</a>
144
151
  </p>
145
152
  </li>
146
153
 
147
154
  <li>
148
155
  <p><a class="reference internal" href="#license" id=
149
- "toc-entry-11">License</a>
156
+ "toc-entry-12">License</a>
150
157
  </p>
151
158
  </li>
152
159
 
153
160
  <li>
154
161
  <p><a class="reference internal" href="#auteur" id=
155
- "toc-entry-12">Auteur</a>
162
+ "toc-entry-13">Auteur</a>
156
163
  </p>
157
164
  </li>
158
165
  </ul>
@@ -302,7 +309,10 @@
302
309
 
303
310
  <p>Exemple (avec séparateur <strong>%=</strong> ) : «
304
311
  Ceci est un objet %=et ceci devient la note en bas de
305
- page, qui décrit l'objet plus précisément=% »</p>
312
+ page, qui décrit l'objet plus précisément=% » (voir
313
+ plus bas : <a class="reference internal" href=
314
+ "#creation-des-notes-de-bas-de-page">Création des notes
315
+ de bas de page</a>)</p>
306
316
  </li>
307
317
  </ul>
308
318
  </section>
@@ -363,7 +373,8 @@
363
373
  </section>
364
374
  </section>
365
375
 
366
- <section id="configuration">
376
+ <section id="configuration-1">
377
+ <span id="configuration"></span>
367
378
  <h2>CONFIGURATION</h2>
368
379
 
369
380
  <p>La première fois que vous exécutez le logiciel, une copie
@@ -589,7 +600,7 @@ alt.fr.test: /home/[utilisateur]/.signatures</pre>
589
600
 
590
601
  <p>PAR DÉFAUT : Vide</p>
591
602
 
592
- <p>EXEMPLE : '---------'</p>
603
+ <p>EXEMPLE : "---------"</p>
593
604
  </blockquote>
594
605
 
595
606
  <p><strong>REFERENCES_DELIMITER</strong>
@@ -615,10 +626,10 @@ alt.fr.test: /home/[utilisateur]/.signatures</pre>
615
626
 
616
627
  <p>PAR DÉFAUT : Vide</p>
617
628
 
618
- <p>EXEMPLE: '%?'</p>
629
+ <p>EXEMPLE: "%?"</p>
619
630
  </blockquote>
620
631
 
621
- <p><strong>REFERENCE_FORMAT</strong>
632
+ <p id="reference-format"><strong>REFERENCE_FORMAT</strong>
622
633
  </p>
623
634
 
624
635
  <blockquote>
@@ -695,6 +706,25 @@ alt.fr.test: /home/[utilisateur]/.signatures</pre>
695
706
  <section id="autres-informations">
696
707
  <h2>Autres Informations</h2>
697
708
 
709
+ <section id="creation-des-notes-de-bas-de-page-1">
710
+ <span id="creation-des-notes-de-bas-de-page"></span>
711
+ <h3>Création des notes de bas de page</h3>
712
+
713
+ <p>Il peut être tentant d'insérer le texte des notes de bas
714
+ de page (ou les références URL) directement dans le corps
715
+ du texte lors de la rédaction d'un article, mais cela
716
+ risque de perturber la mise en forme des lignes. Il est en
717
+ effet difficile de prévoir la longueur des lignes après le
718
+ déplacement automatique des notes de bas de page à la fin.
719
+ Écrivez plutôt votre article dans son intégralité, puis
720
+ ajoutez les notes de bas de page juste avant la
721
+ publication. Vous pourrez ainsi anticiper l'apparence
722
+ finale de l'article une fois que les marqueurs de notes de
723
+ bas de page auront remplacé le texte intégré (voir
724
+ <a class="reference internal" href=
725
+ "#reference-format">REFERENCE_FORMAT</a>, ci-dessus).</p>
726
+ </section>
727
+
698
728
  <section id="remplacement-avec-signature">
699
729
  <h3>Remplacement avec signature</h3>
700
730
 
@@ -813,16 +843,9 @@ alt.fr.test: /home/[utilisateur]/.signatures</pre>
813
843
  <section id="auteur">
814
844
  <h3>Auteur</h3>
815
845
 
816
- <div class="line-block">
817
- <div class="line">
818
- <strong>flnews_post_proc</strong> a été développé par
819
- </div>
820
-
821
- <div class="line">
822
- Michael Uplawski &lt;<a class="reference external"
823
- href="mailto:michael.uplawski@uplawski.eu">michael.uplawski@uplawski.eu</a>&gt;
824
- </div>
825
- </div>
846
+ <p><strong>flnews_post_proc</strong> a été développé par
847
+ Michael Uplawski &lt;<a class="reference external" href=
848
+ "mailto:michael.uplawski@uplawski.eu">michael.uplawski@uplawski.eu</a>&gt;</p>
826
849
 
827
850
  <p>Ω</p>
828
851
  </section>
Binary file
Binary file
@@ -106,7 +106,8 @@ des raisons parfois arbitraires :
106
106
 
107
107
  Exemple (avec séparateur **%=** ) :
108
108
  « Ceci est un objet %=et ceci devient la note en bas de page, qui décrit
109
- l'objet plus précisément=% »
109
+ l'objet plus précisément=% » (voir plus bas : `Création des notes de bas
110
+ de page`_)
110
111
 
111
112
  Dialogue pour désactiver des options
112
113
  ---------------------------------------
@@ -140,6 +141,8 @@ Vous pouvez même désactiver le dialogue, ce qui garantit que toutes les option
140
141
  configurées seront appliquées sans interaction supplémentaire (voir ci-dessous :
141
142
  option OVERRIDE_CONFIG).
142
143
 
144
+ .. _configuration:
145
+
143
146
  CONFIGURATION
144
147
  =============
145
148
  La première fois que vous exécutez le logiciel, une copie de la configuration
@@ -312,7 +315,7 @@ Options de configuration
312
315
 
313
316
  PAR DÉFAUT : Vide
314
317
 
315
- EXEMPLE : '---------'
318
+ EXEMPLE : "---------"
316
319
 
317
320
  **REFERENCES_DELIMITER**
318
321
 
@@ -330,7 +333,9 @@ Options de configuration
330
333
 
331
334
  PAR DÉFAUT : Vide
332
335
 
333
- EXEMPLE: '%?'
336
+ EXEMPLE: "%?"
337
+
338
+ .. _REFERENCE_FORMAT:
334
339
 
335
340
  **REFERENCE_FORMAT**
336
341
 
@@ -385,6 +390,21 @@ Options de configuration
385
390
  Autres Informations
386
391
  ===================
387
392
 
393
+ .. _Création des notes de bas de page:
394
+
395
+ Création des notes de bas de page
396
+ -------------------------------------
397
+
398
+ Il peut être tentant d'insérer le texte des notes de bas de page (ou les
399
+ références URL) directement dans le corps du texte lors de la rédaction d'un
400
+ article, mais cela risque de perturber la mise en forme des lignes. Il est en
401
+ effet difficile de prévoir la longueur des lignes après le déplacement
402
+ automatique des notes de bas de page à la fin. Écrivez plutôt votre article
403
+ dans son intégralité, puis ajoutez les notes de bas de page juste avant la
404
+ publication. Vous pourrez ainsi anticiper l'apparence finale de l'article une
405
+ fois que les marqueurs de notes de bas de page auront remplacé le texte intégré
406
+ (voir REFERENCE_FORMAT_, ci-dessus).
407
+
388
408
  Remplacement avec signature
389
409
  ---------------------------
390
410
 
@@ -449,7 +469,6 @@ répertoire « doc » de la gem ).
449
469
 
450
470
  Auteur
451
471
  ------
452
- | |program| a été développé par
453
- | Michael Uplawski <michael.uplawski@uplawski.eu>
472
+ |program| a été développé par Michael Uplawski <michael.uplawski@uplawski.eu>
454
473
 
455
474
  Ω
@@ -3,8 +3,8 @@
3
3
  <head>
4
4
  <meta name="generator" content="vim - Vi Improved, a programmer's editor; HTML Tidy for Linux version 5.8.0
5
5
  "/>
6
- <meta charset="utf-8" />
7
- <meta name="viewport" content=
6
+ <meta charset="utf-8" />
7
+ <meta name="viewport" content=
8
8
  "width=device-width, initial-scale=1" />
9
9
  <title>Flnews_post_proc</title>
10
10
  <style type="text/css">
@@ -124,34 +124,41 @@
124
124
  </p>
125
125
 
126
126
  <ul>
127
+ <li>
128
+ <p><a class="reference internal" href=
129
+ "#editing-footnotes-1" id="toc-entry-8">Editing
130
+ footnotes</a>
131
+ </p>
132
+ </li>
133
+
127
134
  <li>
128
135
  <p><a class="reference internal" href=
129
136
  "#signatures-in-supersedes-1" id=
130
- "toc-entry-8">Signatures in Supersedes</a>
137
+ "toc-entry-9">Signatures in Supersedes</a>
131
138
  </p>
132
139
  </li>
133
140
 
134
141
  <li>
135
142
  <p><a class="reference internal" href="#testing-1"
136
- id="toc-entry-9">Testing</a>
143
+ id="toc-entry-10">Testing</a>
137
144
  </p>
138
145
  </li>
139
146
 
140
147
  <li>
141
148
  <p><a class="reference internal" href=
142
- "#source-code-1" id="toc-entry-10">Source Code</a>
149
+ "#source-code-1" id="toc-entry-11">Source Code</a>
143
150
  </p>
144
151
  </li>
145
152
 
146
153
  <li>
147
154
  <p><a class="reference internal" href="#license-1"
148
- id="toc-entry-11">License</a>
155
+ id="toc-entry-12">License</a>
149
156
  </p>
150
157
  </li>
151
158
 
152
159
  <li>
153
160
  <p><a class="reference internal" href="#author-1" id=
154
- "toc-entry-12">Author</a>
161
+ "toc-entry-13">Author</a>
155
162
  </p>
156
163
  </li>
157
164
  </ul>
@@ -166,8 +173,7 @@
166
173
  <p>The post-processor is invoked by piping an article into
167
174
  it. This typically occurs automatically when the "post_proc"
168
175
  variable is set to <strong>flnews_post_proc</strong> in the
169
- flnews <a class="reference internal" href=
170
- "#configuration">configuration</a> file.</p>
176
+ flnews configuration file.</p>
171
177
 
172
178
  <p>For testing purposes, you can also pipe locally stored
173
179
  articles into the post-processor using a command like:</p>
@@ -217,13 +223,12 @@
217
223
  <li>
218
224
  <p>If you're posting to different newsgroups in
219
225
  multiple languages, the introductory line referencing a
220
- prior post can only be set once in the flnews <a class=
221
- "reference internal" href=
222
- "#configuration">configuration</a> file. As a result,
223
- posts to a French newsgroup, for example, may start
224
- with an introduction in English. The post-processor can
225
- address this by setting specific introductory lines for
226
- each newsgroup.</p>
226
+ prior post can only be set once in the flnews
227
+ configuration file. As a result, posts to a French
228
+ newsgroup, for example, may start with an introduction
229
+ in English. The post-processor can address this by
230
+ setting specific introductory lines for each
231
+ newsgroup.</p>
227
232
  </li>
228
233
 
229
234
  <li>
@@ -239,10 +244,8 @@
239
244
  <p>Custom headers, such as GnuPG key IDs or your
240
245
  language proficiency, can also be added to posts,
241
246
  though signatures may be a better alternative. Custom
242
- headers can be defined in the <a class=
243
- "reference internal" href=
244
- "#configuration">configuration</a> file and will be
245
- added to outgoing posts.</p>
247
+ headers can be defined in the configuration file and
248
+ will be added to outgoing posts.</p>
246
249
  </li>
247
250
 
248
251
  <li>
@@ -264,11 +267,12 @@
264
267
  URLs can become cluttered. The post-processor can
265
268
  convert marked text into footnotes, similar to the
266
269
  &lt;ref/&gt; link format used in Wikipedia, with the
267
- delimiter configurable in the <a class=
268
- "reference internal" href=
269
- "#configuration">configuration</a> file. Example (using
270
- %=): "This is an object %=and this becomes the
271
- footnote, describing the object further=%"</p>
270
+ delimiter configurable in the configuration file.
271
+ Example (using %=): "This is an object %=and this
272
+ becomes the footnote, describing the object further=%".
273
+ See also the hints under <a class="reference internal"
274
+ href="#editing-footnotes">EDITING FOOTNOTES</a>,
275
+ below.</p>
272
276
  </li>
273
277
  </ul>
274
278
  </section>
@@ -283,18 +287,17 @@
283
287
  <p>Before the post-processor runs, a dialog can be
284
288
  displayed to allow users to <strong>disable</strong>
285
289
  certain <a class="reference internal" href=
286
- "#configuration">configuration</a> options. If Whiptail or
290
+ "#configuration">CONFIGURATION</a> options. If Whiptail or
287
291
  xterm are available, you can choose to disable the
288
292
  following options. You <strong>cannot</strong> enable
289
- options that haven't already been set in the <a class=
290
- "reference internal" href=
291
- "#configuration">configuration</a>.</p>
293
+ options that haven't already been set in the
294
+ configuration.</p>
292
295
 
293
296
  <ul class="simple">
294
297
  <li>
295
298
  <p>Signatures (if set in the <a class=
296
299
  "reference internal" href=
297
- "#configuration">configuration</a>) can be
300
+ "#configuration">CONFIGURATION</a>) can be
298
301
  <strong>ignored</strong>. A default signature will be
299
302
  used, or no signature at all.</p>
300
303
  </li>
@@ -488,7 +491,7 @@ comp.*: /home/[user]/.my_sigs</pre>
488
491
 
489
492
  <p>DEFAULT: Empty</p>
490
493
 
491
- <p>EXAMPLE: '/tmp/a_log-file.txt'</p>
494
+ <p>EXAMPLE: "/tmp/a_log-file.txt"</p>
492
495
  </blockquote>
493
496
 
494
497
  <p><strong>LOG LEVEL</strong>
@@ -511,7 +514,7 @@ comp.*: /home/[user]/.my_sigs</pre>
511
514
 
512
515
  <p>DEFAULT: Empty</p>
513
516
 
514
- <p>EXAMPLE: '---------'</p>
517
+ <p>EXAMPLE: "---------"</p>
515
518
  </blockquote>
516
519
 
517
520
  <p><strong>REFERENCES_DELIMITER</strong>
@@ -526,10 +529,10 @@ comp.*: /home/[user]/.my_sigs</pre>
526
529
 
527
530
  <p>DEFAULT: None (empty)</p>
528
531
 
529
- <p>EXAMPLE: '%?'</p>
532
+ <p>EXAMPLE: "%?"</p>
530
533
  </blockquote>
531
534
 
532
- <p><strong>REFERENCE_FORMAT</strong>
535
+ <p id="reference-format"><strong>REFERENCE_FORMAT</strong>
533
536
  </p>
534
537
 
535
538
  <blockquote>
@@ -578,6 +581,21 @@ comp.*: /home/[user]/.my_sigs</pre>
578
581
  <span id="other-information"></span>
579
582
  <h2>Other Information</h2>
580
583
 
584
+ <section id="editing-footnotes-1">
585
+ <span id="editing-footnotes"></span>
586
+ <h3>Editing footnotes</h3>
587
+
588
+ <p>Writing footnote text (or URL references) inline while
589
+ composing an article may be tempting, but it will likely
590
+ break your line formatting. It's difficult to predict line
591
+ lengths after footnotes are automatically moved to the end.
592
+ Instead, write your complete article first, then add
593
+ footnotes just before posting. This lets you anticipate how
594
+ the final article will look after footnote markers replace
595
+ the inline text (see <a class="reference internal" href=
596
+ "#reference-format">REFERENCE_FORMAT</a>, above).</p>
597
+ </section>
598
+
581
599
  <section id="signatures-in-supersedes-1">
582
600
  <span id="signatures-in-supersedes"></span>
583
601
  <h3>Signatures in Supersedes</h3>
Binary file
Binary file
@@ -21,7 +21,7 @@ SYNOPSIS
21
21
  ===========================
22
22
  The post-processor is invoked by piping an article into it. This typically
23
23
  occurs automatically when the "post_proc" variable is set to |program|
24
- in the flnews `configuration`_ file.
24
+ in the flnews configuration file.
25
25
 
26
26
  For testing purposes, you can also pipe locally stored articles into the
27
27
  post-processor using a command like:
@@ -60,7 +60,7 @@ unsatisfactory for arbitrary reasons:
60
60
 
61
61
  * If you're posting to different newsgroups in multiple languages, the
62
62
  introductory line referencing a prior post can only be set once in the flnews
63
- `configuration`_ file. As a result, posts to a French newsgroup, for example,
63
+ configuration file. As a result, posts to a French newsgroup, for example,
64
64
  may start with an introduction in English. The post-processor can address
65
65
  this by setting specific introductory lines for each newsgroup.
66
66
 
@@ -71,7 +71,7 @@ unsatisfactory for arbitrary reasons:
71
71
 
72
72
  * Custom headers, such as GnuPG key IDs or your language proficiency, can also
73
73
  be added to posts, though signatures may be a better alternative. Custom
74
- headers can be defined in the `configuration`_ file and will be added to
74
+ headers can be defined in the configuration file and will be added to
75
75
  outgoing posts.
76
76
 
77
77
  * Headers like "Archive" and "X-No-Archive" are sometimes set to prevent an
@@ -86,9 +86,10 @@ unsatisfactory for arbitrary reasons:
86
86
  * Posts that include many references to other posts or URLs can become
87
87
  cluttered. The post-processor can convert marked text into footnotes, similar
88
88
  to the <ref/> link format used in Wikipedia, with the delimiter configurable
89
- in the `configuration`_ file.
89
+ in the configuration file.
90
90
  Example (using %=): "This is an object %=and this becomes the footnote,
91
- describing the object further=%"
91
+ describing the object further=%". See also the hints under
92
+ `EDITING FOOTNOTES`_, below.
92
93
 
93
94
  .. _Dialog for Overriding Settings:
94
95
 
@@ -98,11 +99,11 @@ Dialog for Overriding Settings
98
99
  interface.
99
100
 
100
101
  Before the post-processor runs, a dialog can be displayed to allow users to
101
- **disable** certain `configuration`_ options. If Whiptail or xterm are available,
102
+ **disable** certain `CONFIGURATION`_ options. If Whiptail or xterm are available,
102
103
  you can choose to disable the following options. You **cannot** enable options
103
- that haven't already been set in the `configuration`_.
104
+ that haven't already been set in the configuration.
104
105
 
105
- * Signatures (if set in the `configuration`_) can be **ignored**. A default
106
+ * Signatures (if set in the `CONFIGURATION`_) can be **ignored**. A default
106
107
  signature will be used, or no signature at all.
107
108
  * Custom headers can be **omitted**.
108
109
  * The "Archive" and "X-No-Archive" headers can be **ignored** if set for the
@@ -155,7 +156,7 @@ Configuration Options
155
156
 
156
157
  EXAMPLE2: "**(.*)** wrote:"
157
158
 
158
- .. _fup_group:
159
+ .. _FUP_GROUP:
159
160
 
160
161
  **FUP_GROUP**
161
162
 
@@ -170,7 +171,7 @@ Configuration Options
170
171
 
171
172
  EXAMPLE: "wrote in **(.*)**:"
172
173
 
173
- .. _group_intros:
174
+ .. _GROUP_INTROS:
174
175
 
175
176
  **GROUP_INTROS**
176
177
 
@@ -242,7 +243,7 @@ Configuration Options
242
243
 
243
244
  DEFAULT: Empty
244
245
 
245
- EXAMPLE: '/tmp/a_log-file.txt'
246
+ EXAMPLE: "/tmp/a_log-file.txt"
246
247
 
247
248
  **LOG LEVEL**
248
249
 
@@ -258,7 +259,7 @@ Configuration Options
258
259
 
259
260
  DEFAULT: Empty
260
261
 
261
- EXAMPLE: '---------'
262
+ EXAMPLE: "---------"
262
263
 
263
264
  **REFERENCES_DELIMITER**
264
265
 
@@ -269,7 +270,9 @@ Configuration Options
269
270
 
270
271
  DEFAULT: None (empty)
271
272
 
272
- EXAMPLE: '%?'
273
+ EXAMPLE: "%?"
274
+
275
+ .. _REFERENCE_FORMAT:
273
276
 
274
277
  **REFERENCE_FORMAT**
275
278
 
@@ -310,6 +313,18 @@ Configuration Options
310
313
  Other Information
311
314
  ========================
312
315
 
316
+ .. _EDITING FOOTNOTES:
317
+
318
+ Editing footnotes
319
+ -----------------
320
+ Writing footnote text (or URL references) inline while composing an article may
321
+ be tempting, but it will likely break your line formatting. It's difficult to
322
+ predict line lengths after footnotes are automatically moved to the end.
323
+ Instead, write your complete article first, then add footnotes just before
324
+ posting.
325
+ This lets you anticipate how the final article will look after footnote markers
326
+ replace the inline text (see REFERENCE_FORMAT_, above).
327
+
313
328
  .. _Signatures in Supersedes:
314
329
 
315
330
  Signatures in Supersedes
data/lib/configuration.rb CHANGED
@@ -78,6 +78,7 @@ class Configuration
78
78
  def update_config(i_config)
79
79
  if @conf
80
80
  conf_version = @conf[:CONFIG_VERSION]
81
+ debug 'conf_version is ' << conf_version.to_s
81
82
  if !conf_version || conf_version < PROGVERSION.to_f
82
83
  info "configuration has an older version number, looking for changes"
83
84
  i_conf = YAML::load_file(i_config)
@@ -17,7 +17,7 @@
17
17
  # the process, if they are still valid.
18
18
  # ATTN! COMMENTS WILL BE REMOVED but a copy of your previous configuration
19
19
  # will be saved in a file with a version suffix.
20
- CONFIG_VERSION: 1.35
20
+ CONFIG_VERSION: 1.95
21
21
 
22
22
  # FUP_NAME
23
23
  # A Regular Expression, describing the string which contains the name of
@@ -169,5 +169,19 @@ VFY_URLS: No
169
169
  # DEFAULT: yes
170
170
  OVERRIDE_CONFIG: YES
171
171
 
172
+ # USE_OLD
173
+ # A Boolean constant. The post processor can handle subject changes in the way, that
174
+ # old subjects which are preceded by variations of the string '(Was:' are automatically
175
+ # removed from the header. This imposes, that our own subject changes must be ignored!
176
+ # This behavior is activated here and necessitates that our own subject changes
177
+ # are indicated with a prefix "(Old:". It will be replaced by "(Was:" in the
178
+ # posted article.
179
+ #
180
+ # Set this option to true, when you want to use the prefix
181
+ # "(Old:", or to false, no, NO or similar if you do not want subject changes
182
+ # handled by the program.
183
+ # DEFAULT: No
184
+ USE_OLD: false
185
+
172
186
  # EOF
173
187
 
data/lib/headers.rb CHANGED
@@ -81,10 +81,9 @@ class Headers
81
81
  headers[cur_header] = val
82
82
  end
83
83
  end
84
-
84
+
85
85
  return headers
86
86
  end
87
-
88
87
  def self::supersedes?(article_text)
89
88
  headers(article_text).keys.include?(:Supersedes)
90
89
  end
@@ -124,6 +123,10 @@ class Headers
124
123
  @headers["X-No-Archive".to_sym] = no_archive
125
124
  @headers["Archive".to_sym] = 'no'
126
125
  end
126
+ # ------->
127
+ # check for altered Subject and impose the newer value
128
+ alterSubject()
129
+ # <----
127
130
  if @config.CUSTOM_HEADERS
128
131
  ch = @config.CUSTOM_HEADERS
129
132
  debug('setting custom headers : ' << ch.inspect)
@@ -136,7 +139,6 @@ class Headers
136
139
  # <---------- special treatment Post-Processor ---------->
137
140
  hv << ' ' << PROGVERSION.to_s if hn == 'X-Post-Processor' && hv == 'flnews_post_proc'
138
141
  # >----------<
139
- @headers[hn.to_sym] = hv
140
142
  else
141
143
  warn "Custom header [#{hn}:#{hv}] should be ASCII only! Header is ignored!"
142
144
  end
@@ -173,6 +175,59 @@ class Headers
173
175
 
174
176
  attr_reader :lines, :newsgroups
175
177
 
178
+ private
179
+
180
+ # Check for was, war, était and clip the old subject header.
181
+ # Currently UNUSED
182
+ def alterSubject
183
+ if @config.USE_OLD
184
+ refs = @headers[:References]
185
+ # only if older articles exist in the thread
186
+ if refs && !refs.empty?
187
+ hv = @headers[:Subject]
188
+ if hv
189
+ debug 'checking for alteredd Subject'
190
+
191
+ # Our own very first article with an altered subject line, uses:
192
+ # (old:
193
+ # because this is what we do.
194
+
195
+ old = /\(Old:/i
196
+ if hv.match(old)
197
+ debug "\tfound old"
198
+ if hv.split(old).length == 2
199
+ @headers[:Subject]= hv.sub(old, '(Was:')
200
+ debug 'Subject is now: ' << @headers[:Subject]
201
+ end
202
+ end
203
+
204
+ # create some regexps
205
+ olds = Array.new
206
+ olds << /\s*\(was:/i
207
+
208
+ # not standard but I tend do use them myself:
209
+
210
+ olds << /\s*\(war:/i
211
+ olds << /\s*\(était:/i
212
+ olds << /\s*\(etait:/i
213
+
214
+ # check for each of those regexps
215
+ olds.each do |old|
216
+ ts = hv.split(old)
217
+ if ts && ts.length == 2
218
+ @headers[:Subject] = ts[0]
219
+ debug 'shortening subject ' << ts.inspect
220
+ debug 'subject is now: ' << @headers[:Subject]
221
+
222
+ return
223
+ end
224
+ end
225
+ end
226
+ end
227
+ else
228
+ info('subject changes are ignored')
229
+ end
230
+ end
176
231
  end
177
232
  # EOF
178
233
 
data/lib/version.rb CHANGED
@@ -14,8 +14,8 @@
14
14
  =end
15
15
 
16
16
  PROGNAME = 'flnews_post_proc'
17
- PROGVERSION = "1.93"
17
+ PROGVERSION = "1.95"
18
18
  AUTHORS = "Michael Uplawski"
19
19
  EMAIL = "michael.uplawski@uplawski.eu"
20
20
  YEARS = "2023 - 2026"
21
- SUMMARY = "References precede a signature, also in Supersedes"
21
+ SUMMARY = "Altered subjects are truncated"
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.93'
4
+ version: '1.95'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Uplawski
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-01-22 00:00:00.000000000 Z
10
+ date: 2026-03-24 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: diffy
@@ -94,14 +94,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - ">="
96
96
  - !ruby/object:Gem::Version
97
- version: '3.0'
97
+ version: '4.0'
98
98
  required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
- rubygems_version: 3.6.7
104
+ rubygems_version: 4.0.8
105
105
  specification_version: 4
106
- summary: References precede a signature, also in Supersedes
106
+ summary: Altered subjects are truncated
107
107
  test_files: []