backup_paradise 1.2.37

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.

Potentially problematic release.


This version of backup_paradise might be problematic. Click here for more details.

Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +375 -0
  3. data/backup_paradise.gemspec +50 -0
  4. data/bin/backup_for_ingrid +10 -0
  5. data/bin/backup_paradise +7 -0
  6. data/bin/windows_backup_paradise +9 -0
  7. data/doc/README.gen +347 -0
  8. data/doc/TODO.md +130 -0
  9. data/lib/backup_paradise/actions/README.md +2 -0
  10. data/lib/backup_paradise/actions/backup.rb +62 -0
  11. data/lib/backup_paradise/base/base.rb +493 -0
  12. data/lib/backup_paradise/base/colours.rb +137 -0
  13. data/lib/backup_paradise/base/namespace.rb +16 -0
  14. data/lib/backup_paradise/base/tab.rb +47 -0
  15. data/lib/backup_paradise/colours/colours.rb +88 -0
  16. data/lib/backup_paradise/constants/constants.rb +162 -0
  17. data/lib/backup_paradise/gui/glimmer/libui/backup_for_ingrid/backup_for_ingrid.rb +87 -0
  18. data/lib/backup_paradise/gui/gtk2/OLD_backup.rb +222 -0
  19. data/lib/backup_paradise/gui/gtk3/simple_backup_widget/create.rb +64 -0
  20. data/lib/backup_paradise/gui/gtk3/simple_backup_widget/misc.rb +34 -0
  21. data/lib/backup_paradise/gui/gtk3/simple_backup_widget/simple_backup_widget.rb +167 -0
  22. data/lib/backup_paradise/gui/libui/backup_for_ingrid/backup_for_ingrid.rb +99 -0
  23. data/lib/backup_paradise/gui/libui/simple_backup_widget/simple_backup_widget.rb +119 -0
  24. data/lib/backup_paradise/gui/shared_code/simple_backup_widget/simple_backup_widget_module.rb +595 -0
  25. data/lib/backup_paradise/gui/tk/backup.rb +108 -0
  26. data/lib/backup_paradise/images/BACKUP_IMAGE.png +0 -0
  27. data/lib/backup_paradise/images/right_arrow.png +0 -0
  28. data/lib/backup_paradise/project/project.rb +40 -0
  29. data/lib/backup_paradise/requires/require_the_backup_paradise_project.rb +18 -0
  30. data/lib/backup_paradise/requires/require_yaml.rb +7 -0
  31. data/lib/backup_paradise/tab/tab.rb +87 -0
  32. data/lib/backup_paradise/toplevel_methods/cliner.rb +16 -0
  33. data/lib/backup_paradise/toplevel_methods/config.rb +77 -0
  34. data/lib/backup_paradise/toplevel_methods/create_and_remove.rb +63 -0
  35. data/lib/backup_paradise/toplevel_methods/e.rb +16 -0
  36. data/lib/backup_paradise/toplevel_methods/esystem.rb +19 -0
  37. data/lib/backup_paradise/toplevel_methods/files_and_directories.rb +181 -0
  38. data/lib/backup_paradise/toplevel_methods/help.rb +93 -0
  39. data/lib/backup_paradise/toplevel_methods/misc.rb +153 -0
  40. data/lib/backup_paradise/toplevel_methods/mountpoint.rb +185 -0
  41. data/lib/backup_paradise/toplevel_methods/opnn.rb +25 -0
  42. data/lib/backup_paradise/utility_scripts/backup/backup.rb +1389 -0
  43. data/lib/backup_paradise/utility_scripts/backup/constants.rb +34 -0
  44. data/lib/backup_paradise/utility_scripts/backup/initialize.rb +71 -0
  45. data/lib/backup_paradise/utility_scripts/backup/menu.rb +360 -0
  46. data/lib/backup_paradise/utility_scripts/backup/run.rb +20 -0
  47. data/lib/backup_paradise/version/version.rb +19 -0
  48. data/lib/backup_paradise/windows/README.md +1 -0
  49. data/lib/backup_paradise/windows/windows.rb +101 -0
  50. data/lib/backup_paradise/www/backup.cgi +63 -0
  51. data/lib/backup_paradise/yaml/config.yml +78 -0
  52. data/lib/backup_paradise.rb +5 -0
  53. data/test/testing_toplevel_functionality.rb +11 -0
  54. metadata +198 -0
@@ -0,0 +1,167 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === BackupParadise::GUI::Gtk::SimpleBackupWidget
6
+ #
7
+ # This is a simple gtk3-widget that can be used to quickly back up data
8
+ # to an external USB device (or a second harddisc).
9
+ # =========================================================================== #
10
+ # require 'backup_paradise/gui/gtk3/simple_backup_widget/simple_backup_widget.rb'
11
+ # BackupParadise::GUI::Gtk::SimpleBackupWidget.run
12
+ # =========================================================================== #
13
+ require 'gtk_paradise/require_gtk3'
14
+
15
+ module BackupParadise
16
+
17
+ module GUI
18
+
19
+ module Gtk
20
+
21
+ class SimpleBackupWidget < ::Gtk::Box # === BackupParadise::GUI::Gtk::SimpleBackupWidget
22
+
23
+ require 'gtk_paradise/requires/require_the_base_module.rb'
24
+ include ::Gtk::BaseModule
25
+
26
+ require 'backup_paradise/gui/shared_code/simple_backup_widget/simple_backup_widget_module.rb'
27
+ include BackupParadise::GUI::SimpleBackupWidgetModule
28
+
29
+ require 'backup_paradise/gui/gtk3/simple_backup_widget/create.rb'
30
+ require 'backup_paradise/gui/gtk3/simple_backup_widget/misc.rb'
31
+
32
+ # ========================================================================= #
33
+ # === NAMESPACE
34
+ # ========================================================================= #
35
+ NAMESPACE = inspect
36
+
37
+ # ========================================================================= #
38
+ # === initialize
39
+ # ========================================================================= #
40
+ def initialize(
41
+ commandline_arguments = ARGV,
42
+ run_already = true
43
+ )
44
+ super(:vertical)
45
+ set_border_width(0)
46
+ reset
47
+ set_commandline_arguments(
48
+ commandline_arguments
49
+ )
50
+ run if run_already
51
+ end
52
+
53
+ # ========================================================================= #
54
+ # === reset (reset tag)
55
+ # ========================================================================= #
56
+ def reset
57
+ reset_the_internal_variables
58
+ # ======================================================================= #
59
+ # === @configuration
60
+ # ======================================================================= #
61
+ @configuration = [true, __dir__, NAMESPACE]
62
+ reset_shared_module
63
+ set_use_this_font(USE_THIS_FONT)
64
+ handle_CSS
65
+ infer_the_size_automatically
66
+ end
67
+
68
+ # ========================================================================= #
69
+ # === handle_CSS (CSS tag, css tag)
70
+ # ========================================================================= #
71
+ def handle_CSS
72
+ use_gtk_paradise_project_css_file
73
+ apply_these_CSS_rules '
74
+ .dotted_steelblue_border {
75
+ border: 2px dotted steelblue;
76
+ }
77
+
78
+ .the_backup_button {
79
+ border: 3px dotted royalblue;
80
+ padding: 8px;
81
+ margin: 4px;
82
+ color: darkgreen;
83
+ font-weight: bold;
84
+ }
85
+
86
+ .the_backup_button:hover {
87
+ color: forestgreen;
88
+ font-weight: bold;
89
+ }
90
+
91
+ .the_backup_button_for_ingrid {
92
+ border: 2px dotted royalblue;
93
+ padding: 5px;
94
+ margin: 2px;
95
+ color: royalblue;
96
+ font-weight: bold;
97
+ }
98
+
99
+ .the_backup_button_for_ingrid_button:hover {
100
+ color: steelblue;
101
+ font-weight: bold;
102
+ }
103
+
104
+ '
105
+ end
106
+
107
+ # ========================================================================= #
108
+ # === connect_skeleton (connect tag)
109
+ # ========================================================================= #
110
+ def connect_skeleton
111
+ abort_on_exception
112
+ header_bar = return_default_header_bar { :with_close_button_and_inferred_title }
113
+ header_bar.spacing = 10
114
+ header_bar.add_left(@button_choose_file)
115
+ header_bar.add_left(@button_backup_audio)
116
+ @spinner = default_spinner
117
+ @spinner.is_inactive
118
+ header_bar.add_right(@spinner)
119
+ button = icon_theme_image('daytime-sunset-symbolic.symbolic')
120
+ button.hint = 'Click this icon to show which devices are mounted and '\
121
+ 'update the combo-box showing all mounted devices.'
122
+ button.on_clicked {
123
+ scan_for_mountpoints_then_update_the_appropriate_combo_box
124
+ }
125
+ header_bar.add_left(button)
126
+ minimal(header_bar, 1)
127
+ minimal(horizontal_separator, 1)
128
+ minimal(@grid, 1)
129
+ minimal(horizontal_separator, 1)
130
+ hbox = gtk_hbox
131
+ _ = BackupParadise.project_base_directory?+'images/right_arrow.png'
132
+ if File.exist? _
133
+ hbox.minimal(image(_), 5)
134
+ end
135
+ hbox.maximal(@button_backup)
136
+ minimal(hbox)
137
+ minimal(horizontal_separator)
138
+ if is_on_roebe?
139
+ minimal(@button_ingrid)
140
+ minimal(horizontal_separator)
141
+ end
142
+ minimal(@label_showing_results)
143
+ minimal(horizontal_separator)
144
+ sync_the_combo_box_values_onto_the_entries_below
145
+ do_handle_the_proper_syncing_when_the_combo_box_entries_are_changed
146
+ end
147
+
148
+ # ========================================================================= #
149
+ # === run_file_chooser_dialog
150
+ # ========================================================================= #
151
+ def run_file_chooser_dialog(
152
+ _ = @file_chooser_dialog
153
+ )
154
+ if _ and (_.run == ::Gtk::ResponseType::ACCEPT)
155
+ filename = _.filename
156
+ e "filename = #{filename}"
157
+ e "uri = #{_.uri}"
158
+ entry_left?.set_text(filename)
159
+ @file_chooser_dialog.destroy
160
+ end
161
+ end
162
+
163
+ end; end; end; end
164
+
165
+ if __FILE__ == $PROGRAM_NAME
166
+ BackupParadise::GUI::Gtk::SimpleBackupWidget.run
167
+ end # backupwidget
@@ -0,0 +1,99 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === BackupParadise::GUI::LibUI::BackupForIngrid
6
+ # =========================================================================== #
7
+ # require 'backup_paradise/gui/libui/backup_for_ingrid/backup_for_ingrid.rb'
8
+ # BackupParadise::GUI::LibUI::BackupForIngrid.new
9
+ # =========================================================================== #
10
+ module BackupParadise
11
+
12
+ module GUI
13
+
14
+ module LibUI
15
+
16
+ class BackupForIngrid # === BackupParadise::GUI::LibUI::BackupForIngrid
17
+
18
+ require 'libui_paradise'
19
+ include LibuiParadise::Extensions
20
+
21
+ require 'backup_paradise/gui/shared_code/simple_backup_widget/simple_backup_widget_module.rb'
22
+ include BackupParadise::GUI::SimpleBackupWidgetModule
23
+
24
+ alias e puts
25
+
26
+ # ========================================================================= #
27
+ # === TITLE
28
+ # ========================================================================= #
29
+ TITLE = 'Backup Widget'
30
+
31
+ # ========================================================================= #
32
+ # === WIDTH
33
+ # ========================================================================= #
34
+ WIDTH = '25% or minimum 380px'
35
+
36
+ # ========================================================================= #
37
+ # === HEIGHT
38
+ # ========================================================================= #
39
+ HEIGHT = 100
40
+
41
+ # ========================================================================= #
42
+ # === initialize
43
+ # ========================================================================= #
44
+ def initialize(
45
+ run_already = true
46
+ )
47
+ reset
48
+ run if run_already
49
+ end
50
+
51
+ # ========================================================================= #
52
+ # === reset (reset tag)
53
+ # ========================================================================= #
54
+ def reset
55
+ set_title(TITLE)
56
+ set_width(WIDTH)
57
+ set_height(HEIGHT)
58
+ end
59
+
60
+ # ========================================================================= #
61
+ # === run
62
+ # ========================================================================= #
63
+ def run
64
+ window = ui_padded_main_window(title?, width?, height?, 0)
65
+ outer_vbox = padded_vbox
66
+ # ======================================================================= #
67
+ # First add the two buttons on top:
68
+ # ======================================================================= #
69
+ hbox_on_top = padded_hbox
70
+ button_backup_for_ingrid = button(
71
+ "Backup c:\\ingrid\\"
72
+ )
73
+ button_backup_for_ingrid.on_clicked {
74
+ backup_ingrid_directory
75
+ popup_message(window, 'Backup finished!')
76
+ }
77
+ button_quit = quit_button
78
+ # ======================================================================= #
79
+ # Add the backup-button next:
80
+ # ======================================================================= #
81
+ hbox_on_top.maximal(button_backup_for_ingrid)
82
+ outer_vbox.add_hsep
83
+ hbox_on_top.maximal(button_quit)
84
+ outer_vbox.add_hsep
85
+ outer_vbox.add(
86
+ LibuiParadise.draw_rectangle(width?, 50, :steelblue)
87
+ )
88
+ outer_vbox.add_hsep
89
+ outer_vbox.maximal(hbox_on_top)
90
+ outer_vbox.add_hsep
91
+ window.add(outer_vbox)
92
+ window.intelligent_exit
93
+ end
94
+
95
+ end; end; end; end
96
+
97
+ if __FILE__ == $PROGRAM_NAME
98
+ BackupParadise::GUI::LibUI::BackupForIngrid.new
99
+ end
@@ -0,0 +1,119 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === BackupParadise::GUI::LibUI::SimpleBackupWidget
6
+ # =========================================================================== #
7
+ module BackupParadise
8
+
9
+ module GUI
10
+
11
+ module LibUI
12
+
13
+ class SimpleBackupWidget # === BackupParadise::GUI::LibUI::SimpleBackupWidget
14
+
15
+ require 'libui_paradise'
16
+ include LibuiParadise::Extensions
17
+
18
+ require 'backup_paradise/gui/shared_code/simple_backup_widget/simple_backup_widget_module.rb'
19
+ include BackupParadise::GUI::SimpleBackupWidgetModule
20
+
21
+ # ========================================================================= #
22
+ # === initialize
23
+ # ========================================================================= #
24
+ def initialize(
25
+ run_already = true
26
+ )
27
+ reset
28
+ run if run_already
29
+ end
30
+
31
+ # ========================================================================= #
32
+ # === reset (reset tag)
33
+ # ========================================================================= #
34
+ def reset
35
+ reset_shared_module
36
+ end
37
+
38
+ # ========================================================================= #
39
+ # === create_the_grid (grid tag)
40
+ # ========================================================================= #
41
+ def create_the_grid
42
+ # ======================================================================= #
43
+ # === @grid
44
+ # ======================================================================= #
45
+ @grid = default_grid
46
+ label_backup_from = text('Backup from:')
47
+ label_backup_from.make_bold
48
+ label_backup_from.hint = 'Input which directory '\
49
+ 'you wish to back up. Use the combo-box entry '\
50
+ 'below this widget, or the entry below '\
51
+ 'that combo-box.'
52
+ # left, top, xspan, yspan, hexpand, halign, vexpand, valign
53
+ # 0, 0, 2, 1, 0, 0, 1, 0
54
+ @grid.grid_append(label_backup_from, 0, 0, 1, 1, 0, 0.5, 1, 0)
55
+
56
+ label_backup_onto = text('Backup onto:')
57
+ label_backup_onto.make_bold
58
+ label_backup_onto.hint = 'Input the target device onto which we will '\
59
+ 'copy the data onto.'
60
+ @grid.grid_append(label_backup_onto, 1, 0, 1, 1, 0, 0.5, 1, 0)
61
+
62
+ # ======================================================================= #
63
+ # Next we will add the two main combo-boxes.
64
+ # ======================================================================= #
65
+ @grid.grid_append(@combo_box_backup_from, 0, 1, 1, 1, 0, 0.5, 1, 0)
66
+ @grid.grid_append(@combo_box_backup_onto, 1, 1, 1, 1, 0, 0.5, 1, 0)
67
+
68
+ @grid.grid_append(@entry1_for_the_backup_from_value, 0, 2, 1, 1, 0, 0.5, 1, 0)
69
+ @grid.grid_append(@entry2_for_the_backup_onto_value, 1, 2, 1, 1, 0, 0.5, 1, 0)
70
+ end
71
+
72
+ # ========================================================================= #
73
+ # === connect_skeleton
74
+ # ========================================================================= #
75
+ def connect_skeleton
76
+ window = ui_padded_main_window(
77
+ title?,
78
+ width?,
79
+ height?,
80
+ 0
81
+ )
82
+ outer_vbox = padded_vbox
83
+ button_quit = quit_button
84
+ hbox = padded_hbox
85
+ hbox.minimal(choose_file_button?)
86
+ hbox.minimal(backup_audio_button?)
87
+ hbox.minimal(text(title?))
88
+ outer_vbox.minimal(hbox)
89
+ outer_vbox.minimal(@grid)
90
+
91
+ outer_vbox.minimal(backup_button?)
92
+ outer_vbox.minimal(backup_ingrid_button?) if is_on_roebe?
93
+ outer_vbox.minimal(button_quit)
94
+
95
+ outer_vbox.minimal(horizontal_separator)
96
+ outer_vbox.minimal(@label_showing_results)
97
+ outer_vbox.minimal(horizontal_separator)
98
+
99
+ window.add(outer_vbox)
100
+ sync_the_combo_box_values_onto_the_entries_below
101
+ window.intelligent_exit
102
+ end
103
+
104
+ # ========================================================================= #
105
+ # === create_skeleton
106
+ # ========================================================================= #
107
+ def create_skeleton
108
+ create_the_entries # Put this early on.
109
+ create_the_combo_boxes
110
+ create_the_buttons
111
+ create_the_label_showing_results
112
+ create_the_grid
113
+ end
114
+
115
+ end; end; end; end
116
+
117
+ if __FILE__ == $PROGRAM_NAME
118
+ BackupParadise::GUI::LibUI::SimpleBackupWidget.new
119
+ end