flnews_post_proc 1.48 → 1.53
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 +10 -10
- data/doc/{html/flnews_post_proc_fr.html → fr/html/flnews_post_proc.html} +4 -1
- data/doc/fr/man/flnews_post_proc.1.gz +0 -0
- data/doc/fr/pdf/flnews_post_proc.pdf +0 -0
- data/doc/{rst/flnews_post_proc_fr.rst → fr/rst/flnews_post_proc.rst} +4 -0
- data/doc/html/flnews_post_proc.html +18 -11
- 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 -0
- data/lib/_quoting_style_regexp +1 -0
- data/lib/body.rb +28 -9
- data/lib/configuration.rb +1 -0
- data/lib/flnews_post_proc.rb +1 -1
- data/lib/version.rb +2 -3
- metadata +8 -9
- data/doc/man/flnews_post_proc_fr.1.gz +0 -0
- data/doc/pdf/flnews_post_proc_fr.pdf +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bb3c498d2cde3e3c4afcd611006857a9b88db02cd27a05fe04ef1cac4448d6bd
|
|
4
|
+
data.tar.gz: 1fbd7d419082397cb748ad397c168c5ebc55b002e162a2831775677b0289734e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 547bfbcea62f28654150632b088ad3f9ff7a48b2df3893fff5849e94f865f1ed2c7c39d97f493320f1a1687247118864a242f760ae8c032f4817c43d70bdc43c
|
|
7
|
+
data.tar.gz: 34ad4b1054b1308f391a4207222ffd39b407e62184cf38012e46d60cfbe3a375b598477e50ff92d9bec8181cbd15ea79d249bb6d0c535b2bf4e884ba7cea9460
|
data/README.md
CHANGED
|
@@ -56,7 +56,7 @@ The flnews newsreader is sufficient for Usenet access, i.e. to receive and read
|
|
|
56
56
|
articles from -, as well as to write and post articles to newsgroups.
|
|
57
57
|
|
|
58
58
|
When you compare news-clients, you will always notice the differences and
|
|
59
|
-
choose the software that you prefer.
|
|
59
|
+
choose the software that you prefer. flnews however, has the charm that you can
|
|
60
60
|
influence how the program itself works but also modify posts that flnews
|
|
61
61
|
produces, just before the program will transmit them to the chosen nntp-server.
|
|
62
62
|
|
|
@@ -93,13 +93,13 @@ 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 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.
|
|
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.
|
|
101
101
|
|
|
102
|
-
**ATTN** As of 2024, the header “X-No-Archive“ has lost most of its utility
|
|
102
|
+
**ATTN** As of 2024, the header “X-No-Archive“ has lost most of its utility
|
|
103
103
|
and it 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
|
|
@@ -166,7 +166,7 @@ Ruby, noted as a String. Beware to mask a backslash '\\' by another one,
|
|
|
166
166
|
ike in the example. A capture-group '()' serves to extract the name from the
|
|
167
167
|
match result.
|
|
168
168
|
|
|
169
|
-
Leave this field empty to keep the default from the
|
|
169
|
+
Leave this field empty to keep the default from the flnews configuration
|
|
170
170
|
intact.
|
|
171
171
|
|
|
172
172
|
CONTENT: A String equivalent of a regular expression.
|
|
@@ -199,7 +199,7 @@ intact.
|
|
|
199
199
|
|
|
200
200
|
CONTENT: A newsgroup or regexp per line, followed by a colon, a space and a String
|
|
201
201
|
|
|
202
|
-
DEFAULT: As configured in
|
|
202
|
+
DEFAULT: As configured in flnews
|
|
203
203
|
|
|
204
204
|
EXAMPLE: _alt.test: "Thus spoke #\{fup_name\} on that baleful #\{fup_date\}:"_
|
|
205
205
|
|
|
@@ -320,7 +320,7 @@ A dialog may be displayed which allows you to disable any of these
|
|
|
320
320
|
four options, so that the defaults from flnews prevail.
|
|
321
321
|
|
|
322
322
|
ATTN! Canceling the dialog or pushing the Esc-key does interrupt
|
|
323
|
-
the process.
|
|
323
|
+
the process. flnews will not post the article.
|
|
324
324
|
|
|
325
325
|
Set this option to no, NO or similar to disable the dialog.
|
|
326
326
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
6
|
<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
|
|
7
|
-
<title>
|
|
7
|
+
<title>Flnews_post_proc</title>
|
|
8
8
|
<style type="text/css">
|
|
9
9
|
|
|
10
10
|
/*
|
|
@@ -429,6 +429,9 @@ 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
430
|
certains newsgroups contiendront d'office les deux entêtes <strong>Archive: no</strong> et
|
|
431
431
|
<strong>X-No-Archive: Yes</strong>.</p>
|
|
432
|
+
<p><strong>ATTENTION</strong>: Dès 2024, l'entête « X-No-Archive » a perdu beaucoup de son
|
|
433
|
+
utilité. Les opérateurs des serveurs peuvent décider s'ils veulent le prendre
|
|
434
|
+
en considération ou non.</p>
|
|
432
435
|
</li>
|
|
433
436
|
<li><p class="first">Certains messages mentionnent d'autres articles ou des URLs de pages Web.
|
|
434
437
|
S'ils sont nombreux, ces références peuvent déranger la lecture à cause de
|
|
Binary file
|
|
Binary file
|
|
@@ -83,6 +83,10 @@ et ce pour des raisons arbitraires :
|
|
|
83
83
|
certains newsgroups contiendront d'office les deux entêtes **Archive: no** et
|
|
84
84
|
**X-No-Archive: Yes**.
|
|
85
85
|
|
|
86
|
+
**ATTENTION**: Dès 2024, l'entête « X-No-Archive » a perdu beaucoup de son
|
|
87
|
+
utilité. Les opérateurs des serveurs peuvent décider s'ils veulent le prendre
|
|
88
|
+
en considération ou non.
|
|
89
|
+
|
|
86
90
|
* Certains messages mentionnent d'autres articles ou des URLs de pages Web.
|
|
87
91
|
S'ils sont nombreux, ces références peuvent déranger la lecture à cause de
|
|
88
92
|
leur syntaxe spécifique.
|
|
@@ -390,33 +390,39 @@ 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>There may be inconveniences when you post to different newsgroups in
|
|
393
|
+
<ul>
|
|
394
|
+
<li><p class="first">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
|
-
|
|
400
|
+
chosen for one or several newsgroups.</p>
|
|
401
|
+
</li>
|
|
402
|
+
<li><p class="first">The same conflict arises, when you have set a standard signature-text and
|
|
402
403
|
would like to replace it against another, based on the newsgroup you are
|
|
403
404
|
about to post to.
|
|
404
405
|
The post-processor program sets specific signatures as configured for one
|
|
405
|
-
or several newsgroups.</
|
|
406
|
-
|
|
406
|
+
or several newsgroups.</p>
|
|
407
|
+
</li>
|
|
408
|
+
<li><p class="first">Some custom headers may serve to convey additional information to
|
|
407
409
|
interested readers of your post, like GnuPG key IDs, your language skills
|
|
408
410
|
or the like. The signature may be a better choice than custom headers.
|
|
409
411
|
You are free. I just mention face and x-face but prefer that you do not
|
|
410
412
|
remember I did.
|
|
411
413
|
Custom-headers may be defined in the configuration file for the program
|
|
412
|
-
and will then be added to each outgoing post.</
|
|
413
|
-
|
|
414
|
+
and will then be added to each outgoing post.</p>
|
|
415
|
+
</li>
|
|
416
|
+
<li><p class="first">The Archive- and the X-No-Archive header are sometimes set to avoid that an
|
|
414
417
|
article be saved and stays available to search-engines (Google, notably).
|
|
415
418
|
Test- postings, for example, do probably not justify at all that they would
|
|
416
419
|
be referenced in search-results.
|
|
417
420
|
The post-processor program can impose both headers for all posts to certain
|
|
418
|
-
newsgroups.</
|
|
419
|
-
<
|
|
421
|
+
newsgroups.</p>
|
|
422
|
+
<p><strong>ATTN</strong> As of 2024, the header “X-No-Archive“ has lost most of its utility
|
|
423
|
+
and it is the decision of server operators to honor it or not.</p>
|
|
424
|
+
</li>
|
|
425
|
+
<li><p class="first">If a news post contains many references to either other posts or Web
|
|
420
426
|
pages, the text can be cluttered with URLs.
|
|
421
427
|
The post-processor can identify marked text fragments and transform them
|
|
422
428
|
into footnotes, which will be attached as a list at the bottom of the
|
|
@@ -425,7 +431,8 @@ This works almost like the <ref/> link in Wikipedia, but the delimiter
|
|
|
425
431
|
can be determined in the configuration file.
|
|
426
432
|
Example (with %=):
|
|
427
433
|
This is an object %=and this becomes the footnote, describing the object
|
|
428
|
-
further=%</
|
|
434
|
+
further=%</p>
|
|
435
|
+
</li>
|
|
429
436
|
</ul>
|
|
430
437
|
</div>
|
|
431
438
|
<div class="section" id="dialog-to-override-settings">
|
|
Binary file
|
|
Binary file
|
|
@@ -67,6 +67,9 @@ some users may not always agree with the result and for arbitrary reasons:
|
|
|
67
67
|
The post-processor program can impose both headers for all posts to certain
|
|
68
68
|
newsgroups.
|
|
69
69
|
|
|
70
|
+
**ATTN** As of 2024, the header “X-No-Archive“ has lost most of its utility
|
|
71
|
+
and it is the decision of server operators to honor it or not.
|
|
72
|
+
|
|
70
73
|
* If a news post contains many references to either other posts or Web
|
|
71
74
|
pages, the text can be cluttered with URLs.
|
|
72
75
|
The post-processor can identify marked text fragments and transform them
|
data/lib/_quoting_style_regexp
CHANGED
data/lib/body.rb
CHANGED
|
@@ -17,7 +17,12 @@
|
|
|
17
17
|
require_relative 'basic_logging'
|
|
18
18
|
require_relative 'configuration'
|
|
19
19
|
|
|
20
|
-
#
|
|
20
|
+
# An object of this class represents the body of a news-article.
|
|
21
|
+
# It processes the original text and changes some details:
|
|
22
|
+
# intro-lines
|
|
23
|
+
# signatures
|
|
24
|
+
# URI formats
|
|
25
|
+
# Footnotes (and/or a list of references) are created
|
|
21
26
|
class Body
|
|
22
27
|
# a class-level configuration instance.
|
|
23
28
|
@@config = Configuration.instance
|
|
@@ -99,6 +104,13 @@ class Body
|
|
|
99
104
|
# exchange original intro-line against the new one
|
|
100
105
|
@lines[@lines.index(ointro)] = intro.strip
|
|
101
106
|
# looked complicated because it is.
|
|
107
|
+
|
|
108
|
+
# keep this line for reference.
|
|
109
|
+
@intro = intro
|
|
110
|
+
else
|
|
111
|
+
wmsg = 'Text following the intro is not a citation!'
|
|
112
|
+
wmsg << "\n\tIntro will NOT be modified: \"#{ointro}\"!"
|
|
113
|
+
warn wmsg
|
|
102
114
|
end
|
|
103
115
|
end
|
|
104
116
|
end # fn.strip.empty?
|
|
@@ -111,7 +123,7 @@ class Body
|
|
|
111
123
|
# remove any signature(s) from
|
|
112
124
|
# the current article
|
|
113
125
|
sigpos = @lines.index('-- ')
|
|
114
|
-
debug('found signature
|
|
126
|
+
debug('found signature in line ' << sigpos.to_s) if sigpos
|
|
115
127
|
@lines = @lines.slice(0, sigpos ) if sigpos
|
|
116
128
|
debug('setting signature ' << signature) if signature
|
|
117
129
|
@lines << "-- " << signature if signature
|
|
@@ -119,8 +131,12 @@ class Body
|
|
|
119
131
|
end
|
|
120
132
|
|
|
121
133
|
def join
|
|
122
|
-
|
|
134
|
+
new_body = @lines.join("\r\n") << "\r\n"
|
|
135
|
+
# replace ellipsis
|
|
136
|
+
new_body.gsub!('...', '…')
|
|
137
|
+
return new_body
|
|
123
138
|
end
|
|
139
|
+
|
|
124
140
|
# ------->
|
|
125
141
|
# TODO : Concentrate all URL/URI munging functionality in 1 or 2 helper
|
|
126
142
|
# classes, e.g. Body::News and Body::Http
|
|
@@ -128,7 +144,7 @@ class Body
|
|
|
128
144
|
|
|
129
145
|
# Verify and possibly correct links in the post.
|
|
130
146
|
# Simple.
|
|
131
|
-
def
|
|
147
|
+
def handle_uris()
|
|
132
148
|
# Determine here or elsewhere if URLs shall be verified.
|
|
133
149
|
# Default is != no. nil or '' do qualify as default.
|
|
134
150
|
if @@config.VFY_URLS
|
|
@@ -144,7 +160,8 @@ class Body
|
|
|
144
160
|
# <----------------------------
|
|
145
161
|
|
|
146
162
|
# BUGFIX : Urls with @
|
|
147
|
-
|
|
163
|
+
# BUGFIX : email address in the intro
|
|
164
|
+
new_line = handle_news(l) if !@intro || l.strip != @intro.strip
|
|
148
165
|
# http(s)
|
|
149
166
|
if l.include?('http')
|
|
150
167
|
new_line = handle_http(l)
|
|
@@ -172,9 +189,8 @@ class Body
|
|
|
172
189
|
# to the whole body, over multiple lines, if need be.
|
|
173
190
|
begin
|
|
174
191
|
ref = body.match(ref_rx )
|
|
175
|
-
debug("found reference " << ref.to_s << " (length: " << (ref ? ref.to_s.size.to_s : '0') << ")")
|
|
192
|
+
debug("found reference " << ref.to_s << " (length: " << (ref ? ref.to_s.size.to_s : '0') << ")") if ref && ref.length > 0
|
|
176
193
|
if ref
|
|
177
|
-
debug('ref is ' << ref.to_s)
|
|
178
194
|
# ... This is some presentation thing and I think
|
|
179
195
|
# it works, too.
|
|
180
196
|
r = ref[0].gsub(/[ \t]+/, ' ').strip
|
|
@@ -184,7 +200,7 @@ class Body
|
|
|
184
200
|
body.gsub!(ref[0], format(@@config.REFERENCE_FORMAT, index.to_s ))
|
|
185
201
|
end
|
|
186
202
|
end until ref == nil
|
|
187
|
-
debug("all references found:\n" << references.join('\n'))
|
|
203
|
+
debug("all references found:\n" << references.join('\n')) if !references.empty?
|
|
188
204
|
else
|
|
189
205
|
msg = 'The References Delimiter is the same in its reversed form.'
|
|
190
206
|
msg << "#{$LN}Cannot handle references or footnotes!"
|
|
@@ -198,6 +214,8 @@ class Body
|
|
|
198
214
|
r = r.gsub(ref_delim, '').gsub(ref_delim.reverse,'')
|
|
199
215
|
body << (i + 1 ).to_s << ") " << r.strip << $LN
|
|
200
216
|
end
|
|
217
|
+
else
|
|
218
|
+
debug('no refences found')
|
|
201
219
|
end
|
|
202
220
|
end
|
|
203
221
|
@lines = body.split($LN)
|
|
@@ -238,7 +256,8 @@ class Body
|
|
|
238
256
|
url_strs = l_array.collect do |ele|
|
|
239
257
|
if ele.strip.include?('http') && ele.match(/https?:\S+/)
|
|
240
258
|
ele.lstrip!
|
|
241
|
-
|
|
259
|
+
# ensure last character is alphanumeric or '>' or '/'
|
|
260
|
+
until ele.match(/([[:alnum:]]|>|\/)$/) do
|
|
242
261
|
ele.chop!
|
|
243
262
|
end
|
|
244
263
|
ele
|
data/lib/configuration.rb
CHANGED
|
@@ -91,6 +91,7 @@ class Configuration
|
|
|
91
91
|
end
|
|
92
92
|
@conf[:CONFIG_VERSION] = PROGVERSION.to_f
|
|
93
93
|
bak_conf = @config_file.dup << '_' << conf_version.to_s
|
|
94
|
+
bak_conf.gsub!('.' << PROGNAME, 'bak_' << PROGNAME)
|
|
94
95
|
info('Old configuration is saved to ' << bak_conf )
|
|
95
96
|
info('New configuration is saved to ' << @config_file )
|
|
96
97
|
begin
|
data/lib/flnews_post_proc.rb
CHANGED
data/lib/version.rb
CHANGED
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
=end
|
|
15
15
|
|
|
16
16
|
PROGNAME = 'flnews_post_proc'
|
|
17
|
-
PROGVERSION = "1.
|
|
17
|
+
PROGVERSION = "1.53"
|
|
18
18
|
AUTHORS = "Michael Uplawski"
|
|
19
19
|
EMAIL = "michael.uplawski@uplawski.eu"
|
|
20
20
|
YEARS = "2023 - 2024"
|
|
21
|
-
SUMMARY = "
|
|
22
|
-
SUMMARY << "\n\t\"STDOUT\" allowed as log target"
|
|
21
|
+
SUMMARY = "Ellipsis is replaced against '…', French documentation in sub-folder doc/fr"
|
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.53'
|
|
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-06-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: diffy
|
|
@@ -30,7 +30,7 @@ dependencies:
|
|
|
30
30
|
- - ">="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: 3.4.2
|
|
33
|
-
description: Post-processor for Usenet-articles created in
|
|
33
|
+
description: Post-processor for Usenet-articles created in flnews
|
|
34
34
|
email: michael.uplawski@uplawski.eu
|
|
35
35
|
executables:
|
|
36
36
|
- flnews_post_proc
|
|
@@ -39,15 +39,15 @@ extra_rdoc_files: []
|
|
|
39
39
|
files:
|
|
40
40
|
- README.md
|
|
41
41
|
- bin/flnews_post_proc
|
|
42
|
+
- doc/fr/html/flnews_post_proc.html
|
|
43
|
+
- doc/fr/man/flnews_post_proc.1.gz
|
|
44
|
+
- doc/fr/pdf/flnews_post_proc.pdf
|
|
45
|
+
- doc/fr/rst/flnews_post_proc.rst
|
|
42
46
|
- doc/html/flnews_post_proc.html
|
|
43
|
-
- doc/html/flnews_post_proc_fr.html
|
|
44
47
|
- doc/license.txt
|
|
45
48
|
- doc/man/flnews_post_proc.1.gz
|
|
46
|
-
- doc/man/flnews_post_proc_fr.1.gz
|
|
47
49
|
- doc/pdf/flnews_post_proc.pdf
|
|
48
|
-
- doc/pdf/flnews_post_proc_fr.pdf
|
|
49
50
|
- doc/rst/flnews_post_proc.rst
|
|
50
|
-
- doc/rst/flnews_post_proc_fr.rst
|
|
51
51
|
- lib/_quoting_style_regexp
|
|
52
52
|
- lib/basic_logging.rb
|
|
53
53
|
- lib/body.rb
|
|
@@ -85,6 +85,5 @@ requirements: []
|
|
|
85
85
|
rubygems_version: 3.5.3
|
|
86
86
|
signing_key:
|
|
87
87
|
specification_version: 4
|
|
88
|
-
summary:
|
|
89
|
-
allowed as log target
|
|
88
|
+
summary: Ellipsis is replaced against '…', French documentation in sub-folder doc/fr
|
|
90
89
|
test_files: []
|
|
Binary file
|
|
Binary file
|