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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 48cc0065d28074c113f879f7dbc47e424b78a52e75f54eeb74f25d287658e8c6
4
- data.tar.gz: 16b22c86a2c3843de9a3000c336108196bb2deb480eaff8761f8d22b2cb07075
3
+ metadata.gz: f77d80c3b68961a05dfe0b13fa1573b6412a6fafe7668252849d421939900dc8
4
+ data.tar.gz: 1cde51638355051748a080f4efee166131c78d0a6c843003045595c9ded61331
5
5
  SHA512:
6
- metadata.gz: 6a668022a9d83c0977c6f53fd0b8ab19cb9ebfb5b74ddc8d3203862ce7daf369a28b7abc55259dcde290f7224cbba4f1edc1ce4a4b6d8ff4680aee646d824830
7
- data.tar.gz: ee181963d9fbf566b13a40777c78295d01503d449145746a64a76bdb10d1050e96d2d4e39ba0db8622b4c54a97a1c6b969c03491d005d5829f14b69790406b8a
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) } + %w~cremefraiche.gemspec~.collect{|f|f} << "README.md"
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 = 'GPL-3.0'
22
+ s.license = 'Nonstandard'
23
+ s.homepage = Web_page
23
24
  s.required_ruby_version = '>= 2.5'
24
25
  end
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/lib/config CHANGED
@@ -39,7 +39,7 @@ log level: info
39
39
  # Value: a file-path
40
40
  #
41
41
  # log file: /tmp/cremefraiche.log
42
- # log file:
42
+ log file:
43
43
 
44
44
  # Page-size
45
45
  # Default: A4
data/lib/configuration.rb CHANGED
@@ -34,8 +34,10 @@ class Configuration
34
34
  # file.
35
35
  def initialize
36
36
  read_config
37
- set_level(@conf["log level"])
38
- set_target(@conf["log file"])
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
@@ -23,7 +23,7 @@ require 'mail'
23
23
  # Wraps the Mail-object (from the Mail-gem).
24
24
  class EmlFile
25
25
  include BasicLogging
26
-
26
+ # do not log for the time.
27
27
  BasicLogging::mute(self)
28
28
  include File_Checking
29
29
  include Translating
@@ -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 = @@prog_info[:app_name]
42
- @adialog.title = @@prog_info[:app_name]
43
- @adialog.set_program_name @@prog_info[:app_name]
44
- @adialog.version = @@prog_info[:version]
45
- @adialog.copyright = "© #{@@prog_info[:years]} #{@@prog_info[:author]} #{@@prog_info[:author_mail]}"
46
- @adialog.website = "#{@@prog_info[:web_page]}"
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
- html.gsub! /\<!--.*(-->?)/, ''
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
@@ -16,8 +16,8 @@
16
16
  =end
17
17
 
18
18
  YEARS="2011 - 2023"
19
- VERSION="1.1.8"
20
- SUMMARY="README for rubygems.org"
19
+ VERSION="1.2"
20
+ SUMMARY="Better HTML-handling, more HTML supported."
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.1.8
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: 2023-12-31 00:00:00.000000000 Z
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
- - GPL-3.0
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: README for rubygems.org
231
+ summary: Better HTML-handling, more HTML supported.
221
232
  test_files: []