flnews_post_proc 1.94 → 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 +4 -4
- data/doc/fr/html/flnews_post_proc.html +17 -16
- 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 +13 -12
- data/doc/html/flnews_post_proc.html +13 -18
- 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 +3 -3
- data/lib/configuration.rb +1 -0
- data/lib/flnews_post_proc.conf +15 -1
- data/lib/headers.rb +58 -3
- data/lib/version.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 86f85342902b83f0df2a9f59647dbfafdbf7921742f8bced442e606f582c6e7d
|
|
4
|
+
data.tar.gz: 7c2f03b6f1e871ce1c1ba3ecc02186cfa56175a7f060bf85bd09ff277f5ac071
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
7
|
-
|
|
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">
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
page, qui décrit l'objet plus précisément=% » (voir
|
|
313
313
|
plus bas : <a class="reference internal" href=
|
|
314
314
|
"#creation-des-notes-de-bas-de-page">Création des notes
|
|
315
|
-
de bas de page</a
|
|
315
|
+
de bas de page</a>)</p>
|
|
316
316
|
</li>
|
|
317
317
|
</ul>
|
|
318
318
|
</section>
|
|
@@ -600,7 +600,7 @@ alt.fr.test: /home/[utilisateur]/.signatures</pre>
|
|
|
600
600
|
|
|
601
601
|
<p>PAR DÉFAUT : Vide</p>
|
|
602
602
|
|
|
603
|
-
<p>EXEMPLE :
|
|
603
|
+
<p>EXEMPLE : "---------"</p>
|
|
604
604
|
</blockquote>
|
|
605
605
|
|
|
606
606
|
<p><strong>REFERENCES_DELIMITER</strong>
|
|
@@ -626,7 +626,7 @@ alt.fr.test: /home/[utilisateur]/.signatures</pre>
|
|
|
626
626
|
|
|
627
627
|
<p>PAR DÉFAUT : Vide</p>
|
|
628
628
|
|
|
629
|
-
<p>EXEMPLE:
|
|
629
|
+
<p>EXEMPLE: "%?"</p>
|
|
630
630
|
</blockquote>
|
|
631
631
|
|
|
632
632
|
<p id="reference-format"><strong>REFERENCE_FORMAT</strong>
|
|
@@ -710,17 +710,18 @@ alt.fr.test: /home/[utilisateur]/.signatures</pre>
|
|
|
710
710
|
<span id="creation-des-notes-de-bas-de-page"></span>
|
|
711
711
|
<h3>Création des notes de bas de page</h3>
|
|
712
712
|
|
|
713
|
-
<p>Il peut être tentant d'
|
|
714
|
-
de page (ou les références URL)
|
|
715
|
-
rédaction d'un article, mais cela
|
|
716
|
-
mise en forme
|
|
717
|
-
longueur des lignes après le
|
|
718
|
-
notes de bas de page à la fin.
|
|
719
|
-
dans son intégralité, puis
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
de
|
|
723
|
-
|
|
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=
|
|
724
725
|
"#reference-format">REFERENCE_FORMAT</a>, ci-dessus).</p>
|
|
725
726
|
</section>
|
|
726
727
|
|
|
Binary file
|
|
Binary file
|
|
@@ -107,7 +107,7 @@ des raisons parfois arbitraires :
|
|
|
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
109
|
l'objet plus précisément=% » (voir plus bas : `Création des notes de bas
|
|
110
|
-
de page`_
|
|
110
|
+
de page`_)
|
|
111
111
|
|
|
112
112
|
Dialogue pour désactiver des options
|
|
113
113
|
---------------------------------------
|
|
@@ -315,7 +315,7 @@ Options de configuration
|
|
|
315
315
|
|
|
316
316
|
PAR DÉFAUT : Vide
|
|
317
317
|
|
|
318
|
-
EXEMPLE :
|
|
318
|
+
EXEMPLE : "---------"
|
|
319
319
|
|
|
320
320
|
**REFERENCES_DELIMITER**
|
|
321
321
|
|
|
@@ -333,7 +333,7 @@ Options de configuration
|
|
|
333
333
|
|
|
334
334
|
PAR DÉFAUT : Vide
|
|
335
335
|
|
|
336
|
-
EXEMPLE:
|
|
336
|
+
EXEMPLE: "%?"
|
|
337
337
|
|
|
338
338
|
.. _REFERENCE_FORMAT:
|
|
339
339
|
|
|
@@ -394,15 +394,16 @@ Autres Informations
|
|
|
394
394
|
|
|
395
395
|
Création des notes de bas de page
|
|
396
396
|
-------------------------------------
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
la
|
|
402
|
-
|
|
403
|
-
bas de page juste avant la
|
|
404
|
-
l'apparence finale de l'article une
|
|
405
|
-
page auront remplacé le texte intégré
|
|
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).
|
|
406
407
|
|
|
407
408
|
Remplacement avec signature
|
|
408
409
|
---------------------------
|
|
@@ -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
|
-
|
|
7
|
-
|
|
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">
|
|
@@ -491,7 +491,7 @@ comp.*: /home/[user]/.my_sigs</pre>
|
|
|
491
491
|
|
|
492
492
|
<p>DEFAULT: Empty</p>
|
|
493
493
|
|
|
494
|
-
<p>EXAMPLE:
|
|
494
|
+
<p>EXAMPLE: "/tmp/a_log-file.txt"</p>
|
|
495
495
|
</blockquote>
|
|
496
496
|
|
|
497
497
|
<p><strong>LOG LEVEL</strong>
|
|
@@ -514,7 +514,7 @@ comp.*: /home/[user]/.my_sigs</pre>
|
|
|
514
514
|
|
|
515
515
|
<p>DEFAULT: Empty</p>
|
|
516
516
|
|
|
517
|
-
<p>EXAMPLE:
|
|
517
|
+
<p>EXAMPLE: "---------"</p>
|
|
518
518
|
</blockquote>
|
|
519
519
|
|
|
520
520
|
<p><strong>REFERENCES_DELIMITER</strong>
|
|
@@ -529,7 +529,7 @@ comp.*: /home/[user]/.my_sigs</pre>
|
|
|
529
529
|
|
|
530
530
|
<p>DEFAULT: None (empty)</p>
|
|
531
531
|
|
|
532
|
-
<p>EXAMPLE:
|
|
532
|
+
<p>EXAMPLE: "%?"</p>
|
|
533
533
|
</blockquote>
|
|
534
534
|
|
|
535
535
|
<p id="reference-format"><strong>REFERENCE_FORMAT</strong>
|
|
@@ -585,19 +585,14 @@ comp.*: /home/[user]/.my_sigs</pre>
|
|
|
585
585
|
<span id="editing-footnotes"></span>
|
|
586
586
|
<h3>Editing footnotes</h3>
|
|
587
587
|
|
|
588
|
-
<p>Writing footnote text (or URL
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
<strong>insert</strong> footnote text right before posting.
|
|
597
|
-
This way you have a realistic grasp of the appearance of
|
|
598
|
-
the authentic article, after the additional text has been
|
|
599
|
-
replaced by your choice of a symbol (see <a class=
|
|
600
|
-
"reference internal" href=
|
|
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=
|
|
601
596
|
"#reference-format">REFERENCE_FORMAT</a>, above).</p>
|
|
602
597
|
</section>
|
|
603
598
|
|
|
Binary file
|
|
Binary file
|
|
@@ -243,7 +243,7 @@ Configuration Options
|
|
|
243
243
|
|
|
244
244
|
DEFAULT: Empty
|
|
245
245
|
|
|
246
|
-
EXAMPLE:
|
|
246
|
+
EXAMPLE: "/tmp/a_log-file.txt"
|
|
247
247
|
|
|
248
248
|
**LOG LEVEL**
|
|
249
249
|
|
|
@@ -259,7 +259,7 @@ Configuration Options
|
|
|
259
259
|
|
|
260
260
|
DEFAULT: Empty
|
|
261
261
|
|
|
262
|
-
EXAMPLE:
|
|
262
|
+
EXAMPLE: "---------"
|
|
263
263
|
|
|
264
264
|
**REFERENCES_DELIMITER**
|
|
265
265
|
|
|
@@ -270,7 +270,7 @@ Configuration Options
|
|
|
270
270
|
|
|
271
271
|
DEFAULT: None (empty)
|
|
272
272
|
|
|
273
|
-
EXAMPLE:
|
|
273
|
+
EXAMPLE: "%?"
|
|
274
274
|
|
|
275
275
|
.. _REFERENCE_FORMAT:
|
|
276
276
|
|
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)
|
data/lib/flnews_post_proc.conf
CHANGED
|
@@ -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.
|
|
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.
|
|
17
|
+
PROGVERSION = "1.95"
|
|
18
18
|
AUTHORS = "Michael Uplawski"
|
|
19
19
|
EMAIL = "michael.uplawski@uplawski.eu"
|
|
20
20
|
YEARS = "2023 - 2026"
|
|
21
|
-
SUMMARY = "
|
|
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.
|
|
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-
|
|
10
|
+
date: 2026-03-24 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: diffy
|
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
102
|
version: '0'
|
|
103
103
|
requirements: []
|
|
104
|
-
rubygems_version: 4.0.
|
|
104
|
+
rubygems_version: 4.0.8
|
|
105
105
|
specification_version: 4
|
|
106
|
-
summary:
|
|
106
|
+
summary: Altered subjects are truncated
|
|
107
107
|
test_files: []
|