roebe 0.5.191 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +89 -41
- data/bin/create_my_directories +2 -2
- data/bin/{ruby_dhcpcd → dhcpcd_wrapper} +1 -1
- data/bin/start_lighty +1 -1
- data/doc/README.gen +78 -15
- data/doc/core/array.md +24 -23
- data/doc/core/gem_and_gemspec.md +12 -11
- data/doc/core/hash.md +6 -0
- data/doc/core/misc.md +23 -20
- data/doc/core/regex.md +1 -1
- data/doc/core/stderr.md +16 -0
- data/doc/deprecations/deprecations.md +2 -1
- data/doc/statistics/statistics.md +1 -0
- data/lib/roebe/actions/actions.rb +80 -0
- data/lib/roebe/base/colours.rb +52 -19
- data/lib/roebe/base/misc.rb +30 -1
- data/lib/roebe/base/opnn.rb +7 -0
- data/lib/roebe/browser/output_url_then_open_in_browser.rb +18 -15
- data/lib/roebe/classes/alltagsgeschichte.rb +1 -1
- data/lib/roebe/classes/at.rb +2 -2
- data/lib/roebe/classes/auto_rename_file_based_on_its_creation_date.rb +24 -12
- data/lib/roebe/classes/books/books.rb +234 -142
- data/lib/roebe/classes/books/finished_books/finished_books.rb +10 -3
- data/lib/roebe/classes/books/menu.rb +25 -16
- data/lib/roebe/classes/books/sanitize_this_book_path/sanitize_this_book_path.rb +0 -1
- data/lib/roebe/classes/check_yaml.rb +15 -11
- data/lib/roebe/classes/compile_kernel.rb +3 -1
- data/lib/roebe/classes/contacts/contacts.rb +104 -0
- data/lib/roebe/classes/contacts/gui/universal_widgets/contacts.rb +168 -0
- data/lib/roebe/classes/contacts/shared_code.rb +344 -0
- data/lib/roebe/classes/copy_kernel_config.rb +5 -3
- data/lib/roebe/classes/create_desktop_file.rb +1 -1
- data/lib/roebe/classes/create_file_skeleton/constants.rb +1 -1
- data/lib/roebe/classes/create_file_skeleton/generate_ruby_string.rb +20 -20
- data/lib/roebe/classes/create_file_skeleton/reset.rb +19 -16
- data/lib/roebe/classes/create_my_directories.rb +12 -10
- data/lib/roebe/classes/dhcpcd/{dhcpcd.rb → dhcpcd_wrapper.rb} +137 -95
- data/lib/roebe/classes/dhcpcd/kill_dhcpcd.rb +2 -2
- data/lib/roebe/classes/do_install.rb +7 -6
- data/lib/roebe/classes/done.rb +1 -1
- data/lib/roebe/classes/downcase_extension.rb +4 -4
- data/lib/roebe/classes/email.rb +44 -40
- data/lib/roebe/classes/enable.rb +1 -1
- data/lib/roebe/classes/generate_alsa_conf.rb +4 -4
- data/lib/roebe/classes/generate_overview_of_the_locally_available_books.rb +5 -3
- data/lib/roebe/classes/github.rb +1 -1
- data/lib/roebe/classes/kde/install_this_konsole_theme.rb +1 -1
- data/lib/roebe/classes/{handle_lighttpd.rb → lighttpd/lighttpd_wrapper.rb} +55 -47
- data/lib/roebe/classes/make_gem.rb +49 -35
- data/lib/roebe/classes/mbl.rb +6 -4
- data/lib/roebe/classes/readme_generator/readme_generator.rb +597 -1
- data/lib/roebe/classes/remove_trailing_newline.rb +82 -0
- data/lib/roebe/classes/report_how_many_files_are_in_this_directory.rb +83 -0
- data/lib/roebe/classes/rxinitrc/constants.rb +7 -5
- data/lib/roebe/classes/rxinitrc/rxinitrc.rb +8 -4
- data/lib/roebe/classes/set_background.rb +14 -0
- data/lib/roebe/classes/show_ten_aliases.rb +15 -3
- data/lib/roebe/classes/simple_boot_script.rb +1 -1
- data/lib/roebe/classes/size_of.rb +9 -7
- data/lib/roebe/classes/tales_from_the_crypt.rb +1 -1
- data/lib/roebe/classes/update.rb +4 -11
- data/lib/roebe/classes/upload_to_imgur.rb +64 -35
- data/lib/roebe/commandline/misc.rb +28 -28
- data/lib/roebe/constants/array_install_these_gem_projects.rb +1 -1
- data/lib/roebe/constants/constants.rb +8 -1
- data/lib/roebe/constants/emojis.rb +0 -19
- data/lib/roebe/constants/file_and_directory_constants.rb +2 -2
- data/lib/roebe/constants/misc.rb +10 -2
- data/lib/roebe/constants/roebe.rb +2 -0
- data/lib/roebe/custom_methods/module.rb +45 -16
- data/lib/roebe/fonts/fonts.rb +39 -0
- data/lib/roebe/gui/universal_widgets/books/books.rb +232 -0
- data/lib/roebe/hello_world/hello_world.rb +0 -0
- data/lib/roebe/irb/clean_irbrc +1 -0
- data/lib/roebe/math/log10.rb +3 -3
- data/lib/roebe/math/the_collatz_problem.rb +104 -0
- data/lib/roebe/{toplevel_methods/lighttpd.rb → requires/require_lighttpd.rb} +2 -2
- data/lib/roebe/shell/shell/shell.rb +6 -6
- data/lib/roebe/shell_scripts/README.md +0 -0
- data/lib/roebe/shell_scripts/bashrc +0 -0
- data/lib/roebe/shell_scripts/konsole_tabs.sh +6 -0
- data/lib/roebe/shell_scripts/lfs/001_binutils_1.sh +10 -2
- data/lib/roebe/shell_scripts/lfs/002_gcc_1.sh +33 -3
- data/lib/roebe/shell_scripts/lfs/003_linux_1.sh +1 -0
- data/lib/roebe/shell_scripts/lfs/004_glibc_1.sh +5 -2
- data/lib/roebe/shell_scripts/lfs/005_libstdc++_1.sh +8 -1
- data/lib/roebe/shell_scripts/lfs/007_ncurses_2.sh +5 -2
- data/lib/roebe/shell_scripts/lfs/020_xz_2.sh +5 -4
- data/lib/roebe/shell_scripts/lfs/022_gcc_2.sh +15 -1
- data/lib/roebe/shell_scripts/lfs/025_ruby_2.sh +13 -0
- data/lib/roebe/shell_scripts/lfs/README.md +0 -0
- data/lib/roebe/shell_scripts/lfs/lfs_build_variables.sh +56 -16
- data/lib/roebe/toplevel_methods/module_methods.rb +5 -3
- data/lib/roebe/toplevel_methods/to_mp3.rb +1 -1
- data/lib/roebe/version/version.rb +2 -2
- data/lib/roebe/wasm/README.md +7 -0
- data/lib/roebe/wasm/enable_simple_puts_output.rb +9 -0
- data/lib/roebe/wasm/wasm_examples.html +43 -0
- data/lib/roebe/www/LEDS/LEDS.rb +35 -25
- data/lib/roebe/www/RNA/RNA.cgi +42 -1
- data/lib/roebe/www/algorithms/algorithms.rb +40 -0
- data/lib/roebe/www/analytical_chemistry/content.md +6 -0
- data/lib/roebe/www/animals/animals.cgi +25 -0
- data/lib/roebe/www/bioanalytik/bioanalytik.cgi +90 -0
- data/lib/roebe/www/biotechnology/biotechnology.rb +39 -3
- data/lib/roebe/www/cellbiology/cellbiology.rb +19 -2
- data/lib/roebe/www/chemistry/S/303/244uren_Basen_und_der_pH_Wert/S/303/244uren_Basen_und_der_pH_Wert.cgi +242 -0
- data/lib/roebe/www/chemistry/chemistry.rb +10 -258
- data/lib/roebe/www/chemistry/css_rules.css +67 -0
- data/lib/roebe/www/chemistry/die_quantenzahlen/die_quantenzahlen.cgi +123 -0
- data/lib/roebe/www/chemistry/funktionelle_gruppen_in_der_chemie/funktionelle_gruppen_in_der_chemie.cgi +52 -0
- data/lib/roebe/www/chrome_and_chromium/chrome_and_chromium.rb +37 -42
- data/lib/roebe/www/chromium +1 -0
- data/lib/roebe/www/cognitive_biology/cognitive_biology.cgi +18 -3
- data/lib/roebe/www/erste_hilfe/erste_hilfe.cgi +215 -62
- data/lib/roebe/www/fonts/fonts.cgi +245 -0
- data/lib/roebe/www/genomics/genomics.rb +4 -0
- data/lib/roebe/www/hardware/computersysteme/computersysteme.rb +117 -102
- data/lib/roebe/www/hardware/netzteile/netzteile.cgi +94 -0
- data/lib/roebe/www/immunology/immunology.rb +131 -7
- data/lib/roebe/www/insekten/insekten.md +27 -0
- data/lib/roebe/www/lighttpd/autogenerated_lighttpd.conf +7 -3
- data/lib/roebe/www/lighttpd/configuration/index.conf +7 -4
- data/lib/roebe/www/lighttpd/lighttpd.rb +6 -6
- data/lib/roebe/www/linux/antiX/antiX.rb +7 -4
- data/lib/roebe/www/linux/linux.rb +9 -11
- data/lib/roebe/www/linux/linuxmint/linuxmint.rb +33 -0
- data/lib/roebe/www/linux/slackware/slackware.rb +136 -27
- data/lib/roebe/www/linux/void/void.rb +34 -8
- data/lib/roebe/www/linux_commands/linux_commands.rb +6 -6
- data/lib/roebe/www/lyrics/lyrics.rb +1 -1
- data/lib/roebe/www/metabolic_pathways/metabolic_pathways.rb +5 -1
- data/lib/roebe/www/microbiology/microbiology.rb +17 -2
- data/lib/roebe/www/mikrobielle_physiologie/mikrobielle_physiologie.cgi +1086 -2
- data/lib/roebe/www/mitochondria/mitochondria.cgi +16 -2
- data/lib/roebe/www/module_www.rb +2 -3
- data/lib/roebe/www/neurobiology/neurobiology.rb +20 -3
- data/lib/roebe/www/pdf/pdf.rb +13 -0
- data/lib/roebe/www/physics/physics.rb +20 -4
- data/lib/roebe/www/physiology/physiology.rb +5 -1
- data/lib/roebe/www/play_this_video_file/play_this_video_file.cgi +1 -1
- data/lib/roebe/www/programming_advice/programming_advice.cgi +36 -0
- data/lib/roebe/www/programming_advice/programming_advice.md +358 -0
- data/lib/roebe/www/psychologie/psychologie.rb +7 -1
- data/lib/roebe/www/science/science.rb +6 -0
- data/lib/roebe/www/sex_and_reproduction/sex_and_reproduction.cgi +18 -2
- data/lib/roebe/www/statistik/statistik.rb +6 -1
- data/lib/roebe/www/structural_biology/structural_biology.cgi +18 -0
- data/lib/roebe/www/the_cell_cycle/the_cell_cycle.cgi +27 -0
- data/lib/roebe/www/video/video.rb +1 -1
- data/lib/roebe/www/virology/virology.rb +12 -1
- data/lib/roebe/www/war_in_Ukraine_2022/war_in_Ukraine_2022.rb +70 -28
- data/lib/roebe/www/waschmaschinen/waschmaschinen.rb +5 -4
- data/lib/roebe/www/xfce/xfce.cgi +5 -4
- data/lib/roebe/www/xorg/xorg.rb +3 -202
- data/lib/roebe/www/yeast/yeast.rb +4 -2
- data/lib/roebe/www/yubiko/yubiko.cgi +49 -0
- data/lib/roebe/yaml/{autostart_these_programs.yml → autostart_these_programs/autostart_these_programs.yml} +7 -6
- data/lib/roebe/yaml/books/favourite_books.yml +11 -9
- data/lib/roebe/yaml/directory_structure.yml +2 -0
- data/lib/roebe/yaml/use_this_editor/use_this_editor.yml +1 -0
- metadata +39 -20
- data/lib/roebe/classes/readme_generator/constants.rb +0 -21
- data/lib/roebe/classes/readme_generator/initialize.rb +0 -38
- data/lib/roebe/classes/readme_generator/misc.rb +0 -548
- data/lib/roebe/classes/readme_generator/reset.rb +0 -28
- data/lib/roebe/classes/readme_generator/run.rb +0 -20
- data/lib/roebe/shell_scripts/lfs/lfs_variables.sh +0 -31
- data/lib/roebe/www/cognitive_biology/cognitive_biology.html +0 -40634
- data/lib/roebe/www/mikrobielle_physiologie/mikrobielle_physiologie.rb +0 -1055
- data/lib/roebe/www/programming_advice/programming_advice.yml +0 -31
- data/lib/roebe/yaml/main_editor.yml +0 -1
data/lib/roebe/base/colours.rb
CHANGED
@@ -69,6 +69,13 @@ class Base
|
|
69
69
|
end; alias do_not_use_colours do_not_use_the_base_colours # === do_not_use_colours
|
70
70
|
alias disable_colours do_not_use_the_base_colours # === disable_colours
|
71
71
|
|
72
|
+
# ========================================================================= #
|
73
|
+
# === string_italic
|
74
|
+
# ========================================================================= #
|
75
|
+
def string_italic(i = '')
|
76
|
+
::Colours.string_italic(i)
|
77
|
+
end
|
78
|
+
|
72
79
|
# ========================================================================= #
|
73
80
|
# === powderblue
|
74
81
|
# ========================================================================= #
|
@@ -195,33 +202,51 @@ class Base
|
|
195
202
|
# ========================================================================= #
|
196
203
|
# === lime
|
197
204
|
# ========================================================================= #
|
198
|
-
def lime(
|
205
|
+
def lime(
|
206
|
+
i = '', use_colours = use_colours?
|
207
|
+
)
|
199
208
|
return COLOURS.lime(i) if use_colours
|
200
209
|
return i
|
201
210
|
end
|
202
211
|
|
212
|
+
# ========================================================================= #
|
213
|
+
# === olive
|
214
|
+
# ========================================================================= #
|
215
|
+
def olive(
|
216
|
+
i = '', use_colours = use_colours?
|
217
|
+
)
|
218
|
+
return COLOURS.olive(i) if use_colours
|
219
|
+
return i
|
220
|
+
end
|
221
|
+
|
203
222
|
# ========================================================================= #
|
204
223
|
# === olivedrab
|
205
224
|
# ========================================================================= #
|
206
|
-
def olivedrab(
|
225
|
+
def olivedrab(
|
226
|
+
i = '', use_colours = use_colours?
|
227
|
+
)
|
207
228
|
return COLOURS.olivedrab(i) if use_colours
|
208
|
-
i
|
229
|
+
return i
|
209
230
|
end
|
210
231
|
|
211
232
|
# ========================================================================= #
|
212
233
|
# === slategray
|
213
234
|
# ========================================================================= #
|
214
|
-
def slategray(
|
235
|
+
def slategray(
|
236
|
+
i = '', use_colours = use_colours?
|
237
|
+
)
|
215
238
|
return COLOURS.slategray(i) if use_colours
|
216
|
-
i
|
239
|
+
return i
|
217
240
|
end
|
218
241
|
|
219
242
|
# ========================================================================= #
|
220
243
|
# === palegoldenrod
|
221
244
|
# ========================================================================= #
|
222
|
-
def palegoldenrod(
|
245
|
+
def palegoldenrod(
|
246
|
+
i = '', use_colours = use_colours?
|
247
|
+
)
|
223
248
|
return COLOURS.palegoldenrod(i) if use_colours
|
224
|
-
i
|
249
|
+
return i
|
225
250
|
end
|
226
251
|
|
227
252
|
# ========================================================================= #
|
@@ -229,7 +254,7 @@ class Base
|
|
229
254
|
# ========================================================================= #
|
230
255
|
def teal(i = '', use_colours = use_colours?)
|
231
256
|
return COLOURS.teal(i) if use_colours
|
232
|
-
i
|
257
|
+
return i
|
233
258
|
end
|
234
259
|
|
235
260
|
# ========================================================================= #
|
@@ -237,7 +262,7 @@ class Base
|
|
237
262
|
# ========================================================================= #
|
238
263
|
def darkgreen(i = '', use_colours = use_colours?)
|
239
264
|
return COLOURS.darkgreen(i) if use_colours
|
240
|
-
i
|
265
|
+
return i
|
241
266
|
end
|
242
267
|
|
243
268
|
# ========================================================================= #
|
@@ -245,7 +270,7 @@ class Base
|
|
245
270
|
# ========================================================================= #
|
246
271
|
def crimson(i = '', use_colours = use_colours?)
|
247
272
|
return COLOURS.crimson(i) if use_colours
|
248
|
-
i
|
273
|
+
return i
|
249
274
|
end
|
250
275
|
|
251
276
|
# ========================================================================= #
|
@@ -253,21 +278,25 @@ class Base
|
|
253
278
|
# ========================================================================= #
|
254
279
|
def skyblue(i = '', use_colours = use_colours?)
|
255
280
|
return COLOURS.skyblue(i) if use_colours
|
256
|
-
i
|
281
|
+
return i
|
257
282
|
end
|
258
283
|
|
259
284
|
# ========================================================================= #
|
260
285
|
# === red
|
261
286
|
# ========================================================================= #
|
262
|
-
def red(
|
287
|
+
def red(
|
288
|
+
i = '', use_colours = use_colours?
|
289
|
+
)
|
263
290
|
return COLOURS.red(i) if use_colours
|
264
|
-
i
|
291
|
+
return i
|
265
292
|
end
|
266
293
|
|
267
294
|
# ========================================================================= #
|
268
295
|
# === mediumorchid
|
269
296
|
# ========================================================================= #
|
270
|
-
def mediumorchid(
|
297
|
+
def mediumorchid(
|
298
|
+
i = '', use_colours = use_colours?
|
299
|
+
)
|
271
300
|
return COLOURS.mediumorchid(i) if use_colours
|
272
301
|
return i
|
273
302
|
end
|
@@ -283,18 +312,22 @@ class Base
|
|
283
312
|
# ========================================================================= #
|
284
313
|
# === sfile
|
285
314
|
# ========================================================================= #
|
286
|
-
def sfile(
|
315
|
+
def sfile(
|
316
|
+
i = '', use_colours = use_colours?
|
317
|
+
)
|
287
318
|
if use_colours
|
288
|
-
::Roebe.sfile(i)
|
319
|
+
return ::Roebe.sfile(i)
|
289
320
|
else
|
290
|
-
i
|
321
|
+
return i
|
291
322
|
end
|
292
323
|
end
|
293
324
|
|
294
325
|
# ========================================================================= #
|
295
326
|
# === sdir
|
296
327
|
# ========================================================================= #
|
297
|
-
def sdir(
|
328
|
+
def sdir(
|
329
|
+
i = ''
|
330
|
+
)
|
298
331
|
::Roebe.sdir(i)
|
299
332
|
end
|
300
333
|
|
@@ -306,7 +339,7 @@ class Base
|
|
306
339
|
use_colours = use_colours?
|
307
340
|
)
|
308
341
|
if use_colours
|
309
|
-
|
342
|
+
::Colours.eparse(i)
|
310
343
|
else
|
311
344
|
e i
|
312
345
|
end
|
data/lib/roebe/base/misc.rb
CHANGED
@@ -13,6 +13,7 @@ class Base # === Roebe::Base
|
|
13
13
|
require 'roebe/base/env.rb'
|
14
14
|
require 'roebe/constants/roebe.rb'
|
15
15
|
require 'roebe/constants/file_and_directory_constants.rb'
|
16
|
+
require 'roebe/actions/actions.rb'
|
16
17
|
|
17
18
|
# ========================================================================= #
|
18
19
|
# Add support for commandline-arguments first:
|
@@ -53,6 +54,15 @@ class Base # === Roebe::Base
|
|
53
54
|
esystem 'qdbus org.kde.konsole-`pidof -s konsole` /Sessions/4 runCommand "ata"'
|
54
55
|
end
|
55
56
|
|
57
|
+
# ========================================================================= #
|
58
|
+
# === actions (actions tag, action tag)
|
59
|
+
# ========================================================================= #
|
60
|
+
def actions(
|
61
|
+
i = nil, &block
|
62
|
+
)
|
63
|
+
Roebe.actions(i, &block)
|
64
|
+
end; alias action actions # === action
|
65
|
+
|
56
66
|
require 'roebe/toplevel_methods/images.rb'
|
57
67
|
# ========================================================================= #
|
58
68
|
# === is_an_image_file?
|
@@ -127,7 +137,10 @@ class Base # === Roebe::Base
|
|
127
137
|
# This method will only work (and is useful) for RBT-specific support.
|
128
138
|
# ========================================================================= #
|
129
139
|
def programs_dir?
|
130
|
-
RBT.programs_dir?
|
140
|
+
unless Object.const_defined?(:RBT) and RBT.respond_to?(:programs_dir?)
|
141
|
+
require 'rbt/toplevel_methods/files_and_directories_related_methods.rb'
|
142
|
+
RBT.programs_dir?
|
143
|
+
end
|
131
144
|
end
|
132
145
|
|
133
146
|
# ========================================================================= #
|
@@ -499,4 +512,20 @@ class Base # === Roebe::Base
|
|
499
512
|
i and File.directory?(i)
|
500
513
|
end
|
501
514
|
|
515
|
+
# ========================================================================= #
|
516
|
+
# === ogrey
|
517
|
+
# ========================================================================= #
|
518
|
+
def ogrey(
|
519
|
+
i = ''
|
520
|
+
)
|
521
|
+
opne grey(i)
|
522
|
+
end
|
523
|
+
|
524
|
+
# ========================================================================= #
|
525
|
+
# === exit_program
|
526
|
+
# ========================================================================= #
|
527
|
+
def exit_program
|
528
|
+
exit(0)
|
529
|
+
end
|
530
|
+
|
502
531
|
end; end
|
data/lib/roebe/base/opnn.rb
CHANGED
@@ -62,4 +62,11 @@ class Base # === Roebe::Base
|
|
62
62
|
system(i)
|
63
63
|
end
|
64
64
|
|
65
|
+
# ========================================================================= #
|
66
|
+
# === orev
|
67
|
+
# ========================================================================= #
|
68
|
+
def orev(i = '')
|
69
|
+
opne "#{rev}#{i}"
|
70
|
+
end
|
71
|
+
|
65
72
|
end; end
|
@@ -35,7 +35,7 @@ class OutputUrlThenOpenInBrowser < Browser # === Roebe::OutputUrlThenOpenInBrows
|
|
35
35
|
rescue LoadError; end
|
36
36
|
|
37
37
|
begin
|
38
|
-
require 'rbt/
|
38
|
+
require 'rbt/toplevel_methods/available_programs.rb'
|
39
39
|
rescue LoadError; end
|
40
40
|
|
41
41
|
# ========================================================================= #
|
@@ -95,7 +95,7 @@ class OutputUrlThenOpenInBrowser < Browser # === Roebe::OutputUrlThenOpenInBrows
|
|
95
95
|
# ========================================================================= #
|
96
96
|
def try_to_require_the_rbt_url_class
|
97
97
|
begin
|
98
|
-
require 'rbt/
|
98
|
+
require 'rbt/cookbooks/url/url.rb'
|
99
99
|
rescue LoadError; end
|
100
100
|
end
|
101
101
|
|
@@ -131,23 +131,26 @@ class OutputUrlThenOpenInBrowser < Browser # === Roebe::OutputUrlThenOpenInBrows
|
|
131
131
|
# =================================================================== #
|
132
132
|
# In that case, "re-write" the original input.
|
133
133
|
# =================================================================== #
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
134
|
+
begin
|
135
|
+
require 'rbt/actions/actions.rb'
|
136
|
+
replacement = RBT.action(:map_this_input_to_that_registered_program, use_this_as_input)
|
137
|
+
rescue LoadError; end
|
138
|
+
orev "No program called #{steelblue(use_this_as_input)} was found."
|
139
|
+
orev 'However had, a binary with that name was found,'
|
140
|
+
orev "belonging to #{royalblue(replacement)}#{rev}, which will next "\
|
141
|
+
"be used"
|
142
|
+
orev 'as input.'
|
141
143
|
use_this_as_input = replacement
|
142
144
|
else # else try for a replacement still
|
143
|
-
possible_replacement =
|
145
|
+
possible_replacement = RBT.action(:map_this_input_to_that_registered_program, use_this_as_input)
|
144
146
|
unless possible_replacement == use_this_as_input
|
145
147
|
use_this_as_input = possible_replacement
|
146
|
-
|
148
|
+
orev "Will be using the name #{steelblue(use_this_as_input)}#{rev} "\
|
149
|
+
"instead."
|
147
150
|
end
|
148
151
|
end
|
149
152
|
end
|
150
|
-
if Object.const_defined?(:RBT) and
|
153
|
+
if Object.const_defined?(:RBT) and RBT.const_defined?(:Cookbooks) and
|
151
154
|
RBT::Cookbooks.const_defined?(:Url)
|
152
155
|
# ===================================================================== #
|
153
156
|
# Simply show the URLs next, via class RBT::Cookbooks::Url
|
@@ -163,8 +166,8 @@ class OutputUrlThenOpenInBrowser < Browser # === Roebe::OutputUrlThenOpenInBrows
|
|
163
166
|
e 'OpenLastUrl does not appear to be available.'
|
164
167
|
end
|
165
168
|
else
|
166
|
-
opne
|
167
|
-
|
169
|
+
opne "#{rev}The class #{steelblue('RBT::Cookbooks::Url')}"\
|
170
|
+
"#{rev} is not available."
|
168
171
|
end
|
169
172
|
end
|
170
173
|
|
@@ -172,4 +175,4 @@ end; end
|
|
172
175
|
|
173
176
|
if __FILE__ == $PROGRAM_NAME
|
174
177
|
Roebe::OutputUrlThenOpenInBrowser.new(ARGV)
|
175
|
-
end # outputurlthenopeninbrowser unimail
|
178
|
+
end # outputurlthenopeninbrowser unimail
|
data/lib/roebe/classes/at.rb
CHANGED
@@ -24,7 +24,7 @@ class At < ::Roebe::Base # === Roebe::At
|
|
24
24
|
|
25
25
|
begin
|
26
26
|
unless Object.const_defined? :MultimediaParadise
|
27
|
-
require 'multimedia_paradise/
|
27
|
+
require 'multimedia_paradise/actions/actions.rb'
|
28
28
|
end
|
29
29
|
rescue LoadError; end
|
30
30
|
|
@@ -268,7 +268,7 @@ class At < ::Roebe::Base # === Roebe::At
|
|
268
268
|
# ======================================================================= #
|
269
269
|
# Next delegate to class AudioPlayer.
|
270
270
|
# ======================================================================= #
|
271
|
-
MultimediaParadise
|
271
|
+
MultimediaParadise.action(:AudioPlayer, :play_all_songs)
|
272
272
|
end
|
273
273
|
|
274
274
|
# ========================================================================= #
|
@@ -42,23 +42,35 @@ class AutoRenameFileBasedOnItsCreationDate < Base # === Roebe::AutoRenameFileBas
|
|
42
42
|
end
|
43
43
|
|
44
44
|
# ========================================================================= #
|
45
|
-
# ===
|
45
|
+
# === do_work_on_these_files
|
46
46
|
# ========================================================================= #
|
47
|
-
def
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
new_filename = "#{creation_date}-#{_}" # This will be the new filename.
|
53
|
-
unless File.exist? new_filename
|
54
|
-
opne "Renaming `#{sfile(_)}#{rev}` to #{sfile(new_filename)}#{rev}."
|
55
|
-
rename_file(_, new_filename)
|
56
|
-
end
|
47
|
+
def do_work_on_these_files(i)
|
48
|
+
if i.is_a? Array
|
49
|
+
i.each {|entry|
|
50
|
+
do_work_on_these_files(entry)
|
51
|
+
}
|
57
52
|
else
|
58
|
-
|
53
|
+
if File.exist? i
|
54
|
+
creation_date = File.mtime(i) # It seems as if the mtime is better than ctime here.
|
55
|
+
creation_date = dd_mm_yyyy(creation_date)
|
56
|
+
new_filename = "#{creation_date}-#{i}" # This will be the new filename.
|
57
|
+
unless File.exist? new_filename
|
58
|
+
opne "#{rev}Renaming `#{sfile(i)}#{rev}` to #{sfile(new_filename)}#{rev}."
|
59
|
+
rename_file(i, new_filename)
|
60
|
+
end
|
61
|
+
else
|
62
|
+
opnn; no_file_exists_at(i)
|
63
|
+
end
|
59
64
|
end
|
60
65
|
end
|
61
66
|
|
67
|
+
# ========================================================================= #
|
68
|
+
# === run (run tag)
|
69
|
+
# ========================================================================= #
|
70
|
+
def run
|
71
|
+
do_work_on_these_files(all_arguments?)
|
72
|
+
end
|
73
|
+
|
62
74
|
# ========================================================================= #
|
63
75
|
# === Roebe::AutoRenameFileBasedOnItsCreationDate[]
|
64
76
|
# ========================================================================= #
|