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
@@ -59,6 +59,8 @@ module Roebe
|
|
59
59
|
|
60
60
|
# ========================================================================= #
|
61
61
|
# === Roebe.file_contacts
|
62
|
+
#
|
63
|
+
# Return the path towards the file contacts.yml via this method here.
|
62
64
|
# ========================================================================= #
|
63
65
|
def self.file_contacts
|
64
66
|
FILE_CONTACTS_YAML
|
@@ -37,17 +37,17 @@ module CustomMethods # === Roebe::CustomMethods
|
|
37
37
|
require 'open-uri'
|
38
38
|
require 'roebe/project/project.rb'
|
39
39
|
require 'roebe/custom_methods/constants.rb'
|
40
|
+
require 'roebe/actions/actions.rb'
|
40
41
|
require 'roebe/constants/array_install_these_gem_projects.rb'
|
41
42
|
require 'roebe/constants/constants.rb'
|
43
|
+
require 'roebe/requires/require_lighttpd.rb'
|
42
44
|
require 'roebe/toplevel_methods/module_methods.rb' # Pulls in Roebe.vetmed? and similar methods.
|
43
|
-
require 'roebe/toplevel_methods/lighttpd.rb'
|
44
45
|
require 'roebe/toplevel_methods/downcase_all_entries_in_the_current_directory.rb'
|
45
46
|
require 'roebe/toplevel_methods/esystem.rb'
|
46
47
|
require 'roebe/toplevel_methods/fibonacci.rb'
|
47
48
|
require 'roebe/toplevel_methods/halloween.rb'
|
48
49
|
require 'roebe/toplevel_methods/misc.rb'
|
49
50
|
require 'roebe/toplevel_methods/rinstall2.rb'
|
50
|
-
require 'roebe/toplevel_methods/lighttpd.rb'
|
51
51
|
require 'roebe/toplevel_methods/open_in_editor_and_browser.rb'
|
52
52
|
require 'roebe/toplevel_methods/open_in_editor.rb'
|
53
53
|
require 'roebe/toplevel_methods/increase_volume.rb'
|
@@ -212,6 +212,24 @@ BrowserApplication[$e]=!firefox
|
|
212
212
|
end
|
213
213
|
end
|
214
214
|
|
215
|
+
# ========================================================================= #
|
216
|
+
# === generate_files_for_the_ascii_paradise_project
|
217
|
+
# ========================================================================= #
|
218
|
+
def generate_files_for_the_ascii_paradise_project(
|
219
|
+
# ===================================================================== #
|
220
|
+
# === Batch-create
|
221
|
+
# ===================================================================== #
|
222
|
+
start_position = 81,
|
223
|
+
end_position = 85,
|
224
|
+
name_of_the_ascii_paradise_component = 'dog_tries_to_catch_the_ball_'
|
225
|
+
)
|
226
|
+
start_position.upto(end_position) {|entry|
|
227
|
+
name = name_of_the_ascii_paradise_component+entry.to_s+'.ascii'
|
228
|
+
e name
|
229
|
+
create_file(name)
|
230
|
+
}
|
231
|
+
end
|
232
|
+
|
215
233
|
# ========================================================================= #
|
216
234
|
# === ascii_alphabet
|
217
235
|
#
|
@@ -482,6 +500,21 @@ BrowserApplication[$e]=!firefox
|
|
482
500
|
e "'#{i}' (size #{i.size}) is stored in the encoding #{i.encoding.name}"
|
483
501
|
end
|
484
502
|
|
503
|
+
# ========================================================================= #
|
504
|
+
# === roebe_festnetz?
|
505
|
+
# ========================================================================= #
|
506
|
+
def roebe_festnetz?
|
507
|
+
_ = Roebe.actions(:contacts)
|
508
|
+
_.first[1].to_s
|
509
|
+
end
|
510
|
+
|
511
|
+
# ========================================================================= #
|
512
|
+
# === show_roebe_festnetz?
|
513
|
+
# ========================================================================= #
|
514
|
+
def show_roebe_festnetz?
|
515
|
+
e steelblue(roebe_festnetz?)
|
516
|
+
end
|
517
|
+
|
485
518
|
# ========================================================================= #
|
486
519
|
# === save_all_contacts
|
487
520
|
#
|
@@ -617,13 +650,6 @@ BrowserApplication[$e]=!firefox
|
|
617
650
|
e '/* This is a CSS comment. */'
|
618
651
|
end; alias css_hints css_comments? # === css_hints
|
619
652
|
|
620
|
-
# ========================================================================= #
|
621
|
-
# === ascii
|
622
|
-
# ========================================================================= #
|
623
|
-
def ascii
|
624
|
-
require 'ascii_paradise'
|
625
|
-
end
|
626
|
-
|
627
653
|
begin
|
628
654
|
require 'convert_global_env'
|
629
655
|
rescue LoadError; end
|
@@ -1388,7 +1414,7 @@ BrowserApplication[$e]=!firefox
|
|
1388
1414
|
create_file my_file
|
1389
1415
|
append '<html><body><table>', my_file
|
1390
1416
|
_.each { |image|
|
1391
|
-
append '<tr><td><b>'+image+'</b></td><td>'+'<img src="'+image+'"></td></tr>'+
|
1417
|
+
append '<tr><td><b>'+image+'</b></td><td>'+'<img src="'+image+'"></td></tr>'+my_file
|
1392
1418
|
}
|
1393
1419
|
append '</table></body></html>', my_file
|
1394
1420
|
e 'Look at '+my_file
|
@@ -1483,6 +1509,7 @@ BrowserApplication[$e]=!firefox
|
|
1483
1509
|
::Roebe.feedback_base_dir
|
1484
1510
|
end; alias base_project? feedback_base_dir # === base_project?
|
1485
1511
|
|
1512
|
+
|
1486
1513
|
# ========================================================================= #
|
1487
1514
|
# === rename_ascii_files
|
1488
1515
|
#
|
@@ -1492,17 +1519,19 @@ BrowserApplication[$e]=!firefox
|
|
1492
1519
|
::Roebe.rename_ascii_files
|
1493
1520
|
end
|
1494
1521
|
|
1522
|
+
# ========================================================================= #
|
1523
|
+
# === ascii
|
1524
|
+
# ========================================================================= #
|
1525
|
+
def ascii
|
1526
|
+
require 'ascii_paradise'
|
1527
|
+
end
|
1528
|
+
|
1495
1529
|
# ========================================================================= #
|
1496
1530
|
# === misc (misc tag)
|
1497
1531
|
#
|
1498
1532
|
# Throwaway testing method.
|
1499
1533
|
# ========================================================================= #
|
1500
1534
|
def misc
|
1501
|
-
# ======================================================================= #
|
1502
|
-
# batchrename
|
1503
|
-
# ======================================================================= #
|
1504
|
-
start_position = 51
|
1505
|
-
down_to_position = 19
|
1506
1535
|
start_position.downto(down_to_position).each {|counter|
|
1507
1536
|
filename_in = 'tears_of_ice_'+counter.to_s+'.ascii'
|
1508
1537
|
filename_out = 'tears_of_ice_'+(counter+1).to_s+'.ascii'
|
@@ -3654,7 +3683,7 @@ EOF
|
|
3654
3683
|
#
|
3655
3684
|
# ======================================================================= #
|
3656
3685
|
IRB.conf[:PROMPT][:ROEBE_PROMPT] = {
|
3657
|
-
PROMPT_I:
|
3686
|
+
PROMPT_I: , # A newline is, oddly enough, required here.
|
3658
3687
|
PROMPT_N: ".. ", # Or: "",
|
3659
3688
|
PROMPT_S: '"', # Or nil
|
3660
3689
|
PROMPT_C: '',
|
@@ -0,0 +1,39 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# This module specifically tries to be of help when it comes to fonts,
|
6
|
+
# especially on Linux systems.
|
7
|
+
# =========================================================================== #
|
8
|
+
module Roebe
|
9
|
+
|
10
|
+
module Fonts # === Roebe::Fonts
|
11
|
+
|
12
|
+
# ========================================================================= #
|
13
|
+
# === Roebe::Fonts::ARRAY_URL_TO_REMOTE_FONTS
|
14
|
+
# ========================================================================= #
|
15
|
+
ARRAY_URL_TO_REMOTE_FONTS = %w(
|
16
|
+
https://github.com/tonsky/FiraCode/releases/download/6.2/Fira_Code_v6.2.zip
|
17
|
+
)
|
18
|
+
# ========================================================================= #
|
19
|
+
# === Roebe::Fonts::ARRAY_ELEGANT_FONTS
|
20
|
+
#
|
21
|
+
# Good fonts should be stored in the following Array. Note that any '_'
|
22
|
+
# that is part of the names, may be replaced with a ' '. So Fira_Code
|
23
|
+
# would become 'Fira Code'.
|
24
|
+
# ========================================================================= #
|
25
|
+
ARRAY_ELEGANT_FONTS = %w(
|
26
|
+
Hack
|
27
|
+
Fira_Code
|
28
|
+
URW_Bookman
|
29
|
+
Luxi_Sans
|
30
|
+
)
|
31
|
+
|
32
|
+
end; end
|
33
|
+
|
34
|
+
if __FILE__ == $PROGRAM_NAME
|
35
|
+
require 'wget'
|
36
|
+
Wget.download(
|
37
|
+
Roebe::Fonts::ARRAY_URL_TO_REMOTE_FONTS
|
38
|
+
)
|
39
|
+
end
|
@@ -0,0 +1,232 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# === Roebe::GUI::Books
|
6
|
+
#
|
7
|
+
# Usage example:
|
8
|
+
#
|
9
|
+
# Roebe::GUI::Books.new(ARGV)
|
10
|
+
#
|
11
|
+
# =========================================================================== #
|
12
|
+
# require 'roebe/gui/universal_widgets/books/books.rb'
|
13
|
+
# =========================================================================== #
|
14
|
+
require 'roebe/base/base.rb'
|
15
|
+
|
16
|
+
module Roebe
|
17
|
+
|
18
|
+
module GUI
|
19
|
+
|
20
|
+
class Books < Base # === Roebe::GUI::Books
|
21
|
+
|
22
|
+
require 'universal_widgets/base_module/base_module.rb'
|
23
|
+
include ::UniversalWidgets::BaseModule
|
24
|
+
|
25
|
+
require 'roebe/classes/books/books.rb'
|
26
|
+
|
27
|
+
begin
|
28
|
+
require 'pdf_paradise/utility_scripts/pdf_file_n_total_pages.rb'
|
29
|
+
rescue LoadError; end
|
30
|
+
|
31
|
+
# ========================================================================= #
|
32
|
+
# === TITLE
|
33
|
+
# ========================================================================= #
|
34
|
+
TITLE = 'Books'
|
35
|
+
|
36
|
+
# ========================================================================= #
|
37
|
+
# === WIDTH
|
38
|
+
# ========================================================================= #
|
39
|
+
WIDTH = '62% or minimum 6280px'
|
40
|
+
|
41
|
+
# ========================================================================= #
|
42
|
+
# === HEIGHT
|
43
|
+
# ========================================================================= #
|
44
|
+
HEIGHT = '40% or minimum 400px'
|
45
|
+
|
46
|
+
# ========================================================================= #
|
47
|
+
# === USE_THIS_FONT
|
48
|
+
# ========================================================================= #
|
49
|
+
USE_THIS_FONT = :hack_20
|
50
|
+
|
51
|
+
# ========================================================================= #
|
52
|
+
# === initialize
|
53
|
+
# ========================================================================= #
|
54
|
+
def initialize(
|
55
|
+
commandline_arguments = ARGV,
|
56
|
+
run_already = true
|
57
|
+
)
|
58
|
+
reset
|
59
|
+
set_commandline_arguments(
|
60
|
+
commandline_arguments
|
61
|
+
)
|
62
|
+
UniversalWidgets.parse(commandline_arguments)
|
63
|
+
case run_already
|
64
|
+
# ======================================================================= #
|
65
|
+
# === :do_not_run_yet
|
66
|
+
# ======================================================================= #
|
67
|
+
when :do_not_run_yet
|
68
|
+
run_already = false
|
69
|
+
end
|
70
|
+
run_super
|
71
|
+
end
|
72
|
+
|
73
|
+
# ========================================================================= #
|
74
|
+
# === reset (reset tag)
|
75
|
+
# ========================================================================= #
|
76
|
+
def reset
|
77
|
+
super()
|
78
|
+
infer_the_namespace
|
79
|
+
# ======================================================================= #
|
80
|
+
# === @configuration
|
81
|
+
# ======================================================================= #
|
82
|
+
@configuration = [true, __dir__, namespace?]
|
83
|
+
title_width_height_font(TITLE, WIDTH, HEIGHT, USE_THIS_FONT)
|
84
|
+
# ======================================================================= #
|
85
|
+
# === @book_object
|
86
|
+
# ======================================================================= #
|
87
|
+
@book_object = Roebe::Books.new { :do_not_run_yet }
|
88
|
+
# ======================================================================= #
|
89
|
+
# === @hash_containing_the_absolute_paths_to_the_pdf_files
|
90
|
+
# ======================================================================= #
|
91
|
+
@hash_containing_the_absolute_paths_to_the_pdf_files = {}
|
92
|
+
end
|
93
|
+
|
94
|
+
# ========================================================================= #
|
95
|
+
# === create_skeleton (create tag, skeleton tag)
|
96
|
+
# ========================================================================= #
|
97
|
+
def create_the_skeleton
|
98
|
+
@outer_vbox = create_vbox
|
99
|
+
@grid = default_grid
|
100
|
+
@grid.padding = 5
|
101
|
+
@grid.default_spacing
|
102
|
+
end; alias create_skeleton create_the_skeleton # === create_skeleton
|
103
|
+
|
104
|
+
# ========================================================================= #
|
105
|
+
# === populate_the_grid
|
106
|
+
# ========================================================================= #
|
107
|
+
def populate_the_grid
|
108
|
+
favourites?.each_with_index {|this_is_the_book, index| index += 1
|
109
|
+
@hash_containing_the_absolute_paths_to_the_pdf_files[index] =
|
110
|
+
File.absolute_path(this_is_the_book)
|
111
|
+
this_button = bold_button(index.to_s)
|
112
|
+
this_button.clear_background
|
113
|
+
this_button.on_hover(:lightgreen)
|
114
|
+
this_button.hint = 'Click on this button to remove the first page '\
|
115
|
+
'of the given .pdf file at hand.'
|
116
|
+
this_button.on_clicked {
|
117
|
+
do_remove_the_first_page_at_this_index(index)
|
118
|
+
}
|
119
|
+
@grid.left(this_button)
|
120
|
+
@grid.right(return_the_right_part(this_is_the_book.to_s))
|
121
|
+
}
|
122
|
+
end
|
123
|
+
|
124
|
+
# ========================================================================= #
|
125
|
+
# === return_the_right_part
|
126
|
+
# ========================================================================= #
|
127
|
+
def return_the_right_part(
|
128
|
+
i,
|
129
|
+
prepend_this = ''.dup
|
130
|
+
)
|
131
|
+
n_pdf_pages = 0
|
132
|
+
i = i.to_s
|
133
|
+
n_pdf_pages = n_pdf_pages?(i)
|
134
|
+
prepend_this << ' ('+n_pdf_pages.to_s+' .pdf pages)'
|
135
|
+
i.delete_suffix!('.pdf')
|
136
|
+
basename = File.basename(i).dup
|
137
|
+
basename << prepend_this
|
138
|
+
_ = left_aligned_text(basename.tr('_',' '))
|
139
|
+
_.make_bold
|
140
|
+
_.make_selectable
|
141
|
+
return _
|
142
|
+
end
|
143
|
+
|
144
|
+
# ========================================================================= #
|
145
|
+
# === n_pdf_pages?
|
146
|
+
# ========================================================================= #
|
147
|
+
def n_pdf_pages?(
|
148
|
+
i
|
149
|
+
)
|
150
|
+
return ::PdfParadise.n_pdf_pages?(i)
|
151
|
+
end
|
152
|
+
|
153
|
+
# ========================================================================= #
|
154
|
+
# === connect_the_skeleton (connect tag)
|
155
|
+
# ========================================================================= #
|
156
|
+
def connect_the_skeleton
|
157
|
+
abort_on_exception
|
158
|
+
|
159
|
+
hbox = create_hbox
|
160
|
+
hbox.horizontal_center
|
161
|
+
|
162
|
+
@outer_vbox.minimal(hbox)
|
163
|
+
_ = scrolled_window(@grid)
|
164
|
+
_.width_height(800, 600)
|
165
|
+
@outer_vbox.minimal(_)
|
166
|
+
populate_the_grid
|
167
|
+
|
168
|
+
window = create_window_or_runner(nil, width?, height?, title?)
|
169
|
+
window << @outer_vbox
|
170
|
+
|
171
|
+
properly_prepare_this_window(window,
|
172
|
+
{
|
173
|
+
title: title?,
|
174
|
+
font: font?,
|
175
|
+
width: width?,
|
176
|
+
height: height?,
|
177
|
+
padding: padding?,
|
178
|
+
border_size: border_size?
|
179
|
+
}
|
180
|
+
)
|
181
|
+
|
182
|
+
window.show_all
|
183
|
+
window.top_left
|
184
|
+
run_main
|
185
|
+
end
|
186
|
+
|
187
|
+
# ========================================================================= #
|
188
|
+
# === favourites?
|
189
|
+
# ========================================================================= #
|
190
|
+
def favourites?
|
191
|
+
@book_object.favourites?
|
192
|
+
end
|
193
|
+
|
194
|
+
# ========================================================================= #
|
195
|
+
# === do_remove_the_first_page_at_this_index
|
196
|
+
# ========================================================================= #
|
197
|
+
def do_remove_the_first_page_at_this_index(
|
198
|
+
index
|
199
|
+
)
|
200
|
+
Thread.new {
|
201
|
+
target = @hash_containing_the_absolute_paths_to_the_pdf_files[index]
|
202
|
+
@book_object.remove_the_first_page_of_this_target(target)
|
203
|
+
}
|
204
|
+
end
|
205
|
+
|
206
|
+
# ========================================================================= #
|
207
|
+
# === Roebe::GUI::Books.run
|
208
|
+
# ========================================================================= #
|
209
|
+
def self.run(
|
210
|
+
i = ARGV
|
211
|
+
)
|
212
|
+
require 'gtk_paradise/base_module/base_module.rb'
|
213
|
+
require 'gtk_paradise/run'
|
214
|
+
_ = ::Roebe::GUI::Books.new(i, :do_not_run_yet)
|
215
|
+
r = ::Gtk.run { :auto_accel }
|
216
|
+
r << frame
|
217
|
+
r.automatic
|
218
|
+
r.top_left_then_run
|
219
|
+
end
|
220
|
+
|
221
|
+
# ========================================================================= #
|
222
|
+
# === Roebe::GUI::Books[]
|
223
|
+
# ========================================================================= #
|
224
|
+
def self.[](i = ARGV)
|
225
|
+
new(i)
|
226
|
+
end
|
227
|
+
|
228
|
+
end; end; end
|
229
|
+
|
230
|
+
if __FILE__ == $PROGRAM_NAME
|
231
|
+
Roebe::GUI::Books.new(ARGV)
|
232
|
+
end # calculator.rb
|
File without changes
|
data/lib/roebe/irb/clean_irbrc
CHANGED
data/lib/roebe/math/log10.rb
CHANGED
@@ -18,7 +18,7 @@ class Log10 < Base # === Roebe::Log10
|
|
18
18
|
# ========================================================================= #
|
19
19
|
def initialize(*i)
|
20
20
|
reset
|
21
|
-
|
21
|
+
set_commandline_arguments(i)
|
22
22
|
run
|
23
23
|
end
|
24
24
|
|
@@ -30,10 +30,10 @@ class Log10 < Base # === Roebe::Log10
|
|
30
30
|
end
|
31
31
|
|
32
32
|
# ========================================================================= #
|
33
|
-
# ===
|
33
|
+
# === run (run tag)
|
34
34
|
# ========================================================================= #
|
35
35
|
def run
|
36
|
-
|
36
|
+
commandline_arguments?.each {|entry|
|
37
37
|
e Math.log10(entry.to_f)
|
38
38
|
}
|
39
39
|
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# === Roebe::TheCollatzProblem
|
6
|
+
#
|
7
|
+
# This class implements the collatz algorithm.
|
8
|
+
#
|
9
|
+
# It will limit the attempts, though, to avoid infinite recursion.
|
10
|
+
#
|
11
|
+
# The individual steps this does are as follows:
|
12
|
+
#
|
13
|
+
# (1) Start with any natural number, such as 19.
|
14
|
+
# (2) if n is even, take n/2 as the next number.
|
15
|
+
# (3) if n is odd, take 3n+1 as the next number instead.
|
16
|
+
# (4) repeat the same procedure.
|
17
|
+
#
|
18
|
+
# This series enters a cycle, where the three numbers 4, 2 and 1 are
|
19
|
+
# constantly repeated.
|
20
|
+
# =========================================================================== #
|
21
|
+
# require 'roebe/math/the_collatz_problem.rb'
|
22
|
+
# Roebe::TheCollatzProblem.new(ARGV)
|
23
|
+
# =========================================================================== #
|
24
|
+
require 'roebe/base/base.rb'
|
25
|
+
|
26
|
+
module Roebe
|
27
|
+
|
28
|
+
class TheCollatzProblem < Base # === Roebe::TheCollatzProblem
|
29
|
+
|
30
|
+
# ========================================================================= #
|
31
|
+
# === TRY_THIS_NUMBER_BY_DEFAULT
|
32
|
+
# ========================================================================= #
|
33
|
+
TRY_THIS_NUMBER_BY_DEFAULT = 19
|
34
|
+
|
35
|
+
# ========================================================================= #
|
36
|
+
# === initialize
|
37
|
+
#
|
38
|
+
# If the input number is 19 then we will see this series:
|
39
|
+
#
|
40
|
+
# n=19: 19, 58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 4, 2, 1, …
|
41
|
+
#
|
42
|
+
# ========================================================================= #
|
43
|
+
def initialize(*i)
|
44
|
+
reset
|
45
|
+
set_commandline_arguments(i)
|
46
|
+
run
|
47
|
+
end
|
48
|
+
|
49
|
+
# ========================================================================= #
|
50
|
+
# === reset (reset tag)
|
51
|
+
# ========================================================================= #
|
52
|
+
def reset
|
53
|
+
super()
|
54
|
+
# ======================================================================= #
|
55
|
+
# === @try_n_runs
|
56
|
+
# ======================================================================= #
|
57
|
+
@try_n_runs = 24 # Limit how often we try this. Avoids infinite loops too!
|
58
|
+
end
|
59
|
+
|
60
|
+
# ========================================================================= #
|
61
|
+
# === default_print
|
62
|
+
# ========================================================================= #
|
63
|
+
def default_print(n)
|
64
|
+
print n, ', '
|
65
|
+
end
|
66
|
+
|
67
|
+
# ========================================================================= #
|
68
|
+
# === run (run tag)
|
69
|
+
# ========================================================================= #
|
70
|
+
def run
|
71
|
+
_ = first?
|
72
|
+
if _.nil? or _.empty?
|
73
|
+
_ = TRY_THIS_NUMBER_BY_DEFAULT
|
74
|
+
end
|
75
|
+
counter = 1
|
76
|
+
n = _.to_i
|
77
|
+
default_print(n) # Report it initially once.
|
78
|
+
loop {
|
79
|
+
counter += 1
|
80
|
+
if counter > @try_n_runs
|
81
|
+
break
|
82
|
+
end
|
83
|
+
# ===================================================================== #
|
84
|
+
# if n is even, take n/2 as the next number:
|
85
|
+
# ===================================================================== #
|
86
|
+
if n.even?
|
87
|
+
n = n/2
|
88
|
+
# ===================================================================== #
|
89
|
+
# if n is odd, take 3n+1 as the next number instead.
|
90
|
+
# ===================================================================== #
|
91
|
+
elsif n.odd?
|
92
|
+
n = (3 * n) + 1
|
93
|
+
else
|
94
|
+
end
|
95
|
+
default_print(n)
|
96
|
+
}
|
97
|
+
e # Trailing newline makes this prettier, in my opinion.
|
98
|
+
end
|
99
|
+
|
100
|
+
end; end
|
101
|
+
|
102
|
+
if __FILE__ == $PROGRAM_NAME
|
103
|
+
Roebe::TheCollatzProblem.new(ARGV)
|
104
|
+
end # rb TheCollatzProblem.rb 10
|
@@ -2,11 +2,11 @@
|
|
2
2
|
# Encoding: UTF-8
|
3
3
|
# frozen_string_literal: true
|
4
4
|
# =========================================================================== #
|
5
|
-
# require 'roebe/
|
5
|
+
# require 'roebe/requires/require_lighttpd.rb'
|
6
6
|
# Roebe.stop_lighty
|
7
7
|
# =========================================================================== #
|
8
8
|
module Roebe
|
9
9
|
|
10
|
-
require 'roebe/classes/
|
10
|
+
require 'roebe/classes/lighttpd/lighttpd_wrapper.rb' # Since May 2023 that class handles lighttpd-related stuff.
|
11
11
|
|
12
12
|
end
|
@@ -172,7 +172,7 @@ class Shell < Base # === Roebe::Shell
|
|
172
172
|
end
|
173
173
|
|
174
174
|
begin
|
175
|
-
require 'rbt/
|
175
|
+
require 'rbt/cookbooks/url/url.rb'
|
176
176
|
rescue LoadError; end
|
177
177
|
|
178
178
|
require 'open-uri'
|
@@ -369,7 +369,7 @@ class Shell < Base # === Roebe::Shell
|
|
369
369
|
# ========================================================================= #
|
370
370
|
if ::Roebe.is_on_roebe?
|
371
371
|
begin
|
372
|
-
require 'multimedia_paradise/constants/
|
372
|
+
require 'multimedia_paradise/constants/constants.rb'
|
373
373
|
# ======================================================================= #
|
374
374
|
# === FILE_VIDEO_COLLECTION
|
375
375
|
#
|
@@ -3604,7 +3604,7 @@ ROEBE_SUBSECTION
|
|
3604
3604
|
# ========================================================================= #
|
3605
3605
|
def merge(*i)
|
3606
3606
|
begin
|
3607
|
-
require 'multimedia_paradise/toplevel_methods/
|
3607
|
+
require 'multimedia_paradise/toplevel_methods/merge.rb'
|
3608
3608
|
rescue LoadError; end
|
3609
3609
|
i.flatten! if i.is_a? Array # Make sure we have a flat array.
|
3610
3610
|
case i.to_s
|
@@ -10933,7 +10933,7 @@ ROEBE_SUBSECTION
|
|
10933
10933
|
end
|
10934
10934
|
|
10935
10935
|
begin
|
10936
|
-
require 'multimedia_paradise/
|
10936
|
+
require 'multimedia_paradise/toplevel_methods/conversions.rb'
|
10937
10937
|
rescue LoadError; end
|
10938
10938
|
# ========================================================================= #
|
10939
10939
|
# === mp3_to_wav
|
@@ -14095,7 +14095,7 @@ ROEBE_SUBSECTION
|
|
14095
14095
|
# ========================================================================= #
|
14096
14096
|
def show_the_homepage_of(i)
|
14097
14097
|
begin
|
14098
|
-
require 'rbt/cookbooks/homepage.rb'
|
14098
|
+
require 'rbt/cookbooks/homepage/homepage.rb'
|
14099
14099
|
rescue LoadError; end
|
14100
14100
|
[i].flatten.compact.each {|this_program|
|
14101
14101
|
result = RBT.homepage(this_program)
|
@@ -23997,7 +23997,7 @@ ROEBE_SUBSECTION
|
|
23997
23997
|
end
|
23998
23998
|
|
23999
23999
|
begin
|
24000
|
-
require 'multimedia_paradise/constants/
|
24000
|
+
require 'multimedia_paradise/constants/constants.rb'
|
24001
24001
|
rescue LoadError; end
|
24002
24002
|
# ========================================================================= #
|
24003
24003
|
# === favourite_audio_files?
|
File without changes
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
title: %n;; command: /usr/bin/bash -c 'd150'
|
2
|
+
title: %n;; command: /usr/bin/bash
|
3
|
+
title: %n;; command: /usr/bin/bash -c '/usr/bin/konsole_title 1'
|
4
|
+
title: %n;; command: /usr/bin/bash -c '/usr/bin/konsole_title 2'
|
5
|
+
title: %n;; command: /usr/bin/bash -c '/usr/bin/konsole_title 3'
|
6
|
+
title: %n;; command: /usr/bin/bash -c '/usr/bin/konsole_title 4'
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# =========================================================================== #
|
2
|
-
# This is the instruction for Binutils 1st pass
|
2
|
+
# This is the instruction for Binutils 1st pass.
|
3
|
+
# =========================================================================== #
|
4
|
+
# https://www.linuxfromscratch.org/lfs/view/stable/chapter05/binutils-pass1.html
|
3
5
|
# =========================================================================== #
|
4
6
|
source /home/x/programming/ruby/src/roebe/lib/roebe/shell_scripts/lfs/lfs_build_variables.sh
|
5
7
|
|
@@ -11,7 +13,13 @@ cd $MY_BINUTILSV
|
|
11
13
|
|
12
14
|
mkdir -v build
|
13
15
|
cd build
|
14
|
-
../configure --prefix=$LFS/tools
|
16
|
+
../configure --prefix=$LFS/tools \
|
17
|
+
--with-sysroot=$LFS \
|
18
|
+
--target=$LFS_TGT \
|
19
|
+
--disable-nls \
|
20
|
+
--enable-gprofng=no \
|
21
|
+
--disable-werror \
|
22
|
+
--enable-default-hash-style=gnu
|
15
23
|
make
|
16
24
|
make install # -j1
|
17
25
|
# =========================================================================== #
|