flnews_post_proc 1.43 → 1.45
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/flnews_post_proc +7 -2
- data/lib/_quoting_style_regexp +1 -0
- data/lib/body.rb +11 -1
- data/lib/version.rb +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c48262d6fc3031346ffa1e2b528e11a696cef83b6d7c64fa98cdef444cf60247
|
4
|
+
data.tar.gz: 12e53f1d88d613d14671ed06f03c0e65ca5f438088c85a66c22d3e37beec9b61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1845950986bcb9919a4ad353c4913a9fca9427f2387bb8a4cbe7b1968eaf26f35d837f331dd9d3f9a1ab5c49b8e9a49d7868f89902c7b9f427d2592e73dc607
|
7
|
+
data.tar.gz: f87ff6d5bd9462ebf3988b23482b64d6bb3d7ced99fbeecb06cc6c271392b65b7d8a510cd69e7e83c6792775ffbceb6e6dc1a6313b0bb2abd335752f508655ba
|
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
|
# Ω
|
@@ -0,0 +1 @@
|
|
1
|
+
" > >> > testerei ei ei".strip.gsub( /^>+(\s+>+)*/) {|m| m.to_s.delete(" ")}
|
data/lib/body.rb
CHANGED
@@ -231,7 +231,15 @@ class Body
|
|
231
231
|
def handle_http(l)
|
232
232
|
debug('handle http')
|
233
233
|
l_array = l.split
|
234
|
-
url_strs = l_array.collect
|
234
|
+
url_strs = l_array.collect do |ele|
|
235
|
+
if ele.strip.include?('http') && ele.match(/https?:\S+/)
|
236
|
+
ele.lstrip!
|
237
|
+
while !ele.match(/([[:alnum:]]|>)$/) do
|
238
|
+
ele.chop!
|
239
|
+
end
|
240
|
+
ele
|
241
|
+
end
|
242
|
+
end.compact
|
235
243
|
debug('url_strs: ' << url_strs.to_s)
|
236
244
|
url_strs.each do |str|
|
237
245
|
# keep str for final replacement
|
@@ -256,6 +264,7 @@ class Body
|
|
256
264
|
match = nstr.match(/\<?(https?:\/\/[^\>]*)\>?/)
|
257
265
|
# get the darned URL already!
|
258
266
|
url = match[1] if match
|
267
|
+
debug 'url is ' << url
|
259
268
|
# nstr = with_angular_brackets(nstr, url)
|
260
269
|
l.sub!(str, nstr)
|
261
270
|
rescue Exception => ex
|
@@ -268,6 +277,7 @@ class Body
|
|
268
277
|
exit false
|
269
278
|
end
|
270
279
|
end
|
280
|
+
|
271
281
|
return l
|
272
282
|
end
|
273
283
|
end
|
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.45"
|
18
18
|
AUTHORS = "Michael Uplawski"
|
19
19
|
EMAIL = "michael.uplawski@uplawski.eu"
|
20
20
|
YEARS = "2023 - 2024"
|
21
|
-
SUMMARY = "Bugfix:
|
21
|
+
SUMMARY = "Bugfix: URLs exclude punctuation and others at the end."
|
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.45'
|
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-11 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,5 @@ requirements: []
|
|
84
85
|
rubygems_version: 3.4.20
|
85
86
|
signing_key:
|
86
87
|
specification_version: 4
|
87
|
-
summary: 'Bugfix:
|
88
|
+
summary: 'Bugfix: URLs exclude punctuation and others at the end.'
|
88
89
|
test_files: []
|