flnews_post_proc 1.41 → 1.44
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 +12 -11
- data/bin/flnews_post_proc +7 -2
- data/doc/html/flnews_post_proc.html +20 -26
- data/doc/html/flnews_post_proc_fr.html +12 -11
- data/doc/man/flnews_post_proc.1.gz +0 -0
- data/doc/man/flnews_post_proc_fr.1.gz +0 -0
- data/doc/pdf/flnews_post_proc.pdf +0 -0
- data/doc/pdf/flnews_post_proc_fr.pdf +0 -0
- data/doc/rst/flnews_post_proc.rst +11 -13
- data/doc/rst/flnews_post_proc_fr.rst +12 -12
- data/lib/_quoting_style_regexp +1 -0
- data/lib/body.rb +20 -10
- data/lib/version.rb +2 -2
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd6a768ede3aff691558eba80a8a4b63df2ee0a9ca06e9c5686d71d3512dd29d
|
|
4
|
+
data.tar.gz: c068b97b1648e39f7ed02d774f301157e69cf065702556605acf777ab40782db
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c01e7ed3b8174bc4707b9b00842c684f9b0c389551a7a66ec5f95ccd3fbf775bd9e8bd34e700e9a5cedf07bc826fec7d7d7b7c62324222e2fcf217637226a955
|
|
7
|
+
data.tar.gz: 51704cb9e8bb5c1967efc09fce01e60be87bc0e88af79542bb9aef31ed0cf7f92a9283d2e3850ac19330935e46613f4aad1f506d89acf21248d92b21bdfffaaa
|
data/README.md
CHANGED
|
@@ -93,14 +93,14 @@ some users may not always agree with the result and for arbitrary reasons:
|
|
|
93
93
|
Custom headers may be defined in the configuration file for the program
|
|
94
94
|
and will then be added to each outgoing post.
|
|
95
95
|
|
|
96
|
-
* The X-No-Archive
|
|
97
|
-
saved and stays available to search-engines (Google, notably).
|
|
98
|
-
postings, for example, do probably not justify at all that they would
|
|
99
|
-
referenced in search results.
|
|
100
|
-
|
|
101
|
-
posts to certain newsgroups.
|
|
96
|
+
* The Archive- and X-No-Archive headers are sometimes set to avoid that an
|
|
97
|
+
article be saved and stays available to search-engines (Google, notably).
|
|
98
|
+
Test- postings, for example, do probably not justify at all that they would
|
|
99
|
+
be referenced in search results. The post-processor program can impose the
|
|
100
|
+
Archive- and X-No-Archive header for all posts to certain newsgroups.
|
|
102
101
|
|
|
103
|
-
**ATTN** As of 2024,
|
|
102
|
+
**ATTN** As of 2024, the X-No-Archive has lost most of its utility and it
|
|
103
|
+
is the decision of server operators to honor it or not.
|
|
104
104
|
|
|
105
105
|
* If a news post contains many references to either other posts or Web
|
|
106
106
|
pages, the text can be cluttered with URLs.
|
|
@@ -129,7 +129,7 @@ have not yet been set in the configuration.
|
|
|
129
129
|
* Signatures, as set in the configuration **can be ignored**. Either
|
|
130
130
|
a default signature will appear as set in flnews or none.
|
|
131
131
|
* Custom Headers, if configured, can be **omitted**.
|
|
132
|
-
*
|
|
132
|
+
* Archive- and X-No-Archive headers, if set for the current newsgroup, **can be
|
|
133
133
|
ignored**.
|
|
134
134
|
* The verification & correction of references **can be disabled**.
|
|
135
135
|
* Logging can be **switched off**, if set.
|
|
@@ -225,9 +225,10 @@ intact.
|
|
|
225
225
|
_\- 'X-My-Header: nothing fancy'_
|
|
226
226
|
_\- 'X-Another-Header: care not!'_
|
|
227
227
|
|
|
228
|
-
**
|
|
229
|
-
|
|
230
|
-
|
|
228
|
+
**NO_ARCHIVE_GROUPS**
|
|
229
|
+
|
|
230
|
+
The newsgroups, where the headers “Archive: no” and “X-No-Archive: YES” shall
|
|
231
|
+
be set.
|
|
231
232
|
|
|
232
233
|
CONTENT: a dash and space, then a String, containing the name of the group or
|
|
233
234
|
a regexp.
|
data/bin/flnews_post_proc
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#encoding: UTF-8
|
|
3
3
|
=begin
|
|
4
4
|
/***************************************************************************
|
|
5
|
-
* ©2023-
|
|
5
|
+
* ©2023-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
|
6
6
|
* *
|
|
7
7
|
* This program is free software; you can redistribute it and/or modify *
|
|
8
8
|
* it under the terms of the DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE *
|
|
@@ -26,8 +26,14 @@ require_relative '../lib/override'
|
|
|
26
26
|
require_relative '../lib/flnews_post_proc'
|
|
27
27
|
require_relative '../lib/basic_logging'
|
|
28
28
|
require_relative '../lib/configuration'
|
|
29
|
+
require_relative '../lib/version'
|
|
29
30
|
|
|
30
31
|
self.extend(BasicLogging)
|
|
32
|
+
|
|
33
|
+
msg = PROGNAME.dup << ' ' << PROGVERSION << ' starting'
|
|
34
|
+
msg = "–––––– " << msg << " ––––––"
|
|
35
|
+
|
|
36
|
+
info msg
|
|
31
37
|
# Get a configuration
|
|
32
38
|
config = Configuration::instance
|
|
33
39
|
|
|
@@ -80,5 +86,4 @@ else
|
|
|
80
86
|
STDERR.puts usage
|
|
81
87
|
exit false
|
|
82
88
|
end
|
|
83
|
-
|
|
84
89
|
# Ω
|
|
@@ -390,38 +390,33 @@ own creations.</p>
|
|
|
390
390
|
<h2>The limits of a basic newsreader — what the program can do</h2>
|
|
391
391
|
<p>While the articles that flnews creates, are complete and ready to be posted,
|
|
392
392
|
some users may not always agree with the result and for arbitrary reasons:</p>
|
|
393
|
-
<ul>
|
|
394
|
-
<li
|
|
393
|
+
<ul class="simple">
|
|
394
|
+
<li>There may be inconveniences when you post to different newsgroups in
|
|
395
395
|
different languages, as an introductory line which refers to a previous
|
|
396
396
|
post can only be set once in the flnews-configuration. The consequence
|
|
397
397
|
can be that your post to a french newsgroup begins with an introduction
|
|
398
398
|
in English.
|
|
399
399
|
My post-processor program can set an introductory line specifically
|
|
400
|
-
chosen for one or several newsgroups.</
|
|
401
|
-
|
|
402
|
-
<li><p class="first">The same conflict arises, when you have set a standard signature-text and
|
|
400
|
+
chosen for one or several newsgroups.</li>
|
|
401
|
+
<li>The same conflict arises, when you have set a standard signature-text and
|
|
403
402
|
would like to replace it against another, based on the newsgroup you are
|
|
404
403
|
about to post to.
|
|
405
404
|
The post-processor program sets specific signatures as configured for one
|
|
406
|
-
or several newsgroups.</
|
|
407
|
-
|
|
408
|
-
<li><p class="first">Some custom headers may serve to convey additional information to
|
|
405
|
+
or several newsgroups.</li>
|
|
406
|
+
<li>Some custom headers may serve to convey additional information to
|
|
409
407
|
interested readers of your post, like GnuPG key IDs, your language skills
|
|
410
408
|
or the like. The signature may be a better choice than custom headers.
|
|
411
409
|
You are free. I just mention face and x-face but prefer that you do not
|
|
412
410
|
remember I did.
|
|
413
411
|
Custom-headers may be defined in the configuration file for the program
|
|
414
|
-
and will then be added to each outgoing post.</
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
<p><strong>ATTN</strong> Since 2024, this header might no longer serve any purpose.</p>
|
|
423
|
-
</li>
|
|
424
|
-
<li><p class="first">If a news post contains many references to either other posts or Web
|
|
412
|
+
and will then be added to each outgoing post.</li>
|
|
413
|
+
<li>The Archive- and the X-No-Archive header are sometimes set to avoid that an
|
|
414
|
+
article be saved and stays available to search-engines (Google, notably).
|
|
415
|
+
Test- postings, for example, do probably not justify at all that they would
|
|
416
|
+
be referenced in search-results.
|
|
417
|
+
The post-processor program can impose both headers for all posts to certain
|
|
418
|
+
newsgroups.</li>
|
|
419
|
+
<li>If a news post contains many references to either other posts or Web
|
|
425
420
|
pages, the text can be cluttered with URLs.
|
|
426
421
|
The post-processor can identify marked text fragments and transform them
|
|
427
422
|
into footnotes, which will be attached as a list at the bottom of the
|
|
@@ -430,8 +425,7 @@ This works almost like the <ref/> link in Wikipedia, but the delimiter
|
|
|
430
425
|
can be determined in the configuration file.
|
|
431
426
|
Example (with %=):
|
|
432
427
|
This is an object %=and this becomes the footnote, describing the object
|
|
433
|
-
further=%</
|
|
434
|
-
</li>
|
|
428
|
+
further=%</li>
|
|
435
429
|
</ul>
|
|
436
430
|
</div>
|
|
437
431
|
<div class="section" id="dialog-to-override-settings">
|
|
@@ -445,8 +439,8 @@ have not yet been set in the configuration.</p>
|
|
|
445
439
|
<li>Signatures, as set in the configuration <strong>can be ignored</strong>. Either
|
|
446
440
|
a default signature will appear as set in flnews or none.</li>
|
|
447
441
|
<li>Custom Headers, if configured, can be <strong>omitted</strong>.</li>
|
|
448
|
-
<li>The X-No-Archive
|
|
449
|
-
ignored</strong>.</li>
|
|
442
|
+
<li>The Archive- and X-No-Archive headers, if set for the current newsgroup,
|
|
443
|
+
<strong>can be ignored</strong>.</li>
|
|
450
444
|
<li>Logging can be <strong>switched off</strong>, if set.</li>
|
|
451
445
|
</ul>
|
|
452
446
|
<p>Pushing Esc or the cancle-button of the dialog interrupts the process, flnews
|
|
@@ -523,9 +517,9 @@ name of the header, ending in a colon and the value of the header.</p>
|
|
|
523
517
|
<div class="line">- 'X-Another-Header: care not!'</div>
|
|
524
518
|
</div>
|
|
525
519
|
</dd>
|
|
526
|
-
<dt><strong>
|
|
527
|
-
<dd><p class="first">The newsgroups, where
|
|
528
|
-
|
|
520
|
+
<dt><strong>NO_ARCHIVE_GROUPS</strong></dt>
|
|
521
|
+
<dd><p class="first">The newsgroups, where the headers “Archive: no” and “X-No-Archive: YES” shall
|
|
522
|
+
be set.</p>
|
|
529
523
|
<p>CONTENT: a dash and space, then a String, containing the name of the group or a regexp.</p>
|
|
530
524
|
<p>DEFAULT: empty</p>
|
|
531
525
|
<div class="last line-block">
|
|
@@ -421,14 +421,14 @@ ne vous en souvenez pas.</p>
|
|
|
421
421
|
<p>Ces entêtes, – Custom-Headers – peuvent être définis dans la configuration
|
|
422
422
|
du logiciel et vont être utilisées dans chaque article sortant.</p>
|
|
423
423
|
</li>
|
|
424
|
-
<li><p class="first">
|
|
425
|
-
d'un article. Il ne devrait par conséquence pas être
|
|
426
|
-
de recherche ( Google notamment ). Les articles dans
|
|
427
|
-
exemple, ne valent probablement pas qu'on les trouve
|
|
428
|
-
recherches.</p>
|
|
424
|
+
<li><p class="first">Les entêtes « Archive » et « X-No-Archive » sont parfois utilisés afin
|
|
425
|
+
d'éviter l'archivage d'un article. Il ne devrait par conséquence pas être
|
|
426
|
+
trouvé par les moteurs de recherche ( Google notamment ). Les articles dans
|
|
427
|
+
les groupes de test, par exemple, ne valent probablement pas qu'on les trouve
|
|
428
|
+
parmi les résultats des recherches.</p>
|
|
429
429
|
<p>Avec flnews_post_proc vous pouvez décider et imposer que vos articles dans
|
|
430
|
-
certains newsgroups contiendront d'office
|
|
431
|
-
<
|
|
430
|
+
certains newsgroups contiendront d'office les deux entêtes <strong>Archive: no</strong> et
|
|
431
|
+
<strong>X-No-Archive: Yes</strong>.</p>
|
|
432
432
|
</li>
|
|
433
433
|
<li><p class="first">Certains messages mentionnent d'autres articles ou des URLs de pages Web.
|
|
434
434
|
S'ils sont nombreux, ces références peuvent déranger la lecture à cause de
|
|
@@ -456,7 +456,8 @@ des options, qui ne l'ont pas été auparavant :</p>
|
|
|
456
456
|
<li>Signatures, comme définis dans la configuration <strong>peuvent être ignorées</strong>.
|
|
457
457
|
Soit une signature par défaut sera appliquée, si prévue, ou aucune.</li>
|
|
458
458
|
<li>Entêtes supplémentaires, si définis, peuvent rester absentes de l'article.</li>
|
|
459
|
-
<li>
|
|
459
|
+
<li>Les entêtes Archive et X-No-Archive, si prévus pour le newsgroup choisi,
|
|
460
|
+
peuvent être ignorés.</li>
|
|
460
461
|
<li>L'auto correction de URLs et références à d'autres articles peut être
|
|
461
462
|
désactivé.</li>
|
|
462
463
|
<li>L'écriture d'un protocole peut être arrêtée.</li>
|
|
@@ -550,9 +551,9 @@ l'entête.</p>
|
|
|
550
551
|
<div class="line">- 'X-Another-Header: care not!'</div>
|
|
551
552
|
</div>
|
|
552
553
|
</dd>
|
|
553
|
-
<dt><strong>
|
|
554
|
-
<dd><p class="first">Les newsgroups, où
|
|
555
|
-
|
|
554
|
+
<dt><strong>NO_ARCHIVE_GROUPS</strong></dt>
|
|
555
|
+
<dd><p class="first">Les newsgroups, où les entêtes « Archive: no » et « X-No-Archive: yes »
|
|
556
|
+
doivent être présents.</p>
|
|
556
557
|
<p>CONTENU : Un trait d'union et un espace, puis une chaîne de caractères,
|
|
557
558
|
contenant le nom du groupe ou une expression.</p>
|
|
558
559
|
<p>PAR DÉFAUT : Vide</p>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -60,14 +60,12 @@ some users may not always agree with the result and for arbitrary reasons:
|
|
|
60
60
|
Custom-headers may be defined in the configuration file for the program
|
|
61
61
|
and will then be added to each outgoing post.
|
|
62
62
|
|
|
63
|
-
* The X-No-Archive header
|
|
64
|
-
saved and stays available to search-engines (Google, notably).
|
|
65
|
-
postings, for example, do probably not justify at all that they would
|
|
66
|
-
referenced in search-results.
|
|
67
|
-
The post-processor program can impose
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
**ATTN** Since 2024, this header might no longer serve any purpose.
|
|
63
|
+
* The Archive- and the X-No-Archive header are sometimes set to avoid that an
|
|
64
|
+
article be saved and stays available to search-engines (Google, notably).
|
|
65
|
+
Test- postings, for example, do probably not justify at all that they would
|
|
66
|
+
be referenced in search-results.
|
|
67
|
+
The post-processor program can impose both headers for all posts to certain
|
|
68
|
+
newsgroups.
|
|
71
69
|
|
|
72
70
|
* If a news post contains many references to either other posts or Web
|
|
73
71
|
pages, the text can be cluttered with URLs.
|
|
@@ -91,8 +89,8 @@ have not yet been set in the configuration.
|
|
|
91
89
|
* Signatures, as set in the configuration **can be ignored**. Either
|
|
92
90
|
a default signature will appear as set in flnews or none.
|
|
93
91
|
* Custom Headers, if configured, can be **omitted**.
|
|
94
|
-
* The X-No-Archive
|
|
95
|
-
ignored**.
|
|
92
|
+
* The Archive- and X-No-Archive headers, if set for the current newsgroup,
|
|
93
|
+
**can be ignored**.
|
|
96
94
|
* Logging can be **switched off**, if set.
|
|
97
95
|
|
|
98
96
|
Pushing Esc or the cancle-button of the dialog interrupts the process, flnews
|
|
@@ -187,9 +185,9 @@ categories:
|
|
|
187
185
|
| - 'X-My-Header: nothing fancy'
|
|
188
186
|
| - 'X-Another-Header: care not!'
|
|
189
187
|
|
|
190
|
-
**
|
|
191
|
-
The newsgroups, where
|
|
192
|
-
|
|
188
|
+
**NO_ARCHIVE_GROUPS**
|
|
189
|
+
The newsgroups, where the headers “Archive: no” and “X-No-Archive: YES” shall
|
|
190
|
+
be set.
|
|
193
191
|
|
|
194
192
|
CONTENT: a dash and space, then a String, containing the name of the group or a regexp.
|
|
195
193
|
|
|
@@ -73,16 +73,15 @@ et ce pour des raisons arbitraires :
|
|
|
73
73
|
Ces entêtes, – Custom-Headers – peuvent être définis dans la configuration
|
|
74
74
|
du logiciel et vont être utilisées dans chaque article sortant.
|
|
75
75
|
|
|
76
|
-
*
|
|
77
|
-
d'un article. Il ne devrait par conséquence pas être
|
|
78
|
-
de recherche ( Google notamment ). Les articles dans
|
|
79
|
-
exemple, ne valent probablement pas qu'on les trouve
|
|
80
|
-
recherches.
|
|
76
|
+
* Les entêtes « Archive » et « X-No-Archive » sont parfois utilisés afin
|
|
77
|
+
d'éviter l'archivage d'un article. Il ne devrait par conséquence pas être
|
|
78
|
+
trouvé par les moteurs de recherche ( Google notamment ). Les articles dans
|
|
79
|
+
les groupes de test, par exemple, ne valent probablement pas qu'on les trouve
|
|
80
|
+
parmi les résultats des recherches.
|
|
81
81
|
|
|
82
82
|
Avec flnews_post_proc vous pouvez décider et imposer que vos articles dans
|
|
83
|
-
certains newsgroups contiendront d'office
|
|
84
|
-
|
|
85
|
-
**ATTN** Depuis l'année 2024, cet entête n'a probablement plus de fonction.
|
|
83
|
+
certains newsgroups contiendront d'office les deux entêtes **Archive: no** et
|
|
84
|
+
**X-No-Archive: Yes**.
|
|
86
85
|
|
|
87
86
|
* Certains messages mentionnent d'autres articles ou des URLs de pages Web.
|
|
88
87
|
S'ils sont nombreux, ces références peuvent déranger la lecture à cause de
|
|
@@ -112,7 +111,8 @@ des options, qui ne l'ont pas été auparavant :
|
|
|
112
111
|
|
|
113
112
|
* Entêtes supplémentaires, si définis, peuvent rester absentes de l'article.
|
|
114
113
|
|
|
115
|
-
*
|
|
114
|
+
* Les entêtes Archive et X-No-Archive, si prévus pour le newsgroup choisi,
|
|
115
|
+
peuvent être ignorés.
|
|
116
116
|
|
|
117
117
|
* L'auto correction de URLs et références à d'autres articles peut être
|
|
118
118
|
désactivé.
|
|
@@ -218,9 +218,9 @@ variables définis dans ce fichier peuvent être classées en deux catégories :
|
|
|
218
218
|
| - 'X-My-Header: nothing fancy'
|
|
219
219
|
| - 'X-Another-Header: care not!'
|
|
220
220
|
|
|
221
|
-
**
|
|
222
|
-
Les newsgroups, où
|
|
223
|
-
|
|
221
|
+
**NO_ARCHIVE_GROUPS**
|
|
222
|
+
Les newsgroups, où les entêtes « Archive: no » et « X-No-Archive: yes »
|
|
223
|
+
doivent être présents.
|
|
224
224
|
|
|
225
225
|
CONTENU : Un trait d'union et un espace, puis une chaîne de caractères,
|
|
226
226
|
contenant le nom du groupe ou une expression.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
" > >> > testerei ei ei".strip.gsub( /^>+(\s+>+)*/) {|m| m.to_s.delete(" ")}
|
data/lib/body.rb
CHANGED
|
@@ -203,19 +203,23 @@ class Body
|
|
|
203
203
|
# handle <news:..@...>
|
|
204
204
|
def handle_news(l)
|
|
205
205
|
# ... “Do not trust nobody!”
|
|
206
|
-
if l.include?('@') && ! l.include?('http:')
|
|
206
|
+
if l.include?('@') && ! l.include?('http:') && ! l.include?('https:')
|
|
207
207
|
# And I forgot how this works. It does.
|
|
208
208
|
l.split.collect do |ele|
|
|
209
209
|
# angular brackets are there alright. Hurra.
|
|
210
210
|
url = ele.match(/\<(.*)\>/)
|
|
211
211
|
unless !url
|
|
212
212
|
debug(' with angular brackets: ' << url.inspect)
|
|
213
|
-
l = l.sub(url[1], 'news:' << url[1]) if !url[1].
|
|
213
|
+
l = l.sub(url[1], 'news:' << url[1]) if !url[1].start_with?('mailto') && !url[1].start_with?('news')
|
|
214
214
|
else
|
|
215
215
|
url = ele.match(/\S+@(\.|[^\p{P}]+)\S+/)
|
|
216
216
|
if url
|
|
217
217
|
debug(' withOUT angular brackets: ' << url.inspect)
|
|
218
|
-
|
|
218
|
+
if !url[0].start_with?('mailto') && !url[0].start_with?('news')
|
|
219
|
+
l.sub!(url[0], 'news:' << url[0] )
|
|
220
|
+
end
|
|
221
|
+
l.sub!('news:', '<news:')
|
|
222
|
+
l.sub!(url[0], url[0] << '>')
|
|
219
223
|
end
|
|
220
224
|
end
|
|
221
225
|
end # url_strs = collect
|
|
@@ -227,7 +231,11 @@ class Body
|
|
|
227
231
|
def handle_http(l)
|
|
228
232
|
debug('handle http')
|
|
229
233
|
l_array = l.split
|
|
230
|
-
url_strs = l_array.collect
|
|
234
|
+
url_strs = l_array.collect do |ele|
|
|
235
|
+
if ele.strip.include?('http') && ele.match(/https?:/)
|
|
236
|
+
ele.strip
|
|
237
|
+
end
|
|
238
|
+
end.compact
|
|
231
239
|
debug('url_strs: ' << url_strs.to_s)
|
|
232
240
|
url_strs.each do |str|
|
|
233
241
|
# keep str for final replacement
|
|
@@ -235,13 +243,13 @@ class Body
|
|
|
235
243
|
debug( 'try to match http-link')
|
|
236
244
|
begin
|
|
237
245
|
# missing slashes ?
|
|
238
|
-
match = str.match(/(https?):(
|
|
246
|
+
match = str.match(/(https?):(\/*)/)
|
|
239
247
|
if (!match || match.length != 3 || match[2] != '//')
|
|
240
|
-
debug 'cannot find slashes in the URL'
|
|
248
|
+
debug 'cannot find (enough) slashes in the URL'
|
|
241
249
|
if str.match(/https:/)
|
|
242
|
-
nstr = str.sub(/https
|
|
250
|
+
nstr = str.sub(/https:\/*/, "https://")
|
|
243
251
|
elsif str.match(/http:/)
|
|
244
|
-
nstr = str.sub(/http
|
|
252
|
+
nstr = str.sub(/http:\/*/, "http://")
|
|
245
253
|
end
|
|
246
254
|
debug ' with slashes: ' << nstr
|
|
247
255
|
end
|
|
@@ -252,8 +260,8 @@ class Body
|
|
|
252
260
|
match = nstr.match(/\<?(https?:\/\/[^\>]*)\>?/)
|
|
253
261
|
# get the darned URL already!
|
|
254
262
|
url = match[1] if match
|
|
255
|
-
|
|
256
|
-
|
|
263
|
+
# nstr = with_angular_brackets(nstr, url)
|
|
264
|
+
l.sub!(str, nstr)
|
|
257
265
|
rescue Exception => ex
|
|
258
266
|
# this had looked intelligent, once.
|
|
259
267
|
line = __LINE__
|
|
@@ -264,6 +272,8 @@ class Body
|
|
|
264
272
|
exit false
|
|
265
273
|
end
|
|
266
274
|
end
|
|
275
|
+
|
|
276
|
+
return l
|
|
267
277
|
end
|
|
268
278
|
end
|
|
269
279
|
# Ω
|
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.44"
|
|
18
18
|
AUTHORS = "Michael Uplawski"
|
|
19
19
|
EMAIL = "michael.uplawski@uplawski.eu"
|
|
20
20
|
YEARS = "2023 - 2024"
|
|
21
|
-
SUMMARY = "
|
|
21
|
+
SUMMARY = "Bugfix: Strings http and https without following colon are not interpreted as links"
|
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.44'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Uplawski
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-05-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: diffy
|
|
@@ -48,6 +48,7 @@ files:
|
|
|
48
48
|
- doc/pdf/flnews_post_proc_fr.pdf
|
|
49
49
|
- doc/rst/flnews_post_proc.rst
|
|
50
50
|
- doc/rst/flnews_post_proc_fr.rst
|
|
51
|
+
- lib/_quoting_style_regexp
|
|
51
52
|
- lib/basic_logging.rb
|
|
52
53
|
- lib/body.rb
|
|
53
54
|
- lib/color_output.rb
|
|
@@ -84,5 +85,6 @@ requirements: []
|
|
|
84
85
|
rubygems_version: 3.4.20
|
|
85
86
|
signing_key:
|
|
86
87
|
specification_version: 4
|
|
87
|
-
summary: '
|
|
88
|
+
summary: 'Bugfix: Strings http and https without following colon are not interpreted
|
|
89
|
+
as links'
|
|
88
90
|
test_files: []
|