cremefraiche 1.1.9 → 1.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -3
- data/cremefraiche.gemspec +4 -2
- data/lib/basic_logging.rb +3 -3
- data/lib/cfprawn.rb +2 -4
- data/lib/emlfile.rb +1 -1
- data/lib/gui/AboutDialog.rb +8 -6
- data/lib/gui/ConfDialog.rb +5 -1
- data/lib/gui/HowtoDialog.rb +8 -12
- data/lib/gui/gtk-about.xpm +13 -0
- data/lib/gui/gtk-close.xpm +13 -0
- data/lib/gui/gtk-execute.xpm +13 -0
- data/lib/gui/gtk-open.xpm +13 -0
- data/lib/gui/gtk-properties.xpm +13 -0
- data/lib/gui/gtk-quit.xpm +13 -0
- data/lib/gui/gtk-remove.xpm +14 -0
- data/lib/gui/gtk-save.xpm +14 -0
- data/lib/gui/gtk-stop.xpm +13 -0
- data/lib/gui/help.xpm +13 -0
- data/lib/gui/icon.xpm +13 -0
- data/lib/gui/message_dialog.rb +4 -11
- data/lib/{html2text.rb → html2crtext.rb} +3 -3
- data/lib/version.rb +3 -3
- metadata +27 -12
- data/lib/.translations.swp +0 -0
- data/lib/gui/.ButtonLabel.rb.swp +0 -0
- data/lib/gui/.conf_value.rb.swp +0 -0
- data/lib/gui/.cremefraicheGui.rb.swp +0 -0
- data/lib/gui/.message_dialog.rb.swp +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42faa6dffda9a73b0eae45993fe03bfc3f232f5f3c742a76b5115e59826c91d7
|
4
|
+
data.tar.gz: 166f2caa8ab28b1dbd4d9f5d79844c8da64fedf18e68aec08f66f352ce0f85ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12e1105911e0316f8ce6451df6845fae61843dba1bfa4ed7edd35771a0d4f29d74248c1e85a877b45c09794b6847a07e48f2cfa22bbea58ec8a48e429c8071cc
|
7
|
+
data.tar.gz: efcfe3ffcce0753b33020f9a243fadc47d43a92eb9ac4a8b5e77e38d6e38db02607f02e0e680e64a7eded28b5931c4639f055482a09527f7d2f9645cebb9ce99
|
data/README.md
CHANGED
@@ -33,6 +33,8 @@ possible variations in the way that Mail is created these days, is an ongoing
|
|
33
33
|
endeavor. If you need authentic output of a HTML mail, **use a different
|
34
34
|
software**, a Web Browser or a converter specifically developed for the task.
|
35
35
|
|
36
|
+
Cremefraiche uses the ruby-gem “Html2Text” to convert HTML to plain text.
|
37
|
+
|
36
38
|
CONFIGURATION
|
37
39
|
===============
|
38
40
|
Cremefraiche is highly configurable.
|
@@ -68,9 +70,9 @@ Other Information
|
|
68
70
|
|
69
71
|
pipe-in a mail from STDIN
|
70
72
|
--------------------------
|
71
|
-
You can pipe in mails to cremefraiche. This is useful
|
72
|
-
|
73
|
-
|
73
|
+
You can pipe in mails to cremefraiche. This is useful in conjunction with
|
74
|
+
mail-clients that allow such operation, notably the *Mutt* mail client. For
|
75
|
+
Mutt, it is sufficient to define two macros in the file .muttrc :
|
74
76
|
|
75
77
|
<code>macro index X "|cremefraiche -\n" "make PDF"</code>
|
76
78
|
|
data/cremefraiche.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.description = "transforms EML files to PDF"
|
10
10
|
s.authors = Author
|
11
11
|
s.email = Author_mail
|
12
|
-
s.files = Dir.children('doc').collect{|f| 'doc/' << File::path(f)} + Dir.children('bin').collect{|f| 'bin/' << File::path(f)} + Dir.children('lib').collect{|f| 'lib/' << File::path(f) } + Dir.children('lib/gui/').collect{|f| 'lib/gui/' << File::path(f) } + Dir.children('lib/icon').collect{|f| 'lib/icon/' << File::path(f) } + Dir.children('lib/busy_indicator').collect{|f| 'lib/busy_indicator/' << File::path(f) } +
|
12
|
+
s.files = Dir.children('doc').collect{|f| 'doc/' << File::path(f)} + Dir.children('bin').collect{|f| 'bin/' << File::path(f)} + Dir.children('lib').collect{|f| 'lib/' << File::path(f) } + Dir.children('lib/gui/').collect{|f| 'lib/gui/' << File::path(f) } + Dir.children('lib/icon').collect{|f| 'lib/icon/' << File::path(f) } + Dir.children('lib/busy_indicator').collect{|f| 'lib/busy_indicator/' << File::path(f) } + ["cremefraiche.gemspec", "README.md"]
|
13
13
|
s.homepage = ''
|
14
14
|
s.requirements = 'prawn prawn-table escape nokogiri mail gtk3'
|
15
15
|
s.add_runtime_dependency 'prawn', '~> 2.4', '>= 2.4.0'
|
@@ -18,7 +18,9 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.add_runtime_dependency 'nokogiri', '~> 1.13', '>= 1.13.10'
|
19
19
|
s.add_runtime_dependency 'mail', '~> 2.8', '>= 2.8.0'
|
20
20
|
s.add_runtime_dependency 'gtk3', '~> 4.0', '>= 4.0.5'
|
21
|
+
s.add_runtime_dependency 'html2text', '~> 0.4', '>= 0.4.0'
|
21
22
|
s.executables = 'cremefraiche', 'cremefraicheGui'
|
22
|
-
s.license = '
|
23
|
+
s.license = 'Nonstandard'
|
24
|
+
s.homepage = Web_page
|
23
25
|
s.required_ruby_version = '>= 2.5'
|
24
26
|
end
|
data/lib/basic_logging.rb
CHANGED
@@ -40,7 +40,7 @@ module BasicLogging
|
|
40
40
|
@@target = STDOUT
|
41
41
|
@@muted = []
|
42
42
|
|
43
|
-
# do not log, if caller is
|
43
|
+
# do not log, if caller is obj (class or instance)
|
44
44
|
def self.mute(obj)
|
45
45
|
name = obj.class == Class ? obj.name.dup : obj.class.name
|
46
46
|
@@muted << name
|
@@ -51,7 +51,7 @@ module BasicLogging
|
|
51
51
|
@@muted.include?(name)
|
52
52
|
end
|
53
53
|
|
54
|
-
# set the log level
|
54
|
+
# set the log level
|
55
55
|
def set_level(lv)
|
56
56
|
if lv.respond_to?(:to_str)
|
57
57
|
lv = Levels[lv.to_sym]
|
@@ -64,7 +64,7 @@ module BasicLogging
|
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
|
-
# set the log target
|
67
|
+
# set the log target
|
68
68
|
def set_target(tg)
|
69
69
|
if tg.respond_to?(:to_io)
|
70
70
|
@@target = tg
|
data/lib/cfprawn.rb
CHANGED
@@ -19,7 +19,7 @@ require 'escape'
|
|
19
19
|
require_relative 'basic_logging'
|
20
20
|
require_relative 'configuration'
|
21
21
|
require_relative 'translating'
|
22
|
-
|
22
|
+
require 'html2text'
|
23
23
|
|
24
24
|
# NS_POS=1
|
25
25
|
# TAG_POS=2
|
@@ -331,9 +331,7 @@ class CFPrawn
|
|
331
331
|
|
332
332
|
# handles html-text
|
333
333
|
def html(html)
|
334
|
-
|
335
|
-
phtml = parser.text()
|
336
|
-
return phtml
|
334
|
+
return Html2Text::convert(html)
|
337
335
|
end
|
338
336
|
# extracts those headers that should appear in the final PDF-document
|
339
337
|
# and includes them for rendering in the PDF.
|
data/lib/emlfile.rb
CHANGED
data/lib/gui/AboutDialog.rb
CHANGED
@@ -19,6 +19,8 @@ require_relative '../translating'
|
|
19
19
|
require_relative '../file_checking'
|
20
20
|
require_relative '../license.rb'
|
21
21
|
require_relative '../basic_logging.rb'
|
22
|
+
require_relative '../version.rb'
|
23
|
+
|
22
24
|
|
23
25
|
GD = File::expand_path(File::dirname(__FILE__) ) + File::Separator if !defined?(GD)
|
24
26
|
|
@@ -38,12 +40,12 @@ class AboutDialog
|
|
38
40
|
def initialize( options = {})
|
39
41
|
|
40
42
|
@adialog = Gtk::AboutDialog.new
|
41
|
-
@adialog.name =
|
42
|
-
@adialog.title =
|
43
|
-
@adialog.set_program_name
|
44
|
-
@adialog.version =
|
45
|
-
@adialog.copyright = "© #{
|
46
|
-
@adialog.website = "#{
|
43
|
+
@adialog.name = App_name
|
44
|
+
@adialog.title = App_name
|
45
|
+
@adialog.set_program_name App_name
|
46
|
+
@adialog.version = VERSION
|
47
|
+
@adialog.copyright = "© #{YEARS} #{Author} #{Author_mail}"
|
48
|
+
@adialog.website = "#{Web_page}"
|
47
49
|
|
48
50
|
@adialog.comments = @@info
|
49
51
|
@adialog.license = LICENSE_TEXT
|
data/lib/gui/ConfDialog.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#encoding: UTF-8
|
2
2
|
=begin
|
3
3
|
/***************************************************************************
|
4
|
-
* ©2011-
|
4
|
+
* ©2011-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
5
5
|
* *
|
6
6
|
* This program is free software; you can redistribute it and/or modify *
|
7
7
|
* it under the terms of the WTFPL 2.0 or later version of the LICENSE. *
|
@@ -28,6 +28,9 @@ require_relative 'message_dialog'
|
|
28
28
|
An object of this class opens a configuration-dialog
|
29
29
|
that displays and allows to modify all the options which are defined in
|
30
30
|
the currently used configuration-file.
|
31
|
+
|
32
|
+
TODO : Remember how this used to work and simplify.
|
33
|
+
SORRY: I programmed it.
|
31
34
|
=end
|
32
35
|
class ConfDialog
|
33
36
|
include Translating
|
@@ -213,6 +216,7 @@ class ConfDialog
|
|
213
216
|
# This looks dumb because it is! Eat it. Why a Hash? What Hash?
|
214
217
|
vtext
|
215
218
|
end
|
219
|
+
|
216
220
|
=begin
|
217
221
|
creates a checkbox for a boolean configuration-option.
|
218
222
|
=end
|
data/lib/gui/HowtoDialog.rb
CHANGED
@@ -1,24 +1,20 @@
|
|
1
1
|
#encoding: UTF-8
|
2
|
+
|
2
3
|
=begin
|
3
4
|
/***************************************************************************
|
4
|
-
* ©
|
5
|
+
* ©2011-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
5
6
|
* *
|
6
7
|
* This program is free software; you can redistribute it and/or modify *
|
7
|
-
* it under the terms of the
|
8
|
-
*
|
9
|
-
* (at your option) any later version. *
|
8
|
+
* it under the terms of the WTFPL 2.0 or later version of the LICENSE. *
|
9
|
+
* See https://wtfpl2.com/ for details. *
|
10
10
|
* *
|
11
11
|
* This program is distributed in the hope that it will be useful, *
|
12
12
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
14
|
-
* GNU General Public License for more details. *
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
15
14
|
* *
|
16
|
-
* You should have received a copy of the GNU General Public License *
|
17
|
-
* along with this program; if not, write to the *
|
18
|
-
* Free Software Foundation, Inc., *
|
19
|
-
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
20
15
|
***************************************************************************/
|
21
16
|
=end
|
17
|
+
|
22
18
|
require 'gtk3'
|
23
19
|
require_relative '../cremefraiche'
|
24
20
|
require_relative 'ButtonLabel'
|
@@ -32,7 +28,7 @@ class HowtoDialog
|
|
32
28
|
include BasicLogging
|
33
29
|
@@GD = File::expand_path(File::dirname(__FILE__) ) + File::Separator if !defined?(@@GD)
|
34
30
|
@@HOWTO = $PROG_DIR.dup << '../doc/gui_howto.pdf'
|
35
|
-
|
31
|
+
PDFViewers = %w"firefox opera epiphany-browser"
|
36
32
|
|
37
33
|
def initialize(options = {})
|
38
34
|
@hdialog = Gtk::Dialog.new()
|
@@ -95,7 +91,7 @@ class HowtoDialog
|
|
95
91
|
end
|
96
92
|
|
97
93
|
def find_reader
|
98
|
-
|
94
|
+
PDFViewers.detect(''){|c| $Progs.include?(c)}
|
99
95
|
end
|
100
96
|
|
101
97
|
def choose_reader
|
data/lib/gui/gtk-about.xpm
CHANGED
@@ -1,4 +1,17 @@
|
|
1
1
|
/* XPM */
|
2
|
+
/***************************************************************************
|
3
|
+
* ©2011-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
4
|
+
* *
|
5
|
+
* This program is free software; you can redistribute it and/or modify *
|
6
|
+
* it under the terms of the WTFPL 2.0 or later version of the LICENSE. *
|
7
|
+
* See https://wtfpl2.com/ for details. *
|
8
|
+
* *
|
9
|
+
* This program is distributed in the hope that it will be useful, *
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
12
|
+
* *
|
13
|
+
***************************************************************************/
|
14
|
+
|
2
15
|
static char * gtk_about_xpm[] = {
|
3
16
|
"22 22 65 1",
|
4
17
|
" c None",
|
data/lib/gui/gtk-close.xpm
CHANGED
@@ -1,4 +1,17 @@
|
|
1
1
|
/* XPM */
|
2
|
+
/***************************************************************************
|
3
|
+
* ©2011-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
4
|
+
* *
|
5
|
+
* This program is free software; you can redistribute it and/or modify *
|
6
|
+
* it under the terms of the WTFPL 2.0 or later version of the LICENSE. *
|
7
|
+
* See https://wtfpl2.com/ for details. *
|
8
|
+
* *
|
9
|
+
* This program is distributed in the hope that it will be useful, *
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
12
|
+
* *
|
13
|
+
***************************************************************************/
|
14
|
+
|
2
15
|
static char * gtk_close_xpm[] = {
|
3
16
|
"22 22 65 1",
|
4
17
|
" c None",
|
data/lib/gui/gtk-execute.xpm
CHANGED
@@ -1,4 +1,17 @@
|
|
1
1
|
/* XPM */
|
2
|
+
/***************************************************************************
|
3
|
+
* ©2011-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
4
|
+
* *
|
5
|
+
* This program is free software; you can redistribute it and/or modify *
|
6
|
+
* it under the terms of the WTFPL 2.0 or later version of the LICENSE. *
|
7
|
+
* See https://wtfpl2.com/ for details. *
|
8
|
+
* *
|
9
|
+
* This program is distributed in the hope that it will be useful, *
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
12
|
+
* *
|
13
|
+
***************************************************************************/
|
14
|
+
|
2
15
|
static char * gtk_execute_xpm[] = {
|
3
16
|
"22 22 93 2",
|
4
17
|
" c None",
|
data/lib/gui/gtk-open.xpm
CHANGED
@@ -1,4 +1,17 @@
|
|
1
1
|
/* XPM */
|
2
|
+
/***************************************************************************
|
3
|
+
* ©2011-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
4
|
+
* *
|
5
|
+
* This program is free software; you can redistribute it and/or modify *
|
6
|
+
* it under the terms of the WTFPL 2.0 or later version of the LICENSE. *
|
7
|
+
* See https://wtfpl2.com/ for details. *
|
8
|
+
* *
|
9
|
+
* This program is distributed in the hope that it will be useful, *
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
12
|
+
* *
|
13
|
+
***************************************************************************/
|
14
|
+
|
2
15
|
static char *dummy[]={
|
3
16
|
"22 22 122 2",
|
4
17
|
"Qt c None",
|
data/lib/gui/gtk-properties.xpm
CHANGED
@@ -1,4 +1,17 @@
|
|
1
1
|
/* XPM */
|
2
|
+
/***************************************************************************
|
3
|
+
* ©2011-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
4
|
+
* *
|
5
|
+
* This program is free software; you can redistribute it and/or modify *
|
6
|
+
* it under the terms of the WTFPL 2.0 or later version of the LICENSE. *
|
7
|
+
* See https://wtfpl2.com/ for details. *
|
8
|
+
* *
|
9
|
+
* This program is distributed in the hope that it will be useful, *
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
12
|
+
* *
|
13
|
+
***************************************************************************/
|
14
|
+
|
2
15
|
static char *dummy[]={
|
3
16
|
"24 24 351 2",
|
4
17
|
"Qt c None",
|
data/lib/gui/gtk-quit.xpm
CHANGED
@@ -1,4 +1,17 @@
|
|
1
1
|
/* XPM */
|
2
|
+
/***************************************************************************
|
3
|
+
* ©2011-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
4
|
+
* *
|
5
|
+
* This program is free software; you can redistribute it and/or modify *
|
6
|
+
* it under the terms of the WTFPL 2.0 or later version of the LICENSE. *
|
7
|
+
* See https://wtfpl2.com/ for details. *
|
8
|
+
* *
|
9
|
+
* This program is distributed in the hope that it will be useful, *
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
12
|
+
* *
|
13
|
+
***************************************************************************/
|
14
|
+
|
2
15
|
static char *dummy[]={
|
3
16
|
"24 24 325 2",
|
4
17
|
".r c None",
|
data/lib/gui/gtk-remove.xpm
CHANGED
@@ -1,4 +1,18 @@
|
|
1
1
|
/* XPM */
|
2
|
+
|
3
|
+
/***************************************************************************
|
4
|
+
* ©2011-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
5
|
+
* *
|
6
|
+
* This program is free software; you can redistribute it and/or modify *
|
7
|
+
* it under the terms of the WTFPL 2.0 or later version of the LICENSE. *
|
8
|
+
* See https://wtfpl2.com/ for details. *
|
9
|
+
* *
|
10
|
+
* This program is distributed in the hope that it will be useful, *
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
13
|
+
* *
|
14
|
+
***************************************************************************/
|
15
|
+
|
2
16
|
static char *dummy[]={
|
3
17
|
"22 22 98 2",
|
4
18
|
"Qt c None",
|
data/lib/gui/gtk-save.xpm
CHANGED
@@ -1,4 +1,18 @@
|
|
1
1
|
/* XPM */
|
2
|
+
|
3
|
+
/***************************************************************************
|
4
|
+
* ©2011-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
5
|
+
* *
|
6
|
+
* This program is free software; you can redistribute it and/or modify *
|
7
|
+
* it under the terms of the WTFPL 2.0 or later version of the LICENSE. *
|
8
|
+
* See https://wtfpl2.com/ for details. *
|
9
|
+
* *
|
10
|
+
* This program is distributed in the hope that it will be useful, *
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
13
|
+
* *
|
14
|
+
***************************************************************************/
|
15
|
+
|
2
16
|
static char *dummy[]={
|
3
17
|
"24 24 187 2",
|
4
18
|
"Qt c None",
|
data/lib/gui/gtk-stop.xpm
CHANGED
@@ -1,4 +1,17 @@
|
|
1
1
|
/* XPM */
|
2
|
+
/***************************************************************************
|
3
|
+
* ©2011-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
4
|
+
* *
|
5
|
+
* This program is free software; you can redistribute it and/or modify *
|
6
|
+
* it under the terms of the WTFPL 2.0 or later version of the LICENSE. *
|
7
|
+
* See https://wtfpl2.com/ for details. *
|
8
|
+
* *
|
9
|
+
* This program is distributed in the hope that it will be useful, *
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
12
|
+
* *
|
13
|
+
***************************************************************************/
|
14
|
+
|
2
15
|
static char *dummy[]={
|
3
16
|
"24 24 317 2",
|
4
17
|
"Qt c None",
|
data/lib/gui/help.xpm
CHANGED
@@ -1,4 +1,17 @@
|
|
1
1
|
/* XPM */
|
2
|
+
/***************************************************************************
|
3
|
+
* ©2011-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
4
|
+
* *
|
5
|
+
* This program is free software; you can redistribute it and/or modify *
|
6
|
+
* it under the terms of the WTFPL 2.0 or later version of the LICENSE. *
|
7
|
+
* See https://wtfpl2.com/ for details. *
|
8
|
+
* *
|
9
|
+
* This program is distributed in the hope that it will be useful, *
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
12
|
+
* *
|
13
|
+
***************************************************************************/
|
14
|
+
|
2
15
|
static char *dummy[]={
|
3
16
|
"24 24 436 2",
|
4
17
|
"Qt c None",
|
data/lib/gui/icon.xpm
CHANGED
@@ -1,4 +1,17 @@
|
|
1
1
|
/* XPM */
|
2
|
+
/***************************************************************************
|
3
|
+
* ©2011-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
4
|
+
* *
|
5
|
+
* This program is free software; you can redistribute it and/or modify *
|
6
|
+
* it under the terms of the WTFPL 2.0 or later version of the LICENSE. *
|
7
|
+
* See https://wtfpl2.com/ for details. *
|
8
|
+
* *
|
9
|
+
* This program is distributed in the hope that it will be useful, *
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
12
|
+
* *
|
13
|
+
***************************************************************************/
|
14
|
+
|
2
15
|
static char * icon_xpm[] = {
|
3
16
|
"48 48 249 2",
|
4
17
|
" c None",
|
data/lib/gui/message_dialog.rb
CHANGED
@@ -1,25 +1,18 @@
|
|
1
1
|
#encoding: UTF-8
|
2
2
|
=begin
|
3
3
|
/***************************************************************************
|
4
|
-
* ©
|
4
|
+
* ©2011-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
5
5
|
* *
|
6
6
|
* This program is free software; you can redistribute it and/or modify *
|
7
|
-
* it under the terms of the
|
8
|
-
*
|
9
|
-
* (at your option) any later version. *
|
7
|
+
* it under the terms of the WTFPL 2.0 or later version of the LICENSE. *
|
8
|
+
* See https://wtfpl2.com/ for details. *
|
10
9
|
* *
|
11
10
|
* This program is distributed in the hope that it will be useful, *
|
12
11
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
14
|
-
* GNU General Public License for more details. *
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
15
13
|
* *
|
16
|
-
* You should have received a copy of the GNU General Public License *
|
17
|
-
* along with this program; if not, write to the *
|
18
|
-
* Free Software Foundation, Inc., *
|
19
|
-
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
20
14
|
***************************************************************************/
|
21
15
|
=end
|
22
|
-
|
23
16
|
require 'gtk3'
|
24
17
|
|
25
18
|
def msg_dialog(msg, type = :info)
|
@@ -36,14 +36,15 @@ class Html2Text
|
|
36
36
|
html.gsub!("<br/>", "\n")
|
37
37
|
html.gsub!("<br />", "\n")
|
38
38
|
# Try to remove html-comments
|
39
|
-
|
39
|
+
# ? for lazyness. matches first -->
|
40
|
+
# otherwise matches too much
|
41
|
+
html.gsub! /\<!--.*?-->/m, ''
|
40
42
|
html.gsub! /\s+/, ' '
|
41
43
|
@html = Nokogiri::HTML::fragment(html)
|
42
44
|
define_tag_handlers if @html
|
43
45
|
@out_text = ''
|
44
46
|
end
|
45
47
|
|
46
|
-
# def text(tag = @html)
|
47
48
|
def text()
|
48
49
|
@out_text = handle(@html)
|
49
50
|
# remove empty lines
|
@@ -145,7 +146,6 @@ class Html2Text
|
|
145
146
|
handle(value)
|
146
147
|
end
|
147
148
|
|
148
|
-
|
149
149
|
@@tag_handlers['title'] = Proc.new() do |value|
|
150
150
|
"<b>" << handle(value ) << "</b>\n"
|
151
151
|
end
|
data/lib/version.rb
CHANGED
@@ -15,9 +15,9 @@
|
|
15
15
|
***************************************************************************/
|
16
16
|
=end
|
17
17
|
|
18
|
-
YEARS="2011 -
|
19
|
-
VERSION="1.
|
20
|
-
SUMMARY="
|
18
|
+
YEARS="2011 - 2024"
|
19
|
+
VERSION="1.31"
|
20
|
+
SUMMARY="using ruby-gem Html2Text on HTML-mail."
|
21
21
|
|
22
22
|
App_name = 'Creme Fraiche'
|
23
23
|
Author = 'Michael Uplawski'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cremefraiche
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.31'
|
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-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prawn
|
@@ -130,6 +130,26 @@ dependencies:
|
|
130
130
|
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: 4.0.5
|
133
|
+
- !ruby/object:Gem::Dependency
|
134
|
+
name: html2text
|
135
|
+
requirement: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - "~>"
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0.4'
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: 0.4.0
|
143
|
+
type: :runtime
|
144
|
+
prerelease: false
|
145
|
+
version_requirements: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - "~>"
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0.4'
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.4.0
|
133
153
|
description: transforms EML files to PDF
|
134
154
|
email: "<michael.uplawski@uplawski.eu>"
|
135
155
|
executables:
|
@@ -143,7 +163,6 @@ files:
|
|
143
163
|
- bin/cremefraicheGui
|
144
164
|
- cremefraiche.gemspec
|
145
165
|
- doc/gui_howto.pdf
|
146
|
-
- lib/.translations.swp
|
147
166
|
- lib/LANG
|
148
167
|
- lib/basic_logging.rb
|
149
168
|
- lib/busy_indicator/.busy_function_test.rb.swp
|
@@ -160,10 +179,6 @@ files:
|
|
160
179
|
- lib/cremefraiche.rb
|
161
180
|
- lib/emlfile.rb
|
162
181
|
- lib/file_checking.rb
|
163
|
-
- lib/gui/.ButtonLabel.rb.swp
|
164
|
-
- lib/gui/.conf_value.rb.swp
|
165
|
-
- lib/gui/.cremefraicheGui.rb.swp
|
166
|
-
- lib/gui/.message_dialog.rb.swp
|
167
182
|
- lib/gui/AboutDialog.rb
|
168
183
|
- lib/gui/ButtonLabel.rb
|
169
184
|
- lib/gui/ConfDialog.rb
|
@@ -186,7 +201,7 @@ files:
|
|
186
201
|
- lib/gui/okay.xpm
|
187
202
|
- lib/gui/preferences-color.xpm
|
188
203
|
- lib/gui/view.xpm
|
189
|
-
- lib/
|
204
|
+
- lib/html2crtext.rb
|
190
205
|
- lib/icon/icon.xpm
|
191
206
|
- lib/icon/icon_big.xpm
|
192
207
|
- lib/license.rb
|
@@ -195,9 +210,9 @@ files:
|
|
195
210
|
- lib/translating.rb
|
196
211
|
- lib/translations
|
197
212
|
- lib/version.rb
|
198
|
-
homepage:
|
213
|
+
homepage: http://www.rubygems.org/gems/cremefraiche
|
199
214
|
licenses:
|
200
|
-
-
|
215
|
+
- Nonstandard
|
201
216
|
metadata: {}
|
202
217
|
post_install_message:
|
203
218
|
rdoc_options: []
|
@@ -215,8 +230,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
215
230
|
version: '0'
|
216
231
|
requirements:
|
217
232
|
- prawn prawn-table escape nokogiri mail gtk3
|
218
|
-
rubygems_version: 3.
|
233
|
+
rubygems_version: 3.5.3
|
219
234
|
signing_key:
|
220
235
|
specification_version: 4
|
221
|
-
summary:
|
236
|
+
summary: using ruby-gem Html2Text on HTML-mail.
|
222
237
|
test_files: []
|
data/lib/.translations.swp
DELETED
Binary file
|
data/lib/gui/.ButtonLabel.rb.swp
DELETED
Binary file
|
data/lib/gui/.conf_value.rb.swp
DELETED
Binary file
|
Binary file
|
Binary file
|