maillinks 1.0 → 1.1

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/bin/maillinks +0 -1
  3. data/changes.txt +5 -0
  4. data/lib/maillinks.rb +9 -1
  5. metadata +104 -91
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89761f37cdcbd81624099ee4c33be1ca947d1d1b9e35e163d3f1fc9b7a5352e6
4
- data.tar.gz: 9bf6e5064d6d0f9a133412a742dd0e45956237d9a4e201dd0e9b4bdaaa817b45
3
+ metadata.gz: d083333310f5787e778bb24a2532f2c9f284b2a1576c1c2db1942f3224bb738f
4
+ data.tar.gz: 27619b93b517807ad3b23eecc737bd830db63f0e98f721a9796a0f3c159403d7
5
5
  SHA512:
6
- metadata.gz: 3dfc53ff1e68fd36baf64993c88fcb7d37e36f0471d773ba5667cee77e9bb2f29934e8c74ce33bf3db770af8a8e5d7884d65e9b9f867b5ca254b10084ff82fba
7
- data.tar.gz: a96b8bbf909b84fc864770db81b819c05a0222979b57fd68ef486fe411a1637553e02611d4df867db09ba50ea4e1e4824d48d1eab532ad46caeb5219c1e02f10
6
+ metadata.gz: 240b806c7dd973e3fd7babe3caab44e132848a51f08a98ff1a821267f8de0654424ccc179cc762fb87f7d6afebd21cdf4a8faa0cc3a93811e273d5b91392963d
7
+ data.tar.gz: c8a5c84f1344f47cfd184e1712c32af6a1d21dfeca128846a58ef6b8ed441e8a5c56183e09ead59d06f6c3fff8a4b23d6c9189821dfddc3295cbcafed3817284
data/bin/maillinks CHANGED
@@ -23,7 +23,6 @@ if ARGV.length > 1 && BasicLogging::Levels.keys.include?(ARGV[1].strip.downcase.
23
23
  else
24
24
  $LOG_LEVEL = :info
25
25
  end
26
-
27
26
  set_level($LOG_LEVEL)
28
27
  debug 'log level will be ' << $LOG_LEVEL.to_s
29
28
 
data/changes.txt CHANGED
@@ -1,3 +1,8 @@
1
+ v 1.1
2
+ -) Bugfix: programming error corrected: :symbol.splt to :symbol.to_s.split
3
+ The error only happens with invalid input files, the program will
4
+ abort anyway.
5
+
1
6
  v 1.0
2
7
  Browser is opened via Process::spawn().
3
8
 
data/lib/maillinks.rb CHANGED
@@ -29,7 +29,7 @@ class MailLinks
29
29
  if(mail && '-' != mail.strip)
30
30
  [:exist?, :file?, :readable?].each do |cond|
31
31
  if !File.send(cond, mail)
32
- error(yellow("#{mail}: not #{cond.split('?')[0]}. Aborting!") )
32
+ fatal(lightred("Awkward file: #{mail} – \"not #{cond.to_s.split('?')[0]}\". Aborting!") )
33
33
  usage
34
34
  exit false
35
35
  end
@@ -163,8 +163,16 @@ class MailLinks
163
163
  end
164
164
  links_hash = Hash.new
165
165
  a_nodes.each_with_index do |a, i|
166
+
166
167
  debug('a is ' << a.to_s.gsub("=\" ", ''))
167
168
  caption = a.inner_text.to_s.strip
169
+ has_image = a.at_css('img')
170
+ # If there's an image, include its source in the debug or caption
171
+ if has_image
172
+ src = has_image['src']
173
+ # Optional: modify caption to indicate it has an image
174
+ caption = "#{caption} (Image: #{src})"
175
+ end
168
176
  href = a.attribute('href')
169
177
  if(href)
170
178
  debug('href is: ' << href.to_s)
metadata CHANGED
@@ -1,116 +1,129 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maillinks
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: "1.1"
5
5
  platform: ruby
6
6
  authors:
7
- - Michael Uplawski
7
+ - Michael Uplawski
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-08-23 00:00:00.000000000 Z
10
+ date: 2026-09-11 00:00:00.000000000 Z
11
11
  dependencies:
12
- - !ruby/object:Gem::Dependency
13
- name: nokogiri
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - "~>"
17
- - !ruby/object:Gem::Version
18
- version: '1.19'
19
- - - ">="
20
- - !ruby/object:Gem::Version
21
- version: 1.19.0
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- requirements:
26
- - - "~>"
27
- - !ruby/object:Gem::Version
28
- version: '1.19'
29
- - - ">="
30
- - !ruby/object:Gem::Version
31
- version: 1.19.0
32
- - !ruby/object:Gem::Dependency
33
- name: escape
34
- requirement: !ruby/object:Gem::Requirement
35
- requirements:
36
- - - "~>"
37
- - !ruby/object:Gem::Version
38
- version: '0.0'
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- version: 0.0.4
42
- type: :runtime
43
- prerelease: false
44
- version_requirements: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - "~>"
47
- - !ruby/object:Gem::Version
48
- version: '0.0'
49
- - - ">="
50
- - !ruby/object:Gem::Version
51
- version: 0.0.4
52
- - !ruby/object:Gem::Dependency
53
- name: mail
54
- requirement: !ruby/object:Gem::Requirement
55
- requirements:
56
- - - "~>"
57
- - !ruby/object:Gem::Version
58
- version: '2.9'
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: 2.9.0
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '2.9'
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- version: 2.9.0
72
- description: Marks in an email HTMl-links and creates a list of all links at the bottom
73
- of the mail-text. Best used with the Mutt MUA
12
+ - !ruby/object:Gem::Dependency
13
+ name: nokogiri
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ -
17
+ - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: "1.19"
20
+ -
21
+ - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.19.0
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ requirements:
28
+ -
29
+ - ~>
30
+ - !ruby/object:Gem::Version
31
+ version: "1.19"
32
+ -
33
+ - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: 1.19.0
36
+ - !ruby/object:Gem::Dependency
37
+ name: escape
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ -
41
+ - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: "0.0"
44
+ -
45
+ - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 0.0.4
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ -
53
+ - ~>
54
+ - !ruby/object:Gem::Version
55
+ version: "0.0"
56
+ -
57
+ - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 0.0.4
60
+ - !ruby/object:Gem::Dependency
61
+ name: mail
62
+ requirement: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ -
65
+ - ~>
66
+ - !ruby/object:Gem::Version
67
+ version: "2.9"
68
+ -
69
+ - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: 2.9.0
72
+ type: :runtime
73
+ prerelease: false
74
+ version_requirements: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ -
77
+ - ~>
78
+ - !ruby/object:Gem::Version
79
+ version: "2.9"
80
+ -
81
+ - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 2.9.0
84
+ description: Marks in an email HTMl-links and creates a list of all links at the bottom of the mail-text. Best used with the Mutt MUA
74
85
  email: michael.uplawski@uplawski.eu
75
86
  executables:
76
- - maillinks
87
+ - maillinks
77
88
  extensions: []
78
89
  extra_rdoc_files: []
79
90
  files:
80
- - bin/maillinks
81
- - changes.txt
82
- - doc/html/maillinks.html
83
- - doc/man/maillinks.1.gz
84
- - doc/pdf/maillinks.pdf
85
- - doc/rst/maillinks.rst
86
- - lib/basic_logging.rb
87
- - lib/color_output.rb
88
- - lib/constants.rb
89
- - lib/maillinks.rb
90
- - maillinks.gemspec
91
- homepage: https://www.uplawski.eu/software
91
+ - bin/maillinks
92
+ - changes.txt
93
+ - doc/html/maillinks.html
94
+ - doc/man/maillinks.1.gz
95
+ - doc/pdf/maillinks.pdf
96
+ - doc/rst/maillinks.rst
97
+ - lib/basic_logging.rb
98
+ - lib/color_output.rb
99
+ - lib/constants.rb
100
+ - lib/maillinks.rb
101
+ - maillinks.gemspec
102
+ homepage: "https://www.uplawski.eu/software"
92
103
  licenses:
93
- - WTFPL
104
+ - WTFPL
94
105
  metadata:
95
- homepage_uri: https://www.uplawski.eu/software/
96
- documentation_uri: https://www.uplawski.eu/software/maillinks/maillinks.html
97
- changelog_uri: https://www.uplawski.eu/software/changelogs/changes_maillinks.txt
106
+ homepage_uri: "https://www.uplawski.eu/software/"
107
+ documentation_uri: "https://www.uplawski.eu/software/maillinks/maillinks.html"
108
+ changelog_uri: "https://www.uplawski.eu/software/changelogs/changes_maillinks.txt"
98
109
  rdoc_options: []
99
110
  require_paths:
100
- - lib
111
+ - lib
101
112
  required_ruby_version: !ruby/object:Gem::Requirement
102
113
  requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- version: '4.0'
114
+ -
115
+ - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: "4.0"
106
118
  required_rubygems_version: !ruby/object:Gem::Requirement
107
119
  requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
120
+ -
121
+ - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: "0"
111
124
  requirements:
112
- - Linux, one of the browsers Dillo, W3M, Lynx, Brave-browser or Firefox
113
- rubygems_version: 4.0.18
125
+ - "Linux, one of the browsers Dillo, W3M, Lynx, Brave-browser or Firefox"
126
+ rubygems_version: 4.1.0.beta1
114
127
  specification_version: 4
115
128
  summary: Documentation in HTML formatted. Alternative Browsers allowed.
116
129
  test_files: []