cremefraiche 1.1.8 → 1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/cremefraiche +31 -31
- data/cremefraiche.gemspec +3 -2
- data/lib/.basic_logging.rb.swp +0 -0
- data/lib/.cfprawn.rb.swp +0 -0
- data/lib/.confcheck.rb.swp +0 -0
- data/lib/.configuration.rb.swp +0 -0
- data/lib/.cremefraiche.rb.swp +0 -0
- data/lib/.emlfile.rb.swp +0 -0
- data/lib/.file_checking.rb.swp +0 -0
- data/lib/.html2text.rb.swp +0 -0
- data/lib/.license.rb.swp +0 -0
- data/lib/.tag_munging.rb.swp +0 -0
- data/lib/.version.rb.swp +0 -0
- data/lib/config +1 -1
- data/lib/configuration.rb +4 -4
- data/lib/emlfile.rb +1 -1
- data/lib/gui/AboutDialog.rb +8 -6
- data/lib/html2text.rb +3 -3
- data/lib/translations +3 -0
- data/lib/version.rb +2 -2
- metadata +16 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f77d80c3b68961a05dfe0b13fa1573b6412a6fafe7668252849d421939900dc8
|
4
|
+
data.tar.gz: 1cde51638355051748a080f4efee166131c78d0a6c843003045595c9ded61331
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d35e374c6350f5b0adf4ed09c18ffcd3345389af0ed80fc93279d8e9a0a69fea477b07bc63a6fea4c202cf9ad93cde4702509572f035c144ebd67e00c0a3debd
|
7
|
+
data.tar.gz: 07a8ffd0601e565c9cef6869862a70537bc2cb35b3a5e831be0d9b8ac805f1fa55cbae1f4dd37da7f85cdb1ff63152568ae0591f0ec97f16f4bb8b515cdcc573
|
data/bin/cremefraiche
CHANGED
@@ -26,6 +26,37 @@ require_relative '../lib/version'
|
|
26
26
|
extend(BasicLogging)
|
27
27
|
extend(Translating)
|
28
28
|
|
29
|
+
# Should a user wish to either update her/his private version of the configuration-file by the current
|
30
|
+
# contents of the file originally found in the downloaded program package, this function does the job.
|
31
|
+
# It creates a copy of the original file, also, if there is not yet one, in ~/.cremefraiche/config or
|
32
|
+
# whatever the Configuration-singleton returns as file-name for user_configuration.
|
33
|
+
def handle_user_conf
|
34
|
+
conf_check = ConfCheck.new()
|
35
|
+
diffs = conf_check.diffs
|
36
|
+
replace = false
|
37
|
+
if( diffs)
|
38
|
+
if(diffs && diffs[:missing].empty? && diffs[:additional].empty?)
|
39
|
+
puts trl("No changes to your user-configuration are necessary.")
|
40
|
+
return false;
|
41
|
+
else
|
42
|
+
m = diffs[:missing]
|
43
|
+
a = diffs[:additional]
|
44
|
+
puts trl("\nThe following changes can be effectuated on your user-configuration")
|
45
|
+
puts "\t+ " << trl("New options") << ":\n\t\t" << m.join('\n\t\t ') if !m.empty?
|
46
|
+
puts "\t- " << trl("Obsolete Options") << ":\n\t\t" << a.join(', ') if !a.empty?
|
47
|
+
puts trl("Do you want to replace your current user-configuration?")
|
48
|
+
puts trl("If you answer 'yes' a back-up copy of your old file will still be available.")
|
49
|
+
puts trl("But your old settings will be replaced by the defaults.")
|
50
|
+
print trl("Your answer (Y/n): ")
|
51
|
+
replace = STDIN.getc.downcase == trl("y") ? true : false
|
52
|
+
end
|
53
|
+
if(! replace)
|
54
|
+
return false;
|
55
|
+
end
|
56
|
+
end
|
57
|
+
conf_check.write_user_conf
|
58
|
+
return replace;
|
59
|
+
end
|
29
60
|
# prints the usage message
|
30
61
|
def usage
|
31
62
|
if $WIN
|
@@ -84,34 +115,3 @@ end
|
|
84
115
|
cf = CremeFraiche.instance()
|
85
116
|
cf.process(*ARGV)
|
86
117
|
|
87
|
-
# Should a user wish to either update her/his private version of the configuration-file by the current
|
88
|
-
# contents of the file originally found in the downloaded program package, this function does the job.
|
89
|
-
# It creates a copy of the original file, also, if there is not yet one, in ~/.cremefraiche/config or
|
90
|
-
# whatever the Configuration-singleton returns as file-name for user_configuration.
|
91
|
-
def handle_user_conf
|
92
|
-
conf_check = ConfCheck.new()
|
93
|
-
diffs = conf_check.diffs
|
94
|
-
replace = false
|
95
|
-
if( diffs)
|
96
|
-
if(diffs && diffs[:missing].empty? && diffs[:additional].empty?)
|
97
|
-
puts trl("No changes to your user-configuration are necessary.")
|
98
|
-
return false;
|
99
|
-
else
|
100
|
-
m = diffs[:missing]
|
101
|
-
a = diffs[:additional]
|
102
|
-
puts trl("\nThe following changes can be effectuated on your user-configuration")
|
103
|
-
puts "\t+ " << trl("New options") << ":\n\t\t" << m.join('\n\t\t ') if !m.empty?
|
104
|
-
puts "\t- " << trl("Obsolete Options") << ":\n\t\t" << a.join(', ') if !a.empty?
|
105
|
-
puts trl("Do you want to replace your current user-configuration?")
|
106
|
-
puts trl("If you answer 'yes' a back-up copy of your old file will still be available.")
|
107
|
-
puts trl("But your old settings will be replaced by the defaults.")
|
108
|
-
print trl("Your answer (Y/n): ")
|
109
|
-
replace = STDIN.getc.downcase == trl("y") ? true : false
|
110
|
-
end
|
111
|
-
if(! replace)
|
112
|
-
return false;
|
113
|
-
end
|
114
|
-
end
|
115
|
-
conf_check.write_user_conf
|
116
|
-
return replace;
|
117
|
-
end
|
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'
|
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
|
|
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
21
|
s.executables = 'cremefraiche', 'cremefraicheGui'
|
22
|
-
s.license = '
|
22
|
+
s.license = 'Nonstandard'
|
23
|
+
s.homepage = Web_page
|
23
24
|
s.required_ruby_version = '>= 2.5'
|
24
25
|
end
|
Binary file
|
data/lib/.cfprawn.rb.swp
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/.emlfile.rb.swp
ADDED
Binary file
|
Binary file
|
Binary file
|
data/lib/.license.rb.swp
ADDED
Binary file
|
Binary file
|
data/lib/.version.rb.swp
ADDED
Binary file
|
data/lib/config
CHANGED
data/lib/configuration.rb
CHANGED
@@ -34,8 +34,10 @@ class Configuration
|
|
34
34
|
# file.
|
35
35
|
def initialize
|
36
36
|
read_config
|
37
|
-
|
38
|
-
|
37
|
+
v = @conf["log level"]
|
38
|
+
set_level( v ? BasicLogging::Levels[v.to_sym] : nil)
|
39
|
+
v = @conf["log file"]
|
40
|
+
set_target(v ? v : STDOUT)
|
39
41
|
|
40
42
|
check_programs_installed
|
41
43
|
end
|
@@ -227,8 +229,6 @@ class Configuration
|
|
227
229
|
end
|
228
230
|
return false
|
229
231
|
end
|
230
|
-
|
231
|
-
|
232
232
|
end
|
233
233
|
|
234
234
|
$CONF = Configuration.instance
|
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/html2text.rb
CHANGED
@@ -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
|
+
#debug('removing comments')
|
40
|
+
html.gsub! /\<!--(.|\s)*?-->/m, ''
|
41
|
+
#debug(' comments removed')
|
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/translations
CHANGED
@@ -222,6 +222,9 @@ Use literally 'user-conf' as argument.:
|
|
222
222
|
This either creates or overwrites a configuration file in a sub-directory '.cremefraiche' of the current user's home-directory:
|
223
223
|
de: Damit wird eine Konfigurationsdatei im Unterverzeichnis '.cremefraiche' des Benutzerverzeichnisses aktualisiert oder überschrieben
|
224
224
|
fr: Ainsi, un fichier de configuration dans le sous-répertoire '.cremefraiche' dans le répertoire de l'utilisateur est actualisé ou remplacé.
|
225
|
+
No changes to your user-configuration are necessary.:
|
226
|
+
de: Keine Änderungen in Ihrer Konfiguration erforderlich.
|
227
|
+
fr: Aucun changent nécessaire dans votre configuration.
|
225
228
|
##### Configuration-options ####
|
226
229
|
pdf prefix:
|
227
230
|
de: PDF Prefix
|
data/lib/version.rb
CHANGED
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.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Uplawski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prawn
|
@@ -143,6 +143,17 @@ files:
|
|
143
143
|
- bin/cremefraicheGui
|
144
144
|
- cremefraiche.gemspec
|
145
145
|
- doc/gui_howto.pdf
|
146
|
+
- lib/.basic_logging.rb.swp
|
147
|
+
- lib/.cfprawn.rb.swp
|
148
|
+
- lib/.confcheck.rb.swp
|
149
|
+
- lib/.configuration.rb.swp
|
150
|
+
- lib/.cremefraiche.rb.swp
|
151
|
+
- lib/.emlfile.rb.swp
|
152
|
+
- lib/.file_checking.rb.swp
|
153
|
+
- lib/.html2text.rb.swp
|
154
|
+
- lib/.license.rb.swp
|
155
|
+
- lib/.tag_munging.rb.swp
|
156
|
+
- lib/.version.rb.swp
|
146
157
|
- lib/LANG
|
147
158
|
- lib/basic_logging.rb
|
148
159
|
- lib/busy_indicator/.busy_function_test.rb.swp
|
@@ -194,9 +205,9 @@ files:
|
|
194
205
|
- lib/translating.rb
|
195
206
|
- lib/translations
|
196
207
|
- lib/version.rb
|
197
|
-
homepage:
|
208
|
+
homepage: http://www.rubygems.org/gems/cremefraiche
|
198
209
|
licenses:
|
199
|
-
-
|
210
|
+
- Nonstandard
|
200
211
|
metadata: {}
|
201
212
|
post_install_message:
|
202
213
|
rdoc_options: []
|
@@ -217,5 +228,5 @@ requirements:
|
|
217
228
|
rubygems_version: 3.4.20
|
218
229
|
signing_key:
|
219
230
|
specification_version: 4
|
220
|
-
summary:
|
231
|
+
summary: Better HTML-handling, more HTML supported.
|
221
232
|
test_files: []
|