cremefraiche 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of cremefraiche might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/bin/cremefraiche +25 -0
- data/bin/cremefraicheGui +26 -0
- data/cremefraiche.gemspec +24 -0
- data/lib/LANG +1 -0
- data/lib/busy_indicator/busy_function_test.rb +56 -0
- data/lib/busy_indicator/busy_indicator.rb +95 -0
- data/lib/busy_indicator/color_output.rb +51 -0
- data/lib/cfprawn.rb +394 -0
- data/lib/confcheck.rb +112 -0
- data/lib/config +192 -0
- data/lib/configuration.rb +259 -0
- data/lib/cremefraiche.rb +341 -0
- data/lib/emlfile.rb +140 -0
- data/lib/file_checking.rb +87 -0
- data/lib/gui/AboutDialog.rb +64 -0
- data/lib/gui/ButtonLabel.rb +49 -0
- data/lib/gui/ConfDialog.rb +618 -0
- data/lib/gui/HowtoDialog.rb +184 -0
- data/lib/gui/conf_option.rb +279 -0
- data/lib/gui/conf_value.rb +65 -0
- data/lib/gui/cremefraicheGui.rb +625 -0
- data/lib/gui/gtk-about.xpm +90 -0
- data/lib/gui/gtk-close.xpm +90 -0
- data/lib/gui/gtk-execute.xpm +118 -0
- data/lib/gui/gtk-open.xpm +147 -0
- data/lib/gui/gtk-properties.xpm +378 -0
- data/lib/gui/gtk-quit.xpm +352 -0
- data/lib/gui/gtk-remove.xpm +123 -0
- data/lib/gui/gtk-save.xpm +214 -0
- data/lib/gui/gtk-stop.xpm +344 -0
- data/lib/gui/help.xpm +463 -0
- data/lib/gui/icon.xpm +300 -0
- data/lib/gui/message_dialog.rb +34 -0
- data/lib/gui/okay.xpm +49 -0
- data/lib/gui/preferences-color.xpm +252 -0
- data/lib/gui/view.xpm +75 -0
- data/lib/html2text.rb +177 -0
- data/lib/icon/icon.xpm +300 -0
- data/lib/icon/icon_big.xpm +661 -0
- data/lib/license.rb +705 -0
- data/lib/log.conf +65 -0
- data/lib/logging.rb +193 -0
- data/lib/tag_munging.rb +97 -0
- data/lib/translating.rb +78 -0
- data/lib/translations +598 -0
- data/lib/version.rb +26 -0
- metadata +213 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f32500fae0cb92a1031f3f510fccb9d7d11a645c85ad5499e68d0e335c4688c6
|
4
|
+
data.tar.gz: 9ead27ebbb12a27e13e217015aa23a6778ac4accedc3af717ee676a5131a8398
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7aa68b72343d5d807c651195b074d0fe9bfb793f06ad5670df0daa200284625b52bcf95708ffd3f5ccf971662cb4ec8bf3ea3b01e9cc77bc8f6857276251a7e4
|
7
|
+
data.tar.gz: 6aa9b22dc6d4689a8bb63e164f012f60ba230c26ae70fec8a7b1fd6e4ac6824199aae556288d2b5ed15321000b3515b25cbcbbbc3528e1652d9f78342f64505e
|
data/bin/cremefraiche
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#encoding: UTF-8
|
3
|
+
=begin
|
4
|
+
/***************************************************************************
|
5
|
+
* ©2011-2013, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
6
|
+
* *
|
7
|
+
* This program is free software; you can redistribute it and/or modify *
|
8
|
+
* it under the terms of the GNU General Public License as published by *
|
9
|
+
* the Free Software Foundation; either version 3 of the License, or *
|
10
|
+
* (at your option) any later version. *
|
11
|
+
* *
|
12
|
+
* This program is distributed in the hope that it will be useful, *
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
15
|
+
* GNU General Public License for more details. *
|
16
|
+
* *
|
17
|
+
* You should have received a copy of the GNU General Public License *
|
18
|
+
* along with this program; if not, write to the *
|
19
|
+
* Free Software Foundation, Inc., *
|
20
|
+
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
21
|
+
***************************************************************************/
|
22
|
+
=end
|
23
|
+
|
24
|
+
require_relative '../lib/cremefraiche'
|
25
|
+
CremeFraiche.new(*ARGV)
|
data/bin/cremefraicheGui
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#encoding: UTF-8
|
3
|
+
=begin
|
4
|
+
/***************************************************************************
|
5
|
+
* ©2011-2013, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
6
|
+
* *
|
7
|
+
* This program is free software; you can redistribute it and/or modify *
|
8
|
+
* it under the terms of the GNU General Public License as published by *
|
9
|
+
* the Free Software Foundation; either version 3 of the License, or *
|
10
|
+
* (at your option) any later version. *
|
11
|
+
* *
|
12
|
+
* This program is distributed in the hope that it will be useful, *
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
15
|
+
* GNU General Public License for more details. *
|
16
|
+
* *
|
17
|
+
* You should have received a copy of the GNU General Public License *
|
18
|
+
* along with this program; if not, write to the *
|
19
|
+
* Free Software Foundation, Inc., *
|
20
|
+
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
21
|
+
***************************************************************************/
|
22
|
+
|
23
|
+
|
24
|
+
=end
|
25
|
+
require_relative '../lib/gui/cremefraicheGui'
|
26
|
+
CremeFraicheGui.new(ARGV)
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_relative "lib/version"
|
2
|
+
require 'date'
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.version = VERSION
|
6
|
+
s.name = File.basename(__FILE__, '.gemspec')
|
7
|
+
s.date = Date.today.strftime('%F')
|
8
|
+
s.summary = SUMMARY
|
9
|
+
s.description = "transforms EML files to PDF"
|
10
|
+
s.authors = ["Michael Uplawski"]
|
11
|
+
s.email = 'michael.uplawski@uplawski.eu'
|
12
|
+
s.files = 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}
|
13
|
+
s.homepage = ''
|
14
|
+
s.requirements = 'prawn prawn-table escape nokogiri mail gtk3'
|
15
|
+
s.add_runtime_dependency 'prawn', '~> 2.2', '>= 2.2.2'
|
16
|
+
s.add_runtime_dependency 'prawn-table', '~> 0.2', '>= 0.2.2'
|
17
|
+
s.add_runtime_dependency 'escape', '~> 0.0', '>= 0.0.4'
|
18
|
+
s.add_runtime_dependency 'nokogiri', '~> 1.10', '>= 1.10.4'
|
19
|
+
s.add_runtime_dependency 'mail', '~> 2.7', '>= 2.7.1'
|
20
|
+
s.add_runtime_dependency 'gtk3', '~> 3.4', '>= 3.4.1'
|
21
|
+
s.executables = 'cremefraiche', 'cremefraicheGui'
|
22
|
+
s.license = 'GPL-3.0'
|
23
|
+
s.required_ruby_version = '>= 2.5'
|
24
|
+
end
|
data/lib/LANG
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
en
|
@@ -0,0 +1,56 @@
|
|
1
|
+
#encoding: UTF-8
|
2
|
+
=begin
|
3
|
+
/***************************************************************************
|
4
|
+
* Copyright (c) 2011, 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 GNU General Public License as published by *
|
8
|
+
* the Free Software Foundation; either version 3 of the License, or *
|
9
|
+
* (at your option) any later version. *
|
10
|
+
* *
|
11
|
+
* This program is distributed in the hope that it will be useful, *
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
14
|
+
* GNU General Public License for more details. *
|
15
|
+
* *
|
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
|
+
***************************************************************************/
|
21
|
+
|
22
|
+
A test and demo for the BusyIndicator.
|
23
|
+
This does not use the final BusyIndicator but directly creates
|
24
|
+
a Thread.
|
25
|
+
=end
|
26
|
+
require './color_output'
|
27
|
+
|
28
|
+
def clean_busy_indicator(thr, width, comment)
|
29
|
+
thr.terminate
|
30
|
+
thr.join
|
31
|
+
print ("\b" * width)
|
32
|
+
print ("%+#{width}s\n" %comment)
|
33
|
+
end
|
34
|
+
|
35
|
+
def busy_indicator(width)
|
36
|
+
tobj = Thread.new() do
|
37
|
+
loop do
|
38
|
+
%w"OOO ooo ___ ooo".each do |s|
|
39
|
+
print "%+#{width}s" %s
|
40
|
+
sleep 0.1
|
41
|
+
print ("\b" * width)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
# =======================
|
47
|
+
if($0 == __FILE__)
|
48
|
+
width = 20
|
49
|
+
2.times do
|
50
|
+
puts "I am busy, pse wait..."
|
51
|
+
thr = busy_indicator(width)
|
52
|
+
sleep 3
|
53
|
+
clean_busy_indicator(thr, width, "Okay")
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
@@ -0,0 +1,95 @@
|
|
1
|
+
#encoding: UTF-8
|
2
|
+
=begin
|
3
|
+
/***************************************************************************
|
4
|
+
* Copyright (c) 2011, 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 GNU General Public License as published by *
|
8
|
+
* the Free Software Foundation; either version 3 of the License, or *
|
9
|
+
* (at your option) any later version. *
|
10
|
+
* *
|
11
|
+
* This program is distributed in the hope that it will be useful, *
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
14
|
+
* GNU General Public License for more details. *
|
15
|
+
* *
|
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
|
+
***************************************************************************/
|
21
|
+
|
22
|
+
=end
|
23
|
+
require_relative 'color_output'
|
24
|
+
|
25
|
+
#The BusyIndicator will show an "Animation" for the time of its execution.
|
26
|
+
#The main program will continue to run in its own thread and should stop
|
27
|
+
#the BusyIndicator, once that a process of longer duration has terminated.
|
28
|
+
class BusyIndicator
|
29
|
+
attr_writer :width
|
30
|
+
# Defines a busy_indicator of a width of 'width' characters.
|
31
|
+
# If 'start' is true, the text-animation is run immediately.
|
32
|
+
def initialize(start = true, width = nil)
|
33
|
+
@width = width && width >= 3 ? width : 3
|
34
|
+
@thr = busy_indicator(@width) if start
|
35
|
+
end
|
36
|
+
|
37
|
+
# Starts the text-animation, returns the thread.
|
38
|
+
def run()
|
39
|
+
@thr = busy_indicator(@width)
|
40
|
+
end
|
41
|
+
|
42
|
+
# Stops the text-animation, terminates the thread.
|
43
|
+
# If comment is not null, it will be displayed in the end.
|
44
|
+
def stop(comment)
|
45
|
+
@thr.terminate
|
46
|
+
@thr.join
|
47
|
+
print ("\b" * @width)
|
48
|
+
print ("%+#{@width}s\n" %comment)
|
49
|
+
end
|
50
|
+
private
|
51
|
+
def busy_indicator(width)
|
52
|
+
tobj = Thread.new() do
|
53
|
+
print "working ... "
|
54
|
+
loop do
|
55
|
+
# %w"OOO ooo ___ ooo".each do |s|
|
56
|
+
# %w"000 OOO UUU VVV YYY TTT 777 >>> === --- ooo".each do |s|
|
57
|
+
%w"0OU OUV UVY VYT YT7 T7> 7>= >=- =-o -o0 o0O".each do |s|
|
58
|
+
print "%+#{width}s" %s
|
59
|
+
sleep 0.1
|
60
|
+
print ("\b" * width)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
# =======================
|
67
|
+
# Example
|
68
|
+
# You can run this file directly from a command-line,
|
69
|
+
# like this
|
70
|
+
# user@mchine$: ruby busy_indicator.rb
|
71
|
+
#
|
72
|
+
# The program below will then start four (4)
|
73
|
+
# BusyIndicators and stop them again, one by one.
|
74
|
+
# The width of the "animation" is variated.
|
75
|
+
# In the loop, the BusyIndicator is started upon
|
76
|
+
# its creation, the other two instances are first
|
77
|
+
# created then 'run'.
|
78
|
+
if($0 == __FILE__)
|
79
|
+
width = 20
|
80
|
+
2.times do
|
81
|
+
puts "I am busy, pse wait..."
|
82
|
+
thr = BusyIndicator.new(true, width)
|
83
|
+
sleep 3
|
84
|
+
thr.stop("Okay")
|
85
|
+
end
|
86
|
+
bi = BusyIndicator.new(false)
|
87
|
+
bi.run
|
88
|
+
sleep 3
|
89
|
+
bi.stop("Stopped")
|
90
|
+
bi.width = 8
|
91
|
+
bi.run
|
92
|
+
sleep 3
|
93
|
+
bi.stop("stopped again")
|
94
|
+
end
|
95
|
+
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#encoding: UTF-8
|
2
|
+
=begin
|
3
|
+
/***************************************************************************
|
4
|
+
* Copyright (c) 2011, 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 GNU General Public License as published by *
|
8
|
+
* the Free Software Foundation; either version 3 of the License, or *
|
9
|
+
* (at your option) any later version. *
|
10
|
+
* *
|
11
|
+
* This program is distributed in the hope that it will be useful, *
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
14
|
+
* GNU General Public License for more details. *
|
15
|
+
* *
|
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
|
+
***************************************************************************/
|
21
|
+
|
22
|
+
=end
|
23
|
+
# Helper functions for color-output to an Ansi-terminal.
|
24
|
+
# ... I have never seen an Ansi-terminal, but learned that about each Linux
|
25
|
+
# terminal-emulator can behave like one.
|
26
|
+
# And anyway. This works.
|
27
|
+
|
28
|
+
COLORS = {:default => 9, :black => 0, :red => 1, :green => 2, :yellow => 3, :blue => 4, :purple => 5, :cyan => 6, :white => 7 }
|
29
|
+
|
30
|
+
BG = 4
|
31
|
+
FG = 3
|
32
|
+
REGULAR = 0
|
33
|
+
BOLD = 1
|
34
|
+
UNDERLINE = 4
|
35
|
+
BLINK = 5
|
36
|
+
SWAP = 7
|
37
|
+
NEUTRAL = 0
|
38
|
+
|
39
|
+
STYLES = {:regular => REGULAR, :bold => BOLD, :underline => UNDERLINE, :blink => BLINK, :swap => SWAP, :neutral => NEUTRAL}
|
40
|
+
|
41
|
+
def colored_text(text, color_code)
|
42
|
+
"#{color_code}#{text}e[0m"
|
43
|
+
end
|
44
|
+
|
45
|
+
def colored_output(output_text, fg_color = :default, bg_color = :default, style = :regular , mode = :neutral )
|
46
|
+
"\033[%i;%i;%i%i;%i%im%s\033[0m" %[STYLES[mode.to_sym], STYLES[style.to_sym], FG, COLORS[fg_color.to_sym], BG, COLORS[bg_color.to_sym], output_text]
|
47
|
+
end
|
48
|
+
|
49
|
+
def red(text); colorize(text, "\033[31m"); end
|
50
|
+
def green(text); colorize(text, "\033[32m"); end
|
51
|
+
|