flnews_post_proc 1.71 → 1.72

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: 7cede40b08799a20bef9bb5b631371f5837269f17d16f4401190f73b953ea748
4
- data.tar.gz: 682eea779a029ed1078ef6ce5cb09d5aa877b8bb0d62c3df238e26db5dbf3ba1
3
+ metadata.gz: 6c4693a968763ac343c0fbee55c8aa62bb6c9f5a26993597a6cbb67e91a6f9c2
4
+ data.tar.gz: fb9fe23969356e11684b594b2543ef522ccfdb0579294bb959da1f4079a59445
5
5
  SHA512:
6
- metadata.gz: caca97eb88abfe09b7fae35da0389c0f7a3a0a336b59ac83432f8cdb958fbc98076ede8b52fa095044d51a04f4178c9227b6d2d596deb9e1504d51fb336a6bbd
7
- data.tar.gz: bfe1dc4048ff44e1f712fdd98eeab6512b6f60d95c122279d80e4d4d7a2f8a2f29078dc3ecee22ff1bcde7caf2412169a8e2645c86ddfa6b53311b3c183704aa
6
+ metadata.gz: 4f6165bbaaf311aba30bae956fc81ee19de2061a2152d0f0a6ee5490dc4b74062cd63abd6479215721cb060eafe06d1676ae01e1fd60cb46539a4c22a178c5c8
7
+ data.tar.gz: aa9925965ed3be4f2edfe92a5617e528c4d791256d0f0ee803a47024afe0073cc621eee5f75ac29756e1093d7242fa855c7d49013bf2dc92fcc08b06c8f49bcb
data/README.md CHANGED
@@ -281,7 +281,7 @@ the original message-body contains text marked for use as such a footnote. See
281
281
 
282
282
  **REFERENCES_DELIMITER**
283
283
  A symbol or sequence of symbols marking the beginning of a text which will
284
- serve as footnote (or reference). The **reversed sequence** musst be used to
284
+ serve as footnote (or reference). The **reversed sequence** must be used to
285
285
  mark the end of the text. The presence of this sequence or symbol in the
286
286
  original message body will cause the enclosed text to be moved below the
287
287
  message body.
@@ -4,46 +4,360 @@
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>flnews_post_proc</title>
7
+ <title>Flnews_post_proc</title>
8
8
  <style type="text/css">
9
9
 
10
10
  /*
11
- :Author: Michael Uplawski
12
- :Contact: michael.uplawski@uplawski.eu
13
- :License: WTFPL 2.0, see http://www.wtfpl.net/about/
11
+ :Author: David Goodger (goodger@python.org)
12
+ :Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
13
+ :Copyright: This stylesheet has been placed in the public domain.
14
14
 
15
- Stylesheet for use with Docutils.
15
+ Default cascading style sheet for the HTML output of Docutils.
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.
16
20
  */
17
21
 
18
- /* The defaults for docutils */
19
- @import url(html4css1.css);
22
+ /* used to remove borders from tables and images */
23
+ .borderless, table.borderless td, table.borderless th {
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 }
20
58
 
21
- body {
22
- background-color:#e0f0a0;
23
- font-family: Verdana,Helvetica,Univers;
59
+ object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
60
+ overflow: hidden;
24
61
  }
25
62
 
26
- h1 {color:darkblue;font-size:1.5em;}
27
- h1.title {color:#a0a0f0;font-size:2em;}
63
+ /* Uncomment (and remove this text!) to get bold-faced definition list terms
64
+ dl.docutils dt {
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 }
28
107
 
29
- p, ul.simple, ol.simple, dt {margin-left:2em;}
30
- dd {margin-left:4em;}
108
+ div.dedication p.topic-title {
109
+ font-weight: bold ;
110
+ font-style: normal }
31
111
 
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;}
112
+ div.figure {
113
+ margin-left: 2em ;
114
+ margin-right: 2em }
37
115
 
38
- em {color:#000080;
39
- background-color:#ffffa0;
116
+ div.footer, div.header {
117
+ clear: both;
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;
40
192
  }
41
193
 
42
- blockquote {background-color:#ffc090;
43
- padding:0.5em;
44
- border-radius:0.5em;
194
+ .align-left {
195
+ text-align: left }
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;
45
352
  }
46
353
 
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
+
47
361
  </style>
48
362
  </head>
49
363
  <body>
@@ -125,11 +439,12 @@ further=%</p>
125
439
  </div>
126
440
  <div class="section" id="dialog-to-override-settings">
127
441
  <h2>Dialog to override settings</h2>
442
+ <p>ATTN! As of version 1.72, YAD or Zenity cannot be used for the dialog.</p>
128
443
  <p>You can have a dialog displayed just before the post-processor is invoked, to
129
- <strong>disable</strong> some configuration options. Provided that either YAD, Zenity,
130
- Whiptail or only xterm are available on your computer, you can choose from
131
- the following options. You <strong>cannot</strong> use the dialog to enable options which
132
- have not yet been set in the configuration.</p>
444
+ <strong>disable</strong> some configuration options. Provided that Whiptail or only xterm
445
+ are available on your computer, you can choose from the following options. You
446
+ <strong>cannot</strong> use the dialog to enable options which have not yet been set in the
447
+ configuration.</p>
133
448
  <ul class="simple">
134
449
  <li>Signatures, as set in the configuration <strong>can be ignored</strong>. Either
135
450
  a default signature will appear as set in flnews or none.</li>
Binary file
Binary file
@@ -84,11 +84,13 @@ some users may not always agree with the result and for arbitrary reasons:
84
84
 
85
85
  Dialog to override settings
86
86
  ---------------------------
87
+ ATTN! As of version 1.72, YAD or Zenity cannot be used for the dialog.
88
+
87
89
  You can have a dialog displayed just before the post-processor is invoked, to
88
- **disable** some configuration options. Provided that either YAD, Zenity,
89
- Whiptail or only xterm are available on your computer, you can choose from
90
- the following options. You **cannot** use the dialog to enable options which
91
- have not yet been set in the configuration.
90
+ **disable** some configuration options. Provided that Whiptail or only xterm
91
+ are available on your computer, you can choose from the following options. You
92
+ **cannot** use the dialog to enable options which have not yet been set in the
93
+ configuration.
92
94
 
93
95
  * Signatures, as set in the configuration **can be ignored**. Either
94
96
  a default signature will appear as set in flnews or none.
data/lib/newsgroups.rb CHANGED
@@ -136,11 +136,13 @@ class Newsgroups
136
136
  File.open(sigfile, 'r') do |sfile|
137
137
  allSigs = sfile.read.split("\n\n")
138
138
  numSigs = allSigs.length
139
- srand(Time.now.nsec)
139
+ # srand(Time.now.nsec)
140
+ # use /dev/urandom
141
+ srand()
140
142
  sig = allSigs[rand(numSigs)]
141
143
  end
142
144
  # improve hazard for the next time.
143
- rearrange_sigs(sigfile, allSigs)
145
+ # rearrange_sigs(sigfile, allSigs)
144
146
  else
145
147
  error 'Cannot read signature from file ' << sigfile
146
148
  nil
@@ -150,6 +152,7 @@ class Newsgroups
150
152
 
151
153
  # write a new rearranged version of the signature file for
152
154
  # better hazard.
155
+ # EXPERIMENTAL
153
156
  def rearrange_sigs(sigfile, all_sigs)
154
157
  if File.writable?(sigfile)
155
158
  new_sigs = Array.new(all_sigs.length)
data/lib/override.rb CHANGED
@@ -35,7 +35,8 @@ class OverrideDlg
35
35
  # a new process (IO.popen() ). The first program from this array, which is
36
36
  # found in the Path, will be used. Whiptail and a pure ruby dialog
37
37
  # necessitate that xterm be found, too.
38
- @@Executables = [YAD, ZENITY, WHIPTAIL, XTERM]
38
+ # @@Executables = [YAD, ZENITY, WHIPTAIL, XTERM]
39
+ @@Executables = [WHIPTAIL, XTERM]
39
40
  @@LIBDIR = File::dirname(__FILE__)
40
41
  # The configuration variables that can be unset.
41
42
  # This class instance variable is exposed via a getter.
@@ -68,11 +69,14 @@ class OverrideDlg
68
69
  debug('found executables ' << @executables.join(', '))
69
70
  opts = nil
70
71
  begin
72
+ =begin unresolved issues with YAD and Zenity
71
73
  if has?(YAD)
72
74
  return yad_dlg.split.collect {|o| o.to_s}.join(' ')
73
75
  elsif has?(ZENITY)
74
76
  return zenity_dlg.split.collect {|o| o.to_s}.join(' ')
75
77
  elsif has? XTERM
78
+ =end
79
+ if has? XTERM
76
80
  if has?(WHIPTAIL)
77
81
  return whiptail_dlg.split.collect {|o| o.to_s}.join(' ')
78
82
  else
data/lib/version.rb CHANGED
@@ -14,9 +14,9 @@
14
14
  =end
15
15
 
16
16
  PROGNAME = 'flnews_post_proc'
17
- PROGVERSION = "1.71"
17
+ PROGVERSION = "1.72"
18
18
  AUTHORS = "Michael Uplawski"
19
19
  EMAIL = "michael.uplawski@uplawski.eu"
20
20
  YEARS = "2023 - 2025"
21
- SUMMARY = "Improve randomness of signatures, if need be."
21
+ SUMMARY = "Override settings does not use Yad nor Zenity, only Whiptail or XTerm"
22
22
 
data/lib/yad_dlg CHANGED
@@ -28,12 +28,14 @@ CONF=$(yad --item-separator=" " --title "$TITLE" --image="" --window-icon="" --f
28
28
  --field="Custom-headers":CHK 'true' \
29
29
  --field="No Archive":CHK 'true' \
30
30
  --field="URL Correction":CHK 'true' \
31
- --field="Log":CHK 'true')
31
+ --field="Log":CHK 'true' )
32
+
32
33
 
33
34
  if [ $? == 0 ]
34
35
  then
35
36
  IFS="|"
36
37
  read -ra C_ARR <<< $CONF
38
+ echo "$C_ARR"
37
39
  CONF=''
38
40
  # ------------->
39
41
  # echo ${C_ARR[@]}
@@ -41,6 +43,8 @@ then
41
43
 
42
44
  for i in GROUP_SIGS CUSTOM_HEADERS NO_ARCHIVE_GROUPS VFY_URLS DEBUG_LOG
43
45
  do
46
+ echo -e "$i: ${C_ARR[$i]}"
47
+ echo -e "\n"
44
48
  if [ 'FALSE' == "${C_ARR[$i]}" ]
45
49
  then
46
50
  CONF="$i $CONF"
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.71'
4
+ version: '1.72'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Uplawski
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-09 00:00:00.000000000 Z
10
+ date: 2025-05-17 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: diffy
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  requirements: []
103
- rubygems_version: 3.6.3
103
+ rubygems_version: 3.6.7
104
104
  specification_version: 4
105
- summary: Improve randomness of signatures, if need be.
105
+ summary: Override settings does not use Yad nor Zenity, only Whiptail or XTerm
106
106
  test_files: []