roebe 0.5.191 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


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

Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -26
  3. data/bin/create_my_directories +2 -2
  4. data/bin/{ruby_dhcpcd → dhcpcd_wrapper} +1 -1
  5. data/doc/README.gen +12 -0
  6. data/doc/core/array.md +24 -23
  7. data/doc/core/gem_and_gemspec.md +12 -11
  8. data/doc/core/misc.md +23 -20
  9. data/doc/statistics/statistics.md +1 -0
  10. data/lib/roebe/actions/actions.rb +68 -0
  11. data/lib/roebe/base/misc.rb +14 -1
  12. data/lib/roebe/browser/output_url_then_open_in_browser.rb +8 -6
  13. data/lib/roebe/classes/alltagsgeschichte.rb +1 -1
  14. data/lib/roebe/classes/at.rb +2 -2
  15. data/lib/roebe/classes/auto_rename_file_based_on_its_creation_date.rb +24 -12
  16. data/lib/roebe/classes/books/books.rb +159 -117
  17. data/lib/roebe/classes/books/menu.rb +8 -7
  18. data/lib/roebe/classes/books/sanitize_this_book_path/sanitize_this_book_path.rb +0 -1
  19. data/lib/roebe/classes/check_yaml.rb +15 -11
  20. data/lib/roebe/classes/compile_kernel.rb +3 -1
  21. data/lib/roebe/classes/copy_kernel_config.rb +5 -3
  22. data/lib/roebe/classes/create_desktop_file.rb +1 -1
  23. data/lib/roebe/classes/create_my_directories.rb +12 -10
  24. data/lib/roebe/classes/dhcpcd/{dhcpcd.rb → dhcpcd_wrapper.rb} +137 -95
  25. data/lib/roebe/classes/dhcpcd/kill_dhcpcd.rb +2 -2
  26. data/lib/roebe/classes/do_install.rb +7 -6
  27. data/lib/roebe/classes/done.rb +1 -1
  28. data/lib/roebe/classes/downcase_extension.rb +4 -4
  29. data/lib/roebe/classes/email.rb +44 -40
  30. data/lib/roebe/classes/enable.rb +1 -1
  31. data/lib/roebe/classes/github.rb +1 -1
  32. data/lib/roebe/classes/kde/install_this_konsole_theme.rb +1 -1
  33. data/lib/roebe/classes/make_gem.rb +29 -27
  34. data/lib/roebe/classes/readme_generator/readme_generator.rb +597 -1
  35. data/lib/roebe/classes/report_how_many_files_are_in_this_directory.rb +83 -0
  36. data/lib/roebe/classes/set_background.rb +14 -0
  37. data/lib/roebe/classes/show_ten_aliases.rb +15 -3
  38. data/lib/roebe/classes/tales_from_the_crypt.rb +1 -1
  39. data/lib/roebe/classes/update.rb +2 -1
  40. data/lib/roebe/constants/array_install_these_gem_projects.rb +1 -1
  41. data/lib/roebe/constants/roebe.rb +2 -0
  42. data/lib/roebe/custom_methods/module.rb +16 -0
  43. data/lib/roebe/fonts/fonts.rb +39 -0
  44. data/lib/roebe/hello_world/hello_world.rb +0 -0
  45. data/lib/roebe/math/log10.rb +3 -3
  46. data/lib/roebe/math/the_collatz_problem.rb +104 -0
  47. data/lib/roebe/shell/shell/shell.rb +6 -6
  48. data/lib/roebe/shell_scripts/lfs/002_gcc_1.sh +13 -1
  49. data/lib/roebe/shell_scripts/lfs/003_linux_1.sh +1 -0
  50. data/lib/roebe/shell_scripts/lfs/007_ncurses_2.sh +4 -1
  51. data/lib/roebe/shell_scripts/lfs/020_xz_2.sh +5 -5
  52. data/lib/roebe/shell_scripts/lfs/021_binutils_2.sh +1 -0
  53. data/lib/roebe/shell_scripts/lfs/022_gcc_2.sh +12 -1
  54. data/lib/roebe/shell_scripts/lfs/025_ruby_2.sh +13 -0
  55. data/lib/roebe/shell_scripts/lfs/lfs_build_variables.sh +48 -8
  56. data/lib/roebe/toplevel_methods/to_mp3.rb +1 -1
  57. data/lib/roebe/version/version.rb +2 -2
  58. data/lib/roebe/wasm/README.md +7 -0
  59. data/lib/roebe/wasm/enable_simple_puts_output.rb +9 -0
  60. data/lib/roebe/wasm/wasm_examples.html +43 -0
  61. data/lib/roebe/www/RNA/RNA.cgi +42 -1
  62. data/lib/roebe/www/algorithms/algorithms.rb +22 -0
  63. data/lib/roebe/www/analytical_chemistry/content.md +3 -0
  64. data/lib/roebe/www/animals/animals.cgi +25 -0
  65. data/lib/roebe/www/bioanalytik/bioanalytik.cgi +90 -0
  66. data/lib/roebe/www/cellbiology/cellbiology.rb +16 -2
  67. data/lib/roebe/www/chemistry/S/303/244uren_Basen_und_der_pH_Wert/S/303/244uren_Basen_und_der_pH_Wert.cgi +242 -0
  68. data/lib/roebe/www/chemistry/chemistry.rb +10 -258
  69. data/lib/roebe/www/chemistry/css_rules.css +67 -0
  70. data/lib/roebe/www/chemistry/die_quantenzahlen/die_quantenzahlen.cgi +123 -0
  71. data/lib/roebe/www/chemistry/funktionelle_gruppen_in_der_chemie/funktionelle_gruppen_in_der_chemie.cgi +52 -0
  72. data/lib/roebe/www/erste_hilfe/erste_hilfe.cgi +212 -62
  73. data/lib/roebe/www/fonts/fonts.cgi +245 -0
  74. data/lib/roebe/www/hardware/computersysteme/computersysteme.rb +117 -102
  75. data/lib/roebe/www/hardware/netzteile/netzteile.cgi +94 -0
  76. data/lib/roebe/www/immunology/immunology.rb +101 -7
  77. data/lib/roebe/www/linux/antiX/antiX.rb +7 -4
  78. data/lib/roebe/www/linux/linux.rb +9 -11
  79. data/lib/roebe/www/linux/linuxmint/linuxmint.rb +33 -0
  80. data/lib/roebe/www/linux/slackware/slackware.rb +136 -27
  81. data/lib/roebe/www/lyrics/lyrics.rb +1 -1
  82. data/lib/roebe/www/microbiology/microbiology.rb +17 -2
  83. data/lib/roebe/www/mikrobielle_physiologie/mikrobielle_physiologie.cgi +1086 -2
  84. data/lib/roebe/www/mitochondria/mitochondria.cgi +16 -2
  85. data/lib/roebe/www/module_www.rb +2 -3
  86. data/lib/roebe/www/neurobiology/neurobiology.rb +20 -3
  87. data/lib/roebe/www/pdf/pdf.rb +13 -0
  88. data/lib/roebe/www/physics/physics.rb +20 -4
  89. data/lib/roebe/www/physiology/physiology.rb +5 -1
  90. data/lib/roebe/www/play_this_video_file/play_this_video_file.cgi +1 -1
  91. data/lib/roebe/www/programming_advice/programming_advice.cgi +36 -0
  92. data/lib/roebe/www/programming_advice/programming_advice.md +349 -0
  93. data/lib/roebe/www/psychologie/psychologie.rb +7 -1
  94. data/lib/roebe/www/science/science.rb +6 -0
  95. data/lib/roebe/www/sex_and_reproduction/sex_and_reproduction.cgi +18 -2
  96. data/lib/roebe/www/structural_biology/structural_biology.cgi +16 -0
  97. data/lib/roebe/www/the_cell_cycle/the_cell_cycle.cgi +27 -0
  98. data/lib/roebe/www/video/video.rb +1 -1
  99. data/lib/roebe/www/virology/virology.rb +12 -1
  100. data/lib/roebe/www/war_in_Ukraine_2022/war_in_Ukraine_2022.rb +26 -8
  101. data/lib/roebe/www/xorg/xorg.rb +3 -202
  102. data/lib/roebe/yaml/books/favourite_books.yml +6 -8
  103. data/lib/roebe/yaml/directory_structure.yml +1 -0
  104. metadata +26 -15
  105. data/lib/roebe/classes/readme_generator/constants.rb +0 -21
  106. data/lib/roebe/classes/readme_generator/initialize.rb +0 -38
  107. data/lib/roebe/classes/readme_generator/misc.rb +0 -548
  108. data/lib/roebe/classes/readme_generator/reset.rb +0 -28
  109. data/lib/roebe/classes/readme_generator/run.rb +0 -20
  110. data/lib/roebe/shell_scripts/lfs/lfs_variables.sh +0 -31
  111. data/lib/roebe/www/mikrobielle_physiologie/mikrobielle_physiologie.rb +0 -1055
  112. data/lib/roebe/www/programming_advice/programming_advice.yml +0 -31
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a131bfe77e783074db388059a14ea1d5037e8d4c17902023575f1c56c33e13dc
4
- data.tar.gz: aa0e3baec297cc14136f29f35f9231af91731f7f629702c8dfc3d266e46fadce
3
+ metadata.gz: dc76d3d2783b28b320e7c0195d99ce9836861f1d1d6d89a7f62e28ea39b218f8
4
+ data.tar.gz: 1cba6377d6c68cda3f7fa894b562e63b1d66d56a33c6cb8795680e013b647548
5
5
  SHA512:
6
- metadata.gz: e1d7fc582dc0543e5136d803f8f8b43c5b8b6fbf036fa7c14ba2ec4fb51bd5558f19ab42ba52cf98f67c576499fe3d28e78eecc7c0bab46df08310f8adcbb11e
7
- data.tar.gz: 22de8a6e62bb77fab48cad54b76d7b7417e65fa7077eae864605514c906c6f3cbd84581246fbf3ba86336265dc7a038ad0847ecc49fd5ea0f271d5da547de0af
6
+ metadata.gz: 42941f6cce792a2ca5ad1e9bbba5a02a07100803e6f204e148e0e4f2d19af88b2cb6890bd50d86871cc6c82847a60b82652376779fd3b02011070a053f928b92
7
+ data.tar.gz: 04a2a8bcfac07ff8b9bd107950205254f220068e8da292c6402d8ae49f6b088521622a85684dd9f0049f0ab6714f29c08cfcbd2498d6efd865971927092c5c9f
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  [![forthebadge](https://forthebadge.com/images/badges/made-with-ruby.svg)](https://www.ruby-lang.org/en/)
3
3
  [![Gem Version](https://badge.fury.io/rb/roebe.svg)](https://badge.fury.io/rb/roebe)
4
4
 
5
- This gem was <b>last updated</b> on the <span style="color: darkblue; font-weight: bold">31.01.2024</span> (dd.mm.yyyy notation), at <span style="color: steelblue; font-weight: bold">00:15:47</span> o'clock.
5
+ This gem was <b>last updated</b> on the <span style="color: darkblue; font-weight: bold">12.03.2024</span> (dd.mm.yyyy notation), at <span style="color: steelblue; font-weight: bold">15:10:41</span> o'clock.
6
6
 
7
7
  ## Introducing the Roebe project
8
8
 
@@ -5752,6 +5752,18 @@ have to install the emoji_paradise gem, via:
5752
5752
 
5753
5753
  gem install emoji_paradise
5754
5754
 
5755
+ ## Roebe.actions()
5756
+
5757
+ Roebe.actions() was added in March 2024. The idea is that for every
5758
+ important (major) activity, related to the roebe gem, we bundle
5759
+ this through the method Roebe.actions().
5760
+
5761
+ This thus constitutes a generic entry point, which in turn can then
5762
+ be used towards other entry points of other gems, without needing
5763
+ to require any specific .rb file or know the class-names of such
5764
+ files, as-is. We thus gain a <b>lot</b> more flexibility that
5765
+ way.
5766
+
5755
5767
  ## Useful links, blogs, articles about the Ruby programming language
5756
5768
 
5757
5769
  This subsection contains some links that may possibly be useful to you when
@@ -5840,29 +5852,14 @@ gem owner eventually:
5840
5852
  see
5841
5853
  https://blog.rubygems.org/2022/06/13/making-packages-more-secure.html
5842
5854
 
5843
- Mandatory 2FA will eventually be extended to all rubygems.org developers and
5844
- maintainers. As I can not use 2FA, for reasons I will skip explaining here,
5845
- this means that my projects will eventually be removed, as I no longer
5846
- have any control over my projects hosted on rubygems.org (because I
5847
- can not use 2FA).
5848
-
5849
- At that point, I no longer have any control what is done to my projects
5850
- since whoever is controlling the gems ecosystem took away our control
5851
- here. I am not sure at which point ruby became corporate-controlled -
5852
- that was not the case several years ago, so something has
5853
- changed.
5854
-
5855
- Ruby also only allows 2FA users to participate on the issue tracker these
5856
- days:
5857
-
5858
- https://bugs.ruby-lang.org/issues/18800
5859
-
5860
- But this has been reverted some months ago, so it is no longer applicable.
5861
- Suffice to say that I do not think that we should only be allowed to
5862
- interact on the world wide web when some 'authority' authenticated us,
5863
- such as via mandatory 2FA, so I hope this won't come back again.
5864
-
5865
- Fighting spam is a noble goal, but when it also means you lock out
5866
- real human people then this is definitely NOT a good situation
5867
- to be had.
5855
+ However had, that has been reverted again, so I decided to shorten
5856
+ this paragraph. Mandatory 2FA may exclude users who do not have a
5857
+ smartphone device or other means to 'identify'. I do not feel it is
5858
+ a fair assumption by others to be made that non-identified people may
5859
+ not contribute code, which is why I reject it. Mandatory 2FA would mean
5860
+ an end to all my projects on rubygems.org, so let's hope it will never
5861
+ happen. (Keep in mind that I refer to mandatory 2FA; I have no qualms
5862
+ for people who use 2FA on their own, but this carrot-and-stick strategy
5863
+ by those who control the rubygems infrastructure is a very bad one to
5864
+ pursue.
5868
5865
 
@@ -2,6 +2,6 @@
2
2
  # Encoding: UTF-8
3
3
  # frozen_string_literal: true
4
4
  # =========================================================================== #
5
- require 'roebe/classes/create_my_directories.rb'
5
+ require 'roebe/actions/actions.rb'
6
6
 
7
- Roebe::CreateMyDirectories.new(ARGV)
7
+ Roebe.actions(:CreateMyDirectories, ARGV)
@@ -2,6 +2,6 @@
2
2
  # Encoding: UTF-8
3
3
  # frozen_string_literal: true
4
4
  # =========================================================================== #
5
- require 'roebe/classes/dhcpcd/dhcpcd.rb'
5
+ require 'roebe/classes/dhcpcd/dhcpcd_wrapper.rb'
6
6
 
7
7
  Roebe.dhcpcd(ARGV)
data/doc/README.gen CHANGED
@@ -5748,6 +5748,18 @@ have to install the emoji_paradise gem, via:
5748
5748
 
5749
5749
  gem install emoji_paradise
5750
5750
 
5751
+ ## Roebe.actions()
5752
+
5753
+ Roebe.actions() was added in March 2024. The idea is that for every
5754
+ important (major) activity, related to the roebe gem, we bundle
5755
+ this through the method Roebe.actions().
5756
+
5757
+ This thus constitutes a generic entry point, which in turn can then
5758
+ be used towards other entry points of other gems, without needing
5759
+ to require any specific .rb file or know the class-names of such
5760
+ files, as-is. We thus gain a <b>lot</b> more flexibility that
5761
+ way.
5762
+
5751
5763
  ## Useful links, blogs, articles about the Ruby programming language
5752
5764
 
5753
5765
  This subsection contains some links that may possibly be useful to you when
data/doc/core/array.md CHANGED
@@ -1,3 +1,27 @@
1
+ ## How can we check whether something is included in an array or not? (inarray, is in array, in_array)
2
+
3
+ a = [ "a", "b", "c" ] #
4
+ a.include?("b") # true
5
+
6
+ If you want to do this for an object called x and the array y
7
+
8
+ y.member?(x)
9
+
10
+ ## I am used to perl's qw(). How to make this in ruby? Is there a shortcut for creating arrays? (quoted words)
11
+
12
+ x = %w(63 362 63632 dog cat)
13
+
14
+ The lowercased %w extracts space-separated tokens into array elements.
15
+
16
+ The uppercased %W does double-quoted string subtiutions, which is
17
+ useful if you want to use variables.
18
+
19
+ Examples for %W:
20
+
21
+ x = %W( one two -#{Time.now}-)
22
+ x = %W( one #two three #{Time.now} ) # => ["one", "#two", "three", "2024-02-25 02:46:21 +0000"]
23
+
24
+
1
25
  ## Create an Array with 5 random numbers:
2
26
 
3
27
  Array.new(5) { rand(10) }
@@ -602,29 +626,6 @@
602
626
  (1..5000).select {|i| i % 3 == 0 } # Wählt 3,6,9,12
603
627
  etc.. aus
604
628
 
605
- ## How can I check whether something is included in
606
- an array or not? (inarray, is in array, in_array)
607
- a = [ "a", "b", "c" ] #
608
- a.include?("b") # true
609
-
610
- If you want to do this for an object called x and the array y
611
-
612
- y.member?(x)
613
-
614
- frage("I am used to perl's qw(). How to make this in ruby? Is
615
- there a shortcut for creating arrays? (quoted words)")+
616
- x = %w(63 362 63632 dog cat)
617
-
618
- The lowercased %w extracts space-separated
619
- tokens into array elements.
620
-
621
- The uppercased %W does double-quoted string subtiutions.
622
- Useful if you want to use variables.
623
-
624
- Beispiel für %W:
625
-
626
- x=%W( one two -#{Time.now}-)
627
-
628
629
  ## Wie suche ich nach einem String in einem Array?','grep
629
630
  array = ["one","two","three","four"]
630
631
  array.grep("three")
@@ -373,22 +373,23 @@
373
373
  include Gem::Text
374
374
  levenshtein_distance 'shevy', 'chevy' # => 1
375
375
 
376
- # ===================================================================== #
377
- # === How to compare two program versions with one another
378
- # ===================================================================== #
379
- ## Wie kann ich verschiedene Versionen
380
- miteinander vergleichen?
381
- Gem::Version.new('0.4.1') > Gem::Version.new('0.10.1')
382
376
 
383
- Um den <b>dependency check</b> zu ignorieren (force install)
384
- geht dies hier (bzw <b>gemif</b>):
377
+ ## How to compare two program versions with one another
378
+
379
+ Use:
385
380
 
386
- gem install -f lalala
381
+ Gem::Version.new('0.4.1') > Gem::Version.new('0.10.1')
382
+
383
+ Um den <b>dependency check</b> zu ignorieren (force install)
384
+ geht dies hier (bzw <b>gemif</b>):
385
+
386
+ gem install -f lalala
387
387
 
388
388
  ## Kann ich es vermeiden, .gemrc zu laden?
389
- Ja. Verwende:
390
389
 
391
- --config-file
390
+ Yes. Make use of:
391
+
392
+ --config-file
392
393
 
393
394
  ## Wie erhalte ich das Bindir Verzeichnis von Gem?
394
395
 
data/doc/core/misc.md CHANGED
@@ -1,3 +1,26 @@
1
+ ## How can we read data from a .rb file without ruby evaluating this data?
2
+
3
+ Make use of:
4
+
5
+ p DATA.read
6
+ __END__
7
+
8
+ DATA.read liest die Information ein, die nach __END__ geschrieben
9
+ ist. Man kann dies sogar verwenden um Configurations-Dateien in
10
+ einer .rb Datei zu speichern.
11
+
12
+ Die Konstante <b>DATA</b> ist verfügbar sobald die __END__
13
+ Direktive in einer .rb Datei drinnen steht. Alles was dieser
14
+ __END__ Direktive folgt ist dann Inhalt von DATA.
15
+
16
+ DATA ist leider nur für $0 verfügbar.
17
+
18
+ DATA ist ein File Objekt. Man kann daher auch <b>DATA.pos</b>
19
+ verwenden.
20
+
21
+ Man kann mittels <b>__END__</b> auch direkt YAML Code in
22
+ ein .rb <b>Skript</b> einfügen.
23
+
1
24
  ## How do we find out how many arguments a method will accept? (alos known as arity)
2
25
 
3
26
  This is possible via the <b>.arity</b> method.
@@ -1150,26 +1173,6 @@
1150
1173
 
1151
1174
  d.send(:attr=, 99) # macht das selbe wie oben, nur verboser.
1152
1175
 
1153
- ## Wie lese ich Daten von einer .rb Datei ohne das Ruby
1154
- diese Daten interpretiert?','__END__
1155
- p DATA.read
1156
- __END__
1157
-
1158
- DATA.read liest die Information ein, die nach __END__ geschrieben
1159
- ist. Man kann dies sogar verwenden um Configurations-Dateien in
1160
- einer .rb Datei zu speichern.
1161
-
1162
- anm('Die Konstante <b>DATA</b> ist verfügbar sobald die __END__
1163
- Direktive in einer .rb Datei drinnen steht. Alles was dieser
1164
- __END__ Direktive folgt ist dann Inhalt von DATA.
1165
- anm('DATA ist leider nur für $0 verfügbar.
1166
-
1167
- anm('DATA ist ein File Objekt. Man kann daher auch <b>DATA.pos</b>
1168
- verwenden.
1169
-
1170
- Man kann mittels <b>__END__</b> auch direkt YAML Code in
1171
- ein .rb <b>Skript</b> einfügen.
1172
-
1173
1176
  ## Wie erhalte ich das Default External Ruby Encoding via
1174
1177
  Commandline?
1175
1178
  ruby -e 'p Encoding.default_external'
@@ -94,5 +94,6 @@ Total gems (ideally store it at the end of the month):
94
94
  Total gems 172,440 (Jul 2022), Total users 169,484 # ← 14.07.2022
95
95
  Total gems 174,304 (Dec 2022), Total users 172,523 # ← 04.12.2022
96
96
  Total gems 178,865 (Nov 2023), Total users 183,129 # ← 16.11.2023
97
+ Total gems 179,738 (Feb 2024), Total users 186,502 # ← 02.02.2024
97
98
 
98
99
  # https://rubygems.org/stats
@@ -0,0 +1,68 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Roebe::Actions
6
+ # =========================================================================== #
7
+ # require 'roebe/actions/actions.rb'
8
+ # dataset = Roebe.actions(:contacts_dataset)
9
+ # Roebe.actions(ARGV)
10
+ # =========================================================================== #
11
+ module Roebe
12
+
13
+ require 'roebe/constants/roebe.rb'
14
+
15
+ # ========================================================================= #
16
+ # === Roebe.actions (action tag, actions tag)
17
+ # ========================================================================= #
18
+ def self.actions(
19
+ action_that_is_desired = nil,
20
+ optional_argument1 = ARGV, # This is typically the main input to this method.
21
+ options_hash = {},
22
+ &block
23
+ )
24
+ # ======================================================================= #
25
+ # First this method will handle Arrays:
26
+ # ======================================================================= #
27
+ if action_that_is_desired.is_a? Array
28
+ action_that_is_desired.each {|this_action|
29
+ Roebe.actions(
30
+ this_action,
31
+ optional_argument1,
32
+ options_hash,
33
+ &block
34
+ )
35
+ }
36
+ else
37
+ _ = optional_argument1 # Easier "pointer" here.
38
+ case action_that_is_desired # (case tag)
39
+ # ======================================================================= #
40
+ # === :contacts_dataset
41
+ #
42
+ # Usage example:
43
+ #
44
+ # dataset = Roebe.actions(:contacts)
45
+ #
46
+ # ======================================================================= #
47
+ when :contacts_dataset,
48
+ :ContactsDataset,
49
+ :contacts
50
+ require 'yaml'
51
+ this_file = Roebe.file_contacts
52
+ return YAML.load_file(this_file)
53
+ # ======================================================================= #
54
+ # === :create_my_directories
55
+ # ======================================================================= #
56
+ when :create_my_directories,
57
+ :CreateMyDirectories
58
+ require 'roebe/classes/create_my_directories.rb'
59
+ Roebe::CreateMyDirectories.new(_, &block)
60
+ end
61
+ end
62
+ end; self.instance_eval { alias action actions } # === Roebe.action
63
+
64
+ end
65
+
66
+ if __FILE__ == $PROGRAM_NAME
67
+ Roebe.actions(ARGV)
68
+ end # roebe_actions
@@ -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
  # ========================================================================= #
@@ -35,6 +35,7 @@ class OutputUrlThenOpenInBrowser < Browser # === Roebe::OutputUrlThenOpenInBrows
35
35
  rescue LoadError; end
36
36
 
37
37
  begin
38
+ require 'rbt/toplevel_methods/available_programs.rb'
38
39
  require 'rbt/misc/map_this_input_to_that_registered_program.rb'
39
40
  rescue LoadError; end
40
41
 
@@ -95,7 +96,7 @@ class OutputUrlThenOpenInBrowser < Browser # === Roebe::OutputUrlThenOpenInBrows
95
96
  # ========================================================================= #
96
97
  def try_to_require_the_rbt_url_class
97
98
  begin
98
- require 'rbt/utility_scripts/url.rb'
99
+ require 'rbt/cookbooks/url/url.rb'
99
100
  rescue LoadError; end
100
101
  end
101
102
 
@@ -135,7 +136,7 @@ class OutputUrlThenOpenInBrowser < Browser # === Roebe::OutputUrlThenOpenInBrows
135
136
  replacement = ::RBT.map_this_input_to_that_registered_program(use_this_as_input)
136
137
  opne "No program called #{steelblue(use_this_as_input)} was found."
137
138
  opne 'However had, a binary with that name was found,'
138
- opne 'belonging to '+royalblue(replacement)+', which will '\
139
+ opne 'belonging to '+royalblue(replacement)+rev+', which will '\
139
140
  'next be used'
140
141
  opne 'as input.'
141
142
  use_this_as_input = replacement
@@ -143,11 +144,12 @@ class OutputUrlThenOpenInBrowser < Browser # === Roebe::OutputUrlThenOpenInBrows
143
144
  possible_replacement = ::RBT.map_this_input_to_that_registered_program(use_this_as_input)
144
145
  unless possible_replacement == use_this_as_input
145
146
  use_this_as_input = possible_replacement
146
- opne 'Will be using the name '+steelblue(use_this_as_input)+' instead.'
147
+ opne "#{rev}Will be using the name #{steelblue(use_this_as_input)}#{rev} "\
148
+ "instead."
147
149
  end
148
150
  end
149
151
  end
150
- if Object.const_defined?(:RBT) and
152
+ if Object.const_defined?(:RBT) and RBT.const_defined?(:Cookbooks) and
151
153
  RBT::Cookbooks.const_defined?(:Url)
152
154
  # ===================================================================== #
153
155
  # Simply show the URLs next, via class RBT::Cookbooks::Url
@@ -163,8 +165,8 @@ class OutputUrlThenOpenInBrowser < Browser # === Roebe::OutputUrlThenOpenInBrows
163
165
  e 'OpenLastUrl does not appear to be available.'
164
166
  end
165
167
  else
166
- opne 'The class '+steelblue('RBT::Cookbooks::Url')+
167
- ' is not available.'
168
+ opne "#{rev}The class #{steelblue('RBT::Cookbooks::Url')}"\
169
+ "#{rev} is not available."
168
170
  end
169
171
  end
170
172
 
@@ -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
  # ========================================================================= #