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/classes/email.rb
CHANGED
@@ -214,17 +214,16 @@ class Email < Base # === Roebe::Email
|
|
214
214
|
else
|
215
215
|
case i # case tag
|
216
216
|
# ======================================================================= #
|
217
|
-
# ===
|
217
|
+
# === --open
|
218
218
|
# ======================================================================= #
|
219
|
-
when /-?-?
|
220
|
-
|
219
|
+
when /-?-?open$/i
|
220
|
+
open_this_file # Open the file.
|
221
221
|
exit
|
222
222
|
# ======================================================================= #
|
223
|
-
# === --
|
223
|
+
# === email --help
|
224
224
|
# ======================================================================= #
|
225
|
-
when /-?-?
|
226
|
-
|
227
|
-
open_this_file # Open the file.
|
225
|
+
when /-?-?help/i
|
226
|
+
show_help
|
228
227
|
exit
|
229
228
|
end
|
230
229
|
end
|
@@ -257,7 +256,7 @@ class Email < Base # === Roebe::Email
|
|
257
256
|
e
|
258
257
|
if is_on_roebe? # On my home system we will show a bit more information.
|
259
258
|
opne 'We will however feedback the whole datastructure now:'
|
260
|
-
pp
|
259
|
+
pp dataset_from_the_contacts_file?
|
261
260
|
end
|
262
261
|
end
|
263
262
|
|
@@ -275,10 +274,10 @@ class Email < Base # === Roebe::Email
|
|
275
274
|
# In this case no result was found, so first check the dataset from
|
276
275
|
# the local .yml file, before bailing out.
|
277
276
|
# ===================================================================== #
|
278
|
-
if
|
277
|
+
if dataset_from_the_contacts_file?.nil?
|
279
278
|
not_found_any_result_for(i)
|
280
279
|
else
|
281
|
-
index =
|
280
|
+
index = dataset_from_the_contacts_file?.find_index {|entry|
|
282
281
|
_ = entry.first
|
283
282
|
_.downcase!
|
284
283
|
unless i.nil?
|
@@ -289,7 +288,7 @@ class Email < Base # === Roebe::Email
|
|
289
288
|
# ================================================================= #
|
290
289
|
# In this case, tap into the dataset provided by the yaml file.
|
291
290
|
# ================================================================= #
|
292
|
-
email =
|
291
|
+
email = dataset_from_the_contacts_file?[index][2].to_s
|
293
292
|
report_the_result_for_this_email_address(email)
|
294
293
|
else
|
295
294
|
not_found_any_result_for(i)
|
@@ -305,27 +304,31 @@ class Email < Base # === Roebe::Email
|
|
305
304
|
@internal_hash[:dataset_from_the_contacts_file]
|
306
305
|
end
|
307
306
|
|
308
|
-
# ========================================================================= #
|
309
|
-
# === run (run tag)
|
310
|
-
# ========================================================================= #
|
311
|
-
def run
|
312
|
-
menu(
|
313
|
-
commandline_arguments_with_hyphens?
|
314
|
-
)
|
315
|
-
_ = commandline_arguments?.join(' ').strip
|
316
|
-
if _.nil? or _.empty?
|
317
|
-
e 'Please provide an argument.'
|
318
|
-
else # This here is the primary clause.
|
319
|
-
run_the_primary_task_of_this_class(_)
|
320
|
-
end
|
321
|
-
end
|
322
|
-
|
323
307
|
# ========================================================================= #
|
324
308
|
# === try_to_obtain_the_corresponding_email
|
325
309
|
# ========================================================================= #
|
326
310
|
def try_to_obtain_the_corresponding_email(i)
|
327
311
|
result = case i # case tag, email tag
|
328
312
|
# ======================================================================= #
|
313
|
+
# === email schildberger
|
314
|
+
# ======================================================================= #
|
315
|
+
when 'schildberger'
|
316
|
+
'andreas.schildberger@boku.ac.at'
|
317
|
+
# ======================================================================= #
|
318
|
+
# === email koller
|
319
|
+
# ======================================================================= #
|
320
|
+
when 'koller',
|
321
|
+
'bernhard_koller'
|
322
|
+
'bernhard.koller@tuwien.ac.at'
|
323
|
+
# ======================================================================= #
|
324
|
+
# === email tu_studienabteilung
|
325
|
+
# ======================================================================= #
|
326
|
+
when 'tu_studienabteilung',
|
327
|
+
'tuwien','sekretariat',
|
328
|
+
'tu',40
|
329
|
+
# 'studienabteilung@zv.tuwien.ac.at'
|
330
|
+
'studienabteilung@tuwien.ac.at'
|
331
|
+
# ======================================================================= #
|
329
332
|
# === email byrne
|
330
333
|
# ======================================================================= #
|
331
334
|
when /^-?-?byrnes?$/i
|
@@ -401,12 +404,6 @@ class Email < Base # === Roebe::Email
|
|
401
404
|
23
|
402
405
|
'studabt@boku.ac.at'
|
403
406
|
# ======================================================================= #
|
404
|
-
# === email koller
|
405
|
-
# ======================================================================= #
|
406
|
-
when 'koller',
|
407
|
-
'bernhard_koller'
|
408
|
-
'bernhard.koller@tuwien.ac.at'
|
409
|
-
# ======================================================================= #
|
410
407
|
# === email vetmed
|
411
408
|
# ======================================================================= #
|
412
409
|
when 'vetmed',
|
@@ -460,14 +457,6 @@ class Email < Base # === Roebe::Email
|
|
460
457
|
44
|
461
458
|
'franco.laccone@meduniwien.ac.at'
|
462
459
|
# ======================================================================= #
|
463
|
-
# === email tu_studienabteilung
|
464
|
-
# ======================================================================= #
|
465
|
-
when 'tu_studienabteilung',
|
466
|
-
'tuwien','sekretariat',
|
467
|
-
'tu',40
|
468
|
-
# 'studienabteilung@zv.tuwien.ac.at')
|
469
|
-
'studienabteilung@tuwien.ac.at'
|
470
|
-
# ======================================================================= #
|
471
460
|
# === email isabel
|
472
461
|
# ======================================================================= #
|
473
462
|
when 'isabel'
|
@@ -863,6 +852,21 @@ class Email < Base # === Roebe::Email
|
|
863
852
|
end; alias try_to_find_this_entry try_to_obtain_the_corresponding_email # === try_to_find_this_entry
|
864
853
|
alias try_to_find_entry try_to_obtain_the_corresponding_email # === try_to_find_this_entry
|
865
854
|
|
855
|
+
# ========================================================================= #
|
856
|
+
# === run (run tag)
|
857
|
+
# ========================================================================= #
|
858
|
+
def run
|
859
|
+
menu(
|
860
|
+
commandline_arguments_with_hyphens?
|
861
|
+
)
|
862
|
+
_ = commandline_arguments?.join(' ').strip
|
863
|
+
if _.nil? or _.empty?
|
864
|
+
e 'Please provide an argument.'
|
865
|
+
else # This here is the primary clause.
|
866
|
+
run_the_primary_task_of_this_class(_)
|
867
|
+
end
|
868
|
+
end
|
869
|
+
|
866
870
|
# ========================================================================= #
|
867
871
|
# === Roebe::Email[]
|
868
872
|
# ========================================================================= #
|
data/lib/roebe/classes/enable.rb
CHANGED
@@ -82,7 +82,7 @@ ctl.snd_card {
|
|
82
82
|
# === store_the_content_into_the_alsa_conf_file
|
83
83
|
# ========================================================================= #
|
84
84
|
def store_the_content_into_the_alsa_conf_file
|
85
|
-
opne "Now storing into the file `#{sfile(@into)}`."
|
85
|
+
opne "#{rev}Now storing into the file `#{sfile(@into)}#{rev}`."
|
86
86
|
write_what_into(@content, @into)
|
87
87
|
notify_the_user_that_two_variants_exist
|
88
88
|
end
|
@@ -91,9 +91,9 @@ ctl.snd_card {
|
|
91
91
|
# === notify_the_user_that_two_variants_exist
|
92
92
|
# ========================================================================= #
|
93
93
|
def notify_the_user_that_two_variants_exist
|
94
|
-
|
95
|
-
|
96
|
-
|
94
|
+
opne 'Note that there is also another variant, if this '\
|
95
|
+
'one does not work for you. See the'
|
96
|
+
opne 'constant at DEFAULT_CONTENT_1.'
|
97
97
|
end
|
98
98
|
|
99
99
|
# ========================================================================= #
|
@@ -24,16 +24,18 @@ module Roebe
|
|
24
24
|
|
25
25
|
class GenerateOverviewOfTheLocallyAvailableBooks < Base # === Roebe::GenerateOverviewOfTheLocallyAvailableBooks
|
26
26
|
|
27
|
-
require 'roebe/constants/emojis.rb'
|
28
|
-
|
29
27
|
begin
|
30
28
|
require 'pdf_paradise/utility_scripts/pdf_file_n_total_pages.rb'
|
31
29
|
rescue LoadError; end
|
32
30
|
|
31
|
+
begin
|
32
|
+
require 'emoji_paradise'
|
33
|
+
rescue LoadError; end
|
34
|
+
|
33
35
|
# ========================================================================= #
|
34
36
|
# === BOOK_EMOJI
|
35
37
|
# ========================================================================= #
|
36
|
-
BOOK_EMOJI =
|
38
|
+
BOOK_EMOJI = EmojiParadise.book_emoji?
|
37
39
|
|
38
40
|
# ========================================================================= #
|
39
41
|
# === BASE_DIRECTORY
|
data/lib/roebe/classes/github.rb
CHANGED
@@ -42,7 +42,7 @@ class Github < Base # === Roebe::Github
|
|
42
42
|
# ========================================================================= #
|
43
43
|
def run
|
44
44
|
_ = first_argument?
|
45
|
-
require 'rbt/
|
45
|
+
require 'rbt/actions/individual_actions/cookbooks/sanitize_cookbook/sanitize_cookbook.rb'
|
46
46
|
if _
|
47
47
|
dataset = RBT.cookbook_for(_)
|
48
48
|
url = dataset.git_url?
|
@@ -63,7 +63,7 @@ class InstallThisKonsoleTheme < ::Roebe::Base # === Roebe::InstallThisKonsoleThe
|
|
63
63
|
# ========================================================================= #
|
64
64
|
def run
|
65
65
|
_ = first_argument?
|
66
|
-
|
66
|
+
opne "#{rev}Now copying towards `#{sdir(@copy_towards_this_target)}#{rev}`."
|
67
67
|
copy_file(first_argument?, @copy_towards_this_target)
|
68
68
|
e 'You still have to do this step:'
|
69
69
|
e
|
@@ -2,23 +2,18 @@
|
|
2
2
|
# Encoding: UTF-8
|
3
3
|
# frozen_string_literal: true
|
4
4
|
# =========================================================================== #
|
5
|
-
# === Roebe::
|
5
|
+
# === Roebe::LighttpdWrapper
|
6
6
|
#
|
7
7
|
# This class has been added in May 2023 to handle lighttpd-related aspects
|
8
|
-
# via one class.
|
9
|
-
#
|
10
|
-
# Usage example:
|
11
|
-
#
|
12
|
-
# Roebe::HandleLightppd.new(ARGV)
|
13
|
-
#
|
8
|
+
# via one class. In March 2024 it was improved.
|
14
9
|
# =========================================================================== #
|
15
|
-
# require 'roebe/classes/
|
10
|
+
# require 'roebe/classes/lighttpd/lighttpd_wrapper.rb'
|
16
11
|
# =========================================================================== #
|
17
12
|
require 'roebe/base/base.rb'
|
18
13
|
|
19
14
|
module Roebe
|
20
15
|
|
21
|
-
class
|
16
|
+
class LighttpdWrapper < ::Roebe::Base # === Roebe::LighttpdWrapper
|
22
17
|
|
23
18
|
# ========================================================================= #
|
24
19
|
# === initialize
|
@@ -41,10 +36,11 @@ class HandleLightppd < ::Roebe::Base # === Roebe::HandleLightppd
|
|
41
36
|
end
|
42
37
|
|
43
38
|
# ========================================================================= #
|
44
|
-
# ===
|
39
|
+
# === generate_lighttpd_configuration
|
45
40
|
# ========================================================================= #
|
46
|
-
def
|
47
|
-
|
41
|
+
def generate_lighttpd_configuration
|
42
|
+
require 'roebe/classes/lighttpd_config_generator.rb'
|
43
|
+
Roebe::LighttpdConfigGenerator.new
|
48
44
|
end
|
49
45
|
|
50
46
|
# ========================================================================= #
|
@@ -89,9 +85,9 @@ class HandleLightppd < ::Roebe::Base # === Roebe::HandleLightppd
|
|
89
85
|
# ========================================================================= #
|
90
86
|
def show_help
|
91
87
|
e
|
92
|
-
|
93
|
-
|
94
|
-
|
88
|
+
ecomment ' --start # start lighttpd'
|
89
|
+
ecomment ' --stop # stops lighttpd'
|
90
|
+
ecomment ' --generate # generate a new lighttpd configuraiton'
|
95
91
|
e
|
96
92
|
end
|
97
93
|
|
@@ -105,12 +101,12 @@ class HandleLightppd < ::Roebe::Base # === Roebe::HandleLightppd
|
|
105
101
|
if result
|
106
102
|
pid = result.split(' ').first
|
107
103
|
if pid
|
108
|
-
|
104
|
+
orev "#{steelblue('Stopping')}#{rev} lighttpd next:"
|
109
105
|
esystem(
|
110
106
|
"kill -9 #{pid}",
|
111
107
|
:do_colourize_and_pad_the_system_command
|
112
108
|
)
|
113
|
-
|
109
|
+
orev 'Done!'
|
114
110
|
end
|
115
111
|
else
|
116
112
|
opne tomato('Could not stop lighttpd: it appears as if ')+
|
@@ -119,20 +115,23 @@ class HandleLightppd < ::Roebe::Base # === Roebe::HandleLightppd
|
|
119
115
|
end
|
120
116
|
end; alias stop_lighttpd stop_lighty # === stop_lighttpd
|
121
117
|
|
122
|
-
# ========================================================================= #
|
123
|
-
# === generate_lighttpd_configuration
|
124
|
-
# ========================================================================= #
|
125
|
-
def generate_lighttpd_configuration
|
126
|
-
require 'roebe/classes/lighttpd_config_generator.rb'
|
127
|
-
Roebe::LighttpdConfigGenerator.new
|
128
|
-
end
|
129
|
-
|
130
118
|
# ========================================================================= #
|
131
119
|
# === start_lighttpd
|
132
120
|
#
|
133
121
|
# This method can be used to start lighttpd.
|
122
|
+
#
|
123
|
+
# The regular syntax for doing son on the commandline goes like
|
124
|
+
# this:
|
125
|
+
#
|
126
|
+
# lighttpd -D -f $LIGHTTPD/autogenerated_lighttpd.conf &
|
127
|
+
# lighttpd -D -f $LIGHTTPD_CONFIGURATION_DIRECTORY/port.conf -f $LIGHTTPD_CONFIGURATION_DIRECTORY/document_root.conf &
|
128
|
+
#
|
129
|
+
# /usr/lib/ruby/site_ruby/3.3.0/roebe/www/lighttpd/configuration/port.conf
|
130
|
+
#/home/x/programming/ruby/src/roebe/lib/roebe/www/lighttpd/configuration/port.conf
|
134
131
|
# ========================================================================= #
|
135
|
-
def start_lighttpd(
|
132
|
+
def start_lighttpd(
|
133
|
+
i = :default_port
|
134
|
+
)
|
136
135
|
case i
|
137
136
|
# ======================================================================= #
|
138
137
|
# === :default_port
|
@@ -149,7 +148,7 @@ class HandleLightppd < ::Roebe::Base # === Roebe::HandleLightppd
|
|
149
148
|
:do_colourize_and_pad_the_system_command
|
150
149
|
)
|
151
150
|
port_to_use = '3005'
|
152
|
-
|
151
|
+
orev 'The rewrite-rules are no longer autogenerated since as of May 2023.'
|
153
152
|
if false
|
154
153
|
file_rewrite_rules =
|
155
154
|
RUBY_SRC_DIR+'roebe/lib/roebe/classes/generate_rewrite_rules.rb'
|
@@ -160,13 +159,20 @@ class HandleLightppd < ::Roebe::Base # === Roebe::HandleLightppd
|
|
160
159
|
port_to_use = File.readlines(use_this_file_for_determining_the_port)[-1].split('=')[-1].strip.to_s
|
161
160
|
end
|
162
161
|
end
|
163
|
-
|
164
|
-
|
165
|
-
|
162
|
+
orev 'Starting lighttpd on '+
|
163
|
+
string_italic('localhost')+rev+
|
164
|
+
", port: #{sfancy(port_to_use)}"
|
166
165
|
end
|
167
166
|
|
168
167
|
# ========================================================================= #
|
169
|
-
# ===
|
168
|
+
# === run (run tag)
|
169
|
+
# ========================================================================= #
|
170
|
+
def run
|
171
|
+
menu
|
172
|
+
end
|
173
|
+
|
174
|
+
# ========================================================================= #
|
175
|
+
# === Roebe::LighttpdWrapper[]
|
170
176
|
# ========================================================================= #
|
171
177
|
def self.[](i = ARGV)
|
172
178
|
new(i)
|
@@ -174,11 +180,22 @@ class HandleLightppd < ::Roebe::Base # === Roebe::HandleLightppd
|
|
174
180
|
|
175
181
|
end
|
176
182
|
|
183
|
+
# ========================================================================= #
|
184
|
+
# === Roebe.start_lighttpd
|
185
|
+
#
|
186
|
+
# This method can be used to start lighttpd on my home setup.
|
187
|
+
# ========================================================================= #
|
188
|
+
def self.start_lighttpd(
|
189
|
+
use_this_file_for_determining_the_port = :default_port
|
190
|
+
)
|
191
|
+
Roebe::LighttpdWrapper.new.start_lighttpd(use_this_file_for_determining_the_port)
|
192
|
+
end
|
193
|
+
|
177
194
|
# =========================================================================== #
|
178
195
|
# === Roebe.stop_lighty
|
179
196
|
# =========================================================================== #
|
180
197
|
def self.stop_lighty
|
181
|
-
Roebe::
|
198
|
+
Roebe::LighttpdWrapper.new.stop_lighty
|
182
199
|
end; self.instance_eval { alias stop_lighttpd stop_lighty } # === Roebe.stop_lighttpd
|
183
200
|
|
184
201
|
# =========================================================================== #
|
@@ -188,23 +205,14 @@ end; self.instance_eval { alias stop_lighttpd stop_lighty } # === Roebe.stop_lig
|
|
188
205
|
# file.
|
189
206
|
# =========================================================================== #
|
190
207
|
def self.generate_lighttpd_configuration
|
191
|
-
Roebe::
|
192
|
-
end
|
193
|
-
|
194
|
-
# ========================================================================= #
|
195
|
-
# === Roebe.start_lighttpd
|
196
|
-
#
|
197
|
-
# This method can be used to start lighttpd on my home setup.
|
198
|
-
# ========================================================================= #
|
199
|
-
def self.start_lighttpd(
|
200
|
-
use_this_file_for_determining_the_port = :default_port
|
201
|
-
)
|
202
|
-
Roebe::HandleLightppd.new.start_lighttpd(use_this_file_for_determining_the_port)
|
208
|
+
Roebe::LighttpdWrapper.new.generate_lighttpd_configuration
|
203
209
|
end
|
204
210
|
|
205
211
|
end
|
206
212
|
|
207
213
|
if __FILE__ == $PROGRAM_NAME
|
208
|
-
|
209
|
-
|
210
|
-
|
214
|
+
alias e puts
|
215
|
+
# Roebe.generate_lighttpd_configuration
|
216
|
+
# Roebe::LighttpdWrapper.new(ARGV)
|
217
|
+
end # lighttpdwrapper --stop
|
218
|
+
# lighttpdwrapper --generate
|
@@ -12,6 +12,7 @@
|
|
12
12
|
#
|
13
13
|
# =========================================================================== #
|
14
14
|
# require 'roebe/classes/make_gem.rb'
|
15
|
+
# Roebe.make_gem(ARGV)
|
15
16
|
# Roebe::MakeGem.new(ARGV)
|
16
17
|
# =========================================================================== #
|
17
18
|
require 'roebe/base/base.rb'
|
@@ -83,7 +84,7 @@ class MakeGem < Base # === Roebe::MakeGem
|
|
83
84
|
# ========================================================================= #
|
84
85
|
def do_post_gem_creation_tasks
|
85
86
|
if are_we_in_a_bioroebe_directory?
|
86
|
-
opne "Re-creating a symlink (#{BIOROEBE_GTK_SYMLINK})"
|
87
|
+
opne "#{rev}Re-creating a symlink (#{BIOROEBE_GTK_SYMLINK})"
|
87
88
|
unless File.exist? BIOROEBE_GTK_SYMLINK
|
88
89
|
begin
|
89
90
|
target = File.dirname(BIOROEBE_GTK_SYMLINK)+'/gtk2'
|
@@ -93,7 +94,8 @@ class MakeGem < Base # === Roebe::MakeGem
|
|
93
94
|
target # Is aliased to gtk2 for now.
|
94
95
|
)
|
95
96
|
else
|
96
|
-
e "No file exists at #{steelblue(target)} -
|
97
|
+
e "#{rev}No file exists at #{steelblue(target)}#{rev} - "\
|
98
|
+
"thus, no symlink"
|
97
99
|
e 'can be created.'
|
98
100
|
end
|
99
101
|
rescue Errno::EEXIST => error
|
@@ -154,14 +156,14 @@ class MakeGem < Base # === Roebe::MakeGem
|
|
154
156
|
# ===================================================================== #
|
155
157
|
# (4) We will also publish the gem at once next.
|
156
158
|
# ===================================================================== #
|
157
|
-
e
|
158
|
-
e "#{rev}This is "+orange('necessary')+rev
|
159
|
-
|
159
|
+
e "#{rev}We will also automatically publish this gem at once."
|
160
|
+
e "#{rev}This is "+orange('necessary')+"#{rev} so that we can "\
|
161
|
+
"restore the old file called"
|
160
162
|
e "#{sfile('lecture_information')} #{rev}again."
|
161
163
|
require 'roebe/classes/publish_gem.rb'
|
162
164
|
Roebe.publish_gem
|
163
165
|
old_file = "#{Studium.log_dir?}backups/lecture_information.yml"
|
164
|
-
|
166
|
+
opne "#{rev}Copying from `#{sfile(old_file)}#{rev}`."
|
165
167
|
copy_file(
|
166
168
|
old_file,
|
167
169
|
RUBY_SRC_DIR+'studium/lib/studium/yaml/'
|
@@ -177,7 +179,7 @@ class MakeGem < Base # === Roebe::MakeGem
|
|
177
179
|
def in_a_bioroebe_directory?(
|
178
180
|
this_directory = return_pwd
|
179
181
|
)
|
180
|
-
this_directory.include?
|
182
|
+
this_directory.include? RUBY_SRC_DIR+'bioroebe'
|
181
183
|
end; alias are_we_in_a_bioroebe_directory? in_a_bioroebe_directory? # === are_we_in_a_bioroebe_directory?
|
182
184
|
|
183
185
|
# ========================================================================= #
|
@@ -188,7 +190,8 @@ class MakeGem < Base # === Roebe::MakeGem
|
|
188
190
|
if _
|
189
191
|
size = File.size(_)
|
190
192
|
if size > EIGHTY_MB # Check for too-big .gem files.
|
191
|
-
ewarn ('NOTICE: The size is more than ')+
|
193
|
+
ewarn ('NOTICE: The size is more than ')+
|
194
|
+
steelblue('80 MB')+swarn('.')
|
192
195
|
ewarn 'Have a look whether this is correct.'
|
193
196
|
esystem 'xmessage "Have a look whether the size of the .gem is ok."'
|
194
197
|
end
|
@@ -209,32 +212,6 @@ class MakeGem < Base # === Roebe::MakeGem
|
|
209
212
|
esystem 'gem build *.gemspec'
|
210
213
|
end
|
211
214
|
|
212
|
-
# ========================================================================= #
|
213
|
-
# === prepare_the_gem_for_the_rbt_project
|
214
|
-
#
|
215
|
-
# This method will publish the rbt project.
|
216
|
-
# ========================================================================= #
|
217
|
-
def prepare_the_gem_for_the_rbt_project
|
218
|
-
return unless @may_we_prepare_the_gem_for_the_rbt_project
|
219
|
-
if is_on_roebe?
|
220
|
-
require 'rbt/version/version.rb'
|
221
|
-
rename_kde_konsole_tab(
|
222
|
-
"Updating RBT to Version #{RBT.version?}",
|
223
|
-
:be_quiet
|
224
|
-
)
|
225
|
-
end
|
226
|
-
require 'rbt'
|
227
|
-
e orange('(1) RBT.save_the_available_programs_versions:')
|
228
|
-
if RBT.respond_to? :save_the_available_programs_versions
|
229
|
-
RBT.save_the_available_programs_versions
|
230
|
-
else
|
231
|
-
e "#{rev}RBT.save_the_available_programs_versions does not work."
|
232
|
-
end
|
233
|
-
if is_on_roebe?
|
234
|
-
rename_kde_konsole_tab('', :be_quiet)
|
235
|
-
end
|
236
|
-
end
|
237
|
-
|
238
215
|
# ========================================================================= #
|
239
216
|
# === check_for_readme_gen
|
240
217
|
#
|
@@ -262,6 +239,34 @@ class MakeGem < Base # === Roebe::MakeGem
|
|
262
239
|
end
|
263
240
|
end
|
264
241
|
|
242
|
+
# ========================================================================= #
|
243
|
+
# === prepare_the_gem_for_the_rbt_project
|
244
|
+
#
|
245
|
+
# This method will publish the rbt project.
|
246
|
+
# ========================================================================= #
|
247
|
+
def prepare_the_gem_for_the_rbt_project
|
248
|
+
return unless @may_we_prepare_the_gem_for_the_rbt_project
|
249
|
+
if is_on_roebe?
|
250
|
+
require 'rbt/requires/require_actions.rb'
|
251
|
+
require 'rbt/version/version.rb'
|
252
|
+
rename_kde_konsole_tab(
|
253
|
+
"Updating RBT to Version #{RBT.version?}",
|
254
|
+
:be_quiet
|
255
|
+
)
|
256
|
+
end
|
257
|
+
require 'rbt'
|
258
|
+
RBT.action(:save_available_programs)
|
259
|
+
e orange('(1) RBT.save_the_available_programs_versions:')
|
260
|
+
if RBT.respond_to? :save_the_available_programs_versions
|
261
|
+
RBT.save_the_available_programs_versions
|
262
|
+
else
|
263
|
+
e "#{rev}RBT.save_the_available_programs_versions does not work."
|
264
|
+
end
|
265
|
+
if is_on_roebe?
|
266
|
+
rename_kde_konsole_tab('', :be_quiet)
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
265
270
|
# ========================================================================= #
|
266
271
|
# === run (run tag)
|
267
272
|
# ========================================================================= #
|
@@ -273,7 +278,16 @@ class MakeGem < Base # === Roebe::MakeGem
|
|
273
278
|
do_post_gem_creation_tasks
|
274
279
|
end
|
275
280
|
|
276
|
-
end
|
281
|
+
end
|
282
|
+
|
283
|
+
# =========================================================================== #
|
284
|
+
# === Roebe.make_gem
|
285
|
+
# =========================================================================== #
|
286
|
+
def self.make_gem(i = ARGV)
|
287
|
+
Roebe::MakeGem.new(i)
|
288
|
+
end
|
289
|
+
|
290
|
+
end
|
277
291
|
|
278
292
|
if __FILE__ == $PROGRAM_NAME
|
279
293
|
Roebe::MakeGem.new(ARGV)
|
data/lib/roebe/classes/mbl.rb
CHANGED
@@ -95,7 +95,9 @@ class Mbl < Base # === Roebe::Mbl
|
|
95
95
|
# ========================================================================= #
|
96
96
|
# === open_in_editor
|
97
97
|
# ========================================================================= #
|
98
|
-
def open_in_editor(
|
98
|
+
def open_in_editor(
|
99
|
+
i = this_file?
|
100
|
+
)
|
99
101
|
_ = "#{USE_THIS_EDITOR} #{i}"
|
100
102
|
esystem _
|
101
103
|
end
|
@@ -169,7 +171,7 @@ int main()
|
|
169
171
|
return EXIT_SUCCESS;
|
170
172
|
}
|
171
173
|
'
|
172
|
-
|
174
|
+
orev 'Generating a .cpp file next.'
|
173
175
|
write_what_into(@string, this_file)
|
174
176
|
# ======================================================================= #
|
175
177
|
# === Handle ruby .rb files in a directory called test/, if the
|
@@ -187,7 +189,7 @@ int main()
|
|
187
189
|
@string = "#!/usr/bin/ruby -w
|
188
190
|
# Encoding: #{Roebe.encoding?}
|
189
191
|
# frozen_string_literal: true
|
190
|
-
#
|
192
|
+
# ============================================================================ #
|
191
193
|
require '"+name_of_the_project+"'
|
192
194
|
require 'colours/colours_e_autoinclude.rb'
|
193
195
|
|
@@ -315,4 +317,4 @@ end; end
|
|
315
317
|
|
316
318
|
if __FILE__ == $PROGRAM_NAME
|
317
319
|
Roebe::Mbl.new(ARGV)
|
318
|
-
end # mbl
|
320
|
+
end # mbl
|