roebe 0.5.191 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +89 -41
  3. data/bin/create_my_directories +2 -2
  4. data/bin/{ruby_dhcpcd → dhcpcd_wrapper} +1 -1
  5. data/bin/start_lighty +1 -1
  6. data/doc/README.gen +78 -15
  7. data/doc/core/array.md +24 -23
  8. data/doc/core/gem_and_gemspec.md +12 -11
  9. data/doc/core/hash.md +6 -0
  10. data/doc/core/misc.md +23 -20
  11. data/doc/core/regex.md +1 -1
  12. data/doc/core/stderr.md +16 -0
  13. data/doc/deprecations/deprecations.md +2 -1
  14. data/doc/statistics/statistics.md +1 -0
  15. data/lib/roebe/actions/actions.rb +80 -0
  16. data/lib/roebe/base/colours.rb +52 -19
  17. data/lib/roebe/base/misc.rb +30 -1
  18. data/lib/roebe/base/opnn.rb +7 -0
  19. data/lib/roebe/browser/output_url_then_open_in_browser.rb +18 -15
  20. data/lib/roebe/classes/alltagsgeschichte.rb +1 -1
  21. data/lib/roebe/classes/at.rb +2 -2
  22. data/lib/roebe/classes/auto_rename_file_based_on_its_creation_date.rb +24 -12
  23. data/lib/roebe/classes/books/books.rb +234 -142
  24. data/lib/roebe/classes/books/finished_books/finished_books.rb +10 -3
  25. data/lib/roebe/classes/books/menu.rb +25 -16
  26. data/lib/roebe/classes/books/sanitize_this_book_path/sanitize_this_book_path.rb +0 -1
  27. data/lib/roebe/classes/check_yaml.rb +15 -11
  28. data/lib/roebe/classes/compile_kernel.rb +3 -1
  29. data/lib/roebe/classes/contacts/contacts.rb +104 -0
  30. data/lib/roebe/classes/contacts/gui/universal_widgets/contacts.rb +168 -0
  31. data/lib/roebe/classes/contacts/shared_code.rb +344 -0
  32. data/lib/roebe/classes/copy_kernel_config.rb +5 -3
  33. data/lib/roebe/classes/create_desktop_file.rb +1 -1
  34. data/lib/roebe/classes/create_file_skeleton/constants.rb +1 -1
  35. data/lib/roebe/classes/create_file_skeleton/generate_ruby_string.rb +20 -20
  36. data/lib/roebe/classes/create_file_skeleton/reset.rb +19 -16
  37. data/lib/roebe/classes/create_my_directories.rb +12 -10
  38. data/lib/roebe/classes/dhcpcd/{dhcpcd.rb → dhcpcd_wrapper.rb} +137 -95
  39. data/lib/roebe/classes/dhcpcd/kill_dhcpcd.rb +2 -2
  40. data/lib/roebe/classes/do_install.rb +7 -6
  41. data/lib/roebe/classes/done.rb +1 -1
  42. data/lib/roebe/classes/downcase_extension.rb +4 -4
  43. data/lib/roebe/classes/email.rb +44 -40
  44. data/lib/roebe/classes/enable.rb +1 -1
  45. data/lib/roebe/classes/generate_alsa_conf.rb +4 -4
  46. data/lib/roebe/classes/generate_overview_of_the_locally_available_books.rb +5 -3
  47. data/lib/roebe/classes/github.rb +1 -1
  48. data/lib/roebe/classes/kde/install_this_konsole_theme.rb +1 -1
  49. data/lib/roebe/classes/{handle_lighttpd.rb → lighttpd/lighttpd_wrapper.rb} +55 -47
  50. data/lib/roebe/classes/make_gem.rb +49 -35
  51. data/lib/roebe/classes/mbl.rb +6 -4
  52. data/lib/roebe/classes/readme_generator/readme_generator.rb +597 -1
  53. data/lib/roebe/classes/remove_trailing_newline.rb +82 -0
  54. data/lib/roebe/classes/report_how_many_files_are_in_this_directory.rb +83 -0
  55. data/lib/roebe/classes/rxinitrc/constants.rb +7 -5
  56. data/lib/roebe/classes/rxinitrc/rxinitrc.rb +8 -4
  57. data/lib/roebe/classes/set_background.rb +14 -0
  58. data/lib/roebe/classes/show_ten_aliases.rb +15 -3
  59. data/lib/roebe/classes/simple_boot_script.rb +1 -1
  60. data/lib/roebe/classes/size_of.rb +9 -7
  61. data/lib/roebe/classes/tales_from_the_crypt.rb +1 -1
  62. data/lib/roebe/classes/update.rb +4 -11
  63. data/lib/roebe/classes/upload_to_imgur.rb +64 -35
  64. data/lib/roebe/commandline/misc.rb +28 -28
  65. data/lib/roebe/constants/array_install_these_gem_projects.rb +1 -1
  66. data/lib/roebe/constants/constants.rb +8 -1
  67. data/lib/roebe/constants/emojis.rb +0 -19
  68. data/lib/roebe/constants/file_and_directory_constants.rb +2 -2
  69. data/lib/roebe/constants/misc.rb +10 -2
  70. data/lib/roebe/constants/roebe.rb +2 -0
  71. data/lib/roebe/custom_methods/module.rb +45 -16
  72. data/lib/roebe/fonts/fonts.rb +39 -0
  73. data/lib/roebe/gui/universal_widgets/books/books.rb +232 -0
  74. data/lib/roebe/hello_world/hello_world.rb +0 -0
  75. data/lib/roebe/irb/clean_irbrc +1 -0
  76. data/lib/roebe/math/log10.rb +3 -3
  77. data/lib/roebe/math/the_collatz_problem.rb +104 -0
  78. data/lib/roebe/{toplevel_methods/lighttpd.rb → requires/require_lighttpd.rb} +2 -2
  79. data/lib/roebe/shell/shell/shell.rb +6 -6
  80. data/lib/roebe/shell_scripts/README.md +0 -0
  81. data/lib/roebe/shell_scripts/bashrc +0 -0
  82. data/lib/roebe/shell_scripts/konsole_tabs.sh +6 -0
  83. data/lib/roebe/shell_scripts/lfs/001_binutils_1.sh +10 -2
  84. data/lib/roebe/shell_scripts/lfs/002_gcc_1.sh +33 -3
  85. data/lib/roebe/shell_scripts/lfs/003_linux_1.sh +1 -0
  86. data/lib/roebe/shell_scripts/lfs/004_glibc_1.sh +5 -2
  87. data/lib/roebe/shell_scripts/lfs/005_libstdc++_1.sh +8 -1
  88. data/lib/roebe/shell_scripts/lfs/007_ncurses_2.sh +5 -2
  89. data/lib/roebe/shell_scripts/lfs/020_xz_2.sh +5 -4
  90. data/lib/roebe/shell_scripts/lfs/022_gcc_2.sh +15 -1
  91. data/lib/roebe/shell_scripts/lfs/025_ruby_2.sh +13 -0
  92. data/lib/roebe/shell_scripts/lfs/README.md +0 -0
  93. data/lib/roebe/shell_scripts/lfs/lfs_build_variables.sh +56 -16
  94. data/lib/roebe/toplevel_methods/module_methods.rb +5 -3
  95. data/lib/roebe/toplevel_methods/to_mp3.rb +1 -1
  96. data/lib/roebe/version/version.rb +2 -2
  97. data/lib/roebe/wasm/README.md +7 -0
  98. data/lib/roebe/wasm/enable_simple_puts_output.rb +9 -0
  99. data/lib/roebe/wasm/wasm_examples.html +43 -0
  100. data/lib/roebe/www/LEDS/LEDS.rb +35 -25
  101. data/lib/roebe/www/RNA/RNA.cgi +42 -1
  102. data/lib/roebe/www/algorithms/algorithms.rb +40 -0
  103. data/lib/roebe/www/analytical_chemistry/content.md +6 -0
  104. data/lib/roebe/www/animals/animals.cgi +25 -0
  105. data/lib/roebe/www/bioanalytik/bioanalytik.cgi +90 -0
  106. data/lib/roebe/www/biotechnology/biotechnology.rb +39 -3
  107. data/lib/roebe/www/cellbiology/cellbiology.rb +19 -2
  108. data/lib/roebe/www/chemistry/S/303/244uren_Basen_und_der_pH_Wert/S/303/244uren_Basen_und_der_pH_Wert.cgi +242 -0
  109. data/lib/roebe/www/chemistry/chemistry.rb +10 -258
  110. data/lib/roebe/www/chemistry/css_rules.css +67 -0
  111. data/lib/roebe/www/chemistry/die_quantenzahlen/die_quantenzahlen.cgi +123 -0
  112. data/lib/roebe/www/chemistry/funktionelle_gruppen_in_der_chemie/funktionelle_gruppen_in_der_chemie.cgi +52 -0
  113. data/lib/roebe/www/chrome_and_chromium/chrome_and_chromium.rb +37 -42
  114. data/lib/roebe/www/chromium +1 -0
  115. data/lib/roebe/www/cognitive_biology/cognitive_biology.cgi +18 -3
  116. data/lib/roebe/www/erste_hilfe/erste_hilfe.cgi +215 -62
  117. data/lib/roebe/www/fonts/fonts.cgi +245 -0
  118. data/lib/roebe/www/genomics/genomics.rb +4 -0
  119. data/lib/roebe/www/hardware/computersysteme/computersysteme.rb +117 -102
  120. data/lib/roebe/www/hardware/netzteile/netzteile.cgi +94 -0
  121. data/lib/roebe/www/immunology/immunology.rb +131 -7
  122. data/lib/roebe/www/insekten/insekten.md +27 -0
  123. data/lib/roebe/www/lighttpd/autogenerated_lighttpd.conf +7 -3
  124. data/lib/roebe/www/lighttpd/configuration/index.conf +7 -4
  125. data/lib/roebe/www/lighttpd/lighttpd.rb +6 -6
  126. data/lib/roebe/www/linux/antiX/antiX.rb +7 -4
  127. data/lib/roebe/www/linux/linux.rb +9 -11
  128. data/lib/roebe/www/linux/linuxmint/linuxmint.rb +33 -0
  129. data/lib/roebe/www/linux/slackware/slackware.rb +136 -27
  130. data/lib/roebe/www/linux/void/void.rb +34 -8
  131. data/lib/roebe/www/linux_commands/linux_commands.rb +6 -6
  132. data/lib/roebe/www/lyrics/lyrics.rb +1 -1
  133. data/lib/roebe/www/metabolic_pathways/metabolic_pathways.rb +5 -1
  134. data/lib/roebe/www/microbiology/microbiology.rb +17 -2
  135. data/lib/roebe/www/mikrobielle_physiologie/mikrobielle_physiologie.cgi +1086 -2
  136. data/lib/roebe/www/mitochondria/mitochondria.cgi +16 -2
  137. data/lib/roebe/www/module_www.rb +2 -3
  138. data/lib/roebe/www/neurobiology/neurobiology.rb +20 -3
  139. data/lib/roebe/www/pdf/pdf.rb +13 -0
  140. data/lib/roebe/www/physics/physics.rb +20 -4
  141. data/lib/roebe/www/physiology/physiology.rb +5 -1
  142. data/lib/roebe/www/play_this_video_file/play_this_video_file.cgi +1 -1
  143. data/lib/roebe/www/programming_advice/programming_advice.cgi +36 -0
  144. data/lib/roebe/www/programming_advice/programming_advice.md +358 -0
  145. data/lib/roebe/www/psychologie/psychologie.rb +7 -1
  146. data/lib/roebe/www/science/science.rb +6 -0
  147. data/lib/roebe/www/sex_and_reproduction/sex_and_reproduction.cgi +18 -2
  148. data/lib/roebe/www/statistik/statistik.rb +6 -1
  149. data/lib/roebe/www/structural_biology/structural_biology.cgi +18 -0
  150. data/lib/roebe/www/the_cell_cycle/the_cell_cycle.cgi +27 -0
  151. data/lib/roebe/www/video/video.rb +1 -1
  152. data/lib/roebe/www/virology/virology.rb +12 -1
  153. data/lib/roebe/www/war_in_Ukraine_2022/war_in_Ukraine_2022.rb +70 -28
  154. data/lib/roebe/www/waschmaschinen/waschmaschinen.rb +5 -4
  155. data/lib/roebe/www/xfce/xfce.cgi +5 -4
  156. data/lib/roebe/www/xorg/xorg.rb +3 -202
  157. data/lib/roebe/www/yeast/yeast.rb +4 -2
  158. data/lib/roebe/www/yubiko/yubiko.cgi +49 -0
  159. data/lib/roebe/yaml/{autostart_these_programs.yml → autostart_these_programs/autostart_these_programs.yml} +7 -6
  160. data/lib/roebe/yaml/books/favourite_books.yml +11 -9
  161. data/lib/roebe/yaml/directory_structure.yml +2 -0
  162. data/lib/roebe/yaml/use_this_editor/use_this_editor.yml +1 -0
  163. metadata +39 -20
  164. data/lib/roebe/classes/readme_generator/constants.rb +0 -21
  165. data/lib/roebe/classes/readme_generator/initialize.rb +0 -38
  166. data/lib/roebe/classes/readme_generator/misc.rb +0 -548
  167. data/lib/roebe/classes/readme_generator/reset.rb +0 -28
  168. data/lib/roebe/classes/readme_generator/run.rb +0 -20
  169. data/lib/roebe/shell_scripts/lfs/lfs_variables.sh +0 -31
  170. data/lib/roebe/www/cognitive_biology/cognitive_biology.html +0 -40634
  171. data/lib/roebe/www/mikrobielle_physiologie/mikrobielle_physiologie.rb +0 -1055
  172. data/lib/roebe/www/programming_advice/programming_advice.yml +0 -31
  173. data/lib/roebe/yaml/main_editor.yml +0 -1
@@ -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(i = '', use_colours = use_colours?)
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(i = '', use_colours = use_colours?)
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(i = '', use_colours = use_colours?)
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(i = '', use_colours = use_colours?)
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(i = '', use_colours = use_colours?)
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(i = '', use_colours = use_colours?)
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(i = '', use_colours = use_colours?)
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(i = '')
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
- COLOURS.eparse(i)
342
+ ::Colours.eparse(i)
310
343
  else
311
344
  e i
312
345
  end
@@ -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
@@ -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/misc/map_this_input_to_that_registered_program.rb'
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/utility_scripts/url.rb'
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
- require 'rbt/misc/map_this_input_to_that_registered_program.rb'
135
- replacement = ::RBT.map_this_input_to_that_registered_program(use_this_as_input)
136
- opne "No program called #{steelblue(use_this_as_input)} was found."
137
- opne 'However had, a binary with that name was found,'
138
- opne 'belonging to '+royalblue(replacement)+', which will '\
139
- 'next be used'
140
- opne 'as input.'
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 = ::RBT.map_this_input_to_that_registered_program(use_this_as_input)
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
- opne 'Will be using the name '+steelblue(use_this_as_input)+' instead.'
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 'The class '+steelblue('RBT::Cookbooks::Url')+
167
- ' is not available.'
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
@@ -27,7 +27,7 @@ class Alltagsgeschichte < Base # === Roebe::Alltagsgeschichte
27
27
  rescue LoadError; end
28
28
 
29
29
  begin
30
- require 'multimedia_paradise/constants/file_constants.rb'
30
+ require 'multimedia_paradise/constants/constants.rb'
31
31
  rescue LoadError; end
32
32
 
33
33
  begin
@@ -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/audio/audio_player/audio_player.rb'
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::AudioPlayer.new(:play_all_songs)
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
- # === run (run tag)
45
+ # === do_work_on_these_files
46
46
  # ========================================================================= #
47
- def run
48
- _ = first_argument?
49
- if File.exist? _
50
- creation_date = File.ctime(_)
51
- creation_date = dd_mm_yyyy(creation_date)
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
- opnn; no_file_exists_at(_)
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
  # ========================================================================= #