roebe 0.5.120 → 0.5.121

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +57 -34
  3. data/doc/README.gen +56 -33
  4. data/doc/add_ons_for_ruby/fxruby.md +14 -0
  5. data/doc/add_ons_for_ruby/prawn.md +12 -0
  6. data/doc/sinatra_tutorial/sinatra_tutorial.rb +52 -22
  7. data/lib/roebe/base/colours.rb +59 -50
  8. data/lib/roebe/classes/create_file_skeleton/generate_ruby_string.rb +1 -0
  9. data/lib/roebe/classes/current_monitor_resolution.rb +27 -9
  10. data/lib/roebe/classes/do_install.rb +1 -9
  11. data/lib/roebe/classes/done.rb +1 -9
  12. data/lib/roebe/classes/done_and_open.rb +2 -13
  13. data/lib/roebe/classes/email.rb +36 -26
  14. data/lib/roebe/classes/find_out_version_of.rb +1 -5
  15. data/lib/roebe/classes/find_static_libraries.rb +1 -18
  16. data/lib/roebe/classes/fluxbox/generate_fluxbox_apps_file.rb +1 -9
  17. data/lib/roebe/classes/generate_fstab_file/generate_fstab_file.rb +1 -9
  18. data/lib/roebe/classes/generate_master_shell_script.rb +1 -13
  19. data/lib/roebe/classes/generate_system_values.rb +1 -9
  20. data/lib/roebe/classes/get_dependencies.rb +1 -9
  21. data/lib/roebe/classes/good_night.rb +1 -5
  22. data/lib/roebe/classes/google_url_cleaner.rb +1 -9
  23. data/lib/roebe/classes/grant_superuser_rights.rb +0 -5
  24. data/lib/roebe/classes/run/run.rb +130 -105
  25. data/lib/roebe/classes/symlink_files_from_that_directory_to_the_current_directory/symlink_files_from_that_directory_to_the_current_directory.rb +10 -1
  26. data/lib/roebe/classes/time/current_time_in_singapore.rb +1 -5
  27. data/lib/roebe/classes/umlaut_converter.rb +1 -1
  28. data/lib/roebe/classes/use_jruby.rb +68 -0
  29. data/lib/roebe/documentation/prawn.md +0 -11
  30. data/lib/roebe/gui/gtk3/shell/misc.rb +94 -0
  31. data/lib/roebe/gui/gtk3/shell/shell.rb +690 -10
  32. data/lib/roebe/gui/libui/shell/shell.rb +107 -0
  33. data/lib/roebe/gui/shared_code/shell/shell_module.rb +0 -601
  34. data/lib/roebe/pdf/README.md +1 -0
  35. data/lib/roebe/pdf/prawn/all_in_one_showcasing_prawn.rb +160 -0
  36. data/lib/roebe/requires/require_the_run_class.rb +7 -0
  37. data/lib/roebe/shell/shell/class_methods.rb +25 -0
  38. data/lib/roebe/shell/shell/core/browser.rb +4 -1
  39. data/lib/roebe/shell/shell/core/cat.rb +34 -28
  40. data/lib/roebe/shell/shell/core/disable.rb +12 -1
  41. data/lib/roebe/shell/shell/core/esystem.rb +10 -1
  42. data/lib/roebe/shell/shell/core/help.rb +24 -21
  43. data/lib/roebe/shell/shell/core/queries.rb +7 -7
  44. data/lib/roebe/shell/shell/core/set.rb +15 -0
  45. data/lib/roebe/shell/shell/core/show_display_feedback_and_report.rb +11 -7
  46. data/lib/roebe/shell/shell/core/stat.rb +4 -1
  47. data/lib/roebe/shell/shell/menu.rb +231 -173
  48. data/lib/roebe/shell/shell/shell.rb +77 -77
  49. data/lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb +9 -0
  50. data/lib/roebe/version/version.rb +2 -2
  51. data/lib/roebe/www/cancer/cancer.rb +10 -5
  52. data/lib/roebe/www/cellbiology/cellbiology.rb +4 -0
  53. data/lib/roebe/www/covid19/covid19.rb +32 -6
  54. data/lib/roebe/www/developmental_biology/developmental_biology.rb +16 -4
  55. data/lib/roebe/www/genomics/genomics.rb +27 -3
  56. data/lib/roebe/www/hardware/computersysteme/computersysteme.rb +25 -13
  57. data/lib/roebe/www/libreoffice/libreoffice.rb +22 -5
  58. data/lib/roebe/www/lighttpd/autogenerated_lighttpd.conf +1 -1
  59. data/lib/roebe/www/lighttpd/configuration/redirects.conf +1 -1
  60. data/lib/roebe/www/links/links.rb +1 -1
  61. data/lib/roebe/www/mathematics/mathematics.rb +48 -24
  62. data/lib/roebe/www/neurobiology/neurobiology.rb +13 -3
  63. data/lib/roebe/www/virology/virology.rb +81 -58
  64. data/lib/roebe/www/weechat/weechat.cgi +1 -1
  65. data/lib/roebe/www/weechat/weechat.rb +4 -5
  66. data/lib/roebe/www/wlan/wlan.rb +9 -3
  67. metadata +12 -7
  68. data/lib/roebe/classes/monitor_resolution.rb +0 -95
  69. data/lib/roebe/gui/gtk2/shell/shell.rb +0 -37
  70. data/lib/roebe/gui/shared_code/shell/connect_skeleton.rb +0 -53
  71. data/lib/roebe/gui/shared_code/shell/constants.rb +0 -82
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa1a2f0cdbbff340235dc00434f2470dee67f52285ca32fc4e8f80e06826335d
4
- data.tar.gz: 3de92297fc2dd02993c2905e806d397c825d25c3f19bd5026c8667be36faf49c
3
+ metadata.gz: 06eccabbcf87691cec4f6540daf190127813031321ad2bc006e66a6d8ccf26eb
4
+ data.tar.gz: 692fa127104bfe204b2ff1c5916f9618085d7f37a95da5405b23087378903ae0
5
5
  SHA512:
6
- metadata.gz: 32a290966aa80fa9d3a8f39d4ccec6ba824d534554aa57d918f5b8c8c02eb23d6c3ee515560a6da307aa9c7d097eb766a508942e064bd7cde636f2f11a6dafa5
7
- data.tar.gz: 6946944801715cdf3f5a61c1ed94eb26fbd9a31f08312085f04e56d32424b0e7ab8b0b907fc62e053baeefe3dd4a0475a22efe82ca420f7f904ff6a2f4b32807
6
+ metadata.gz: ffe2702e58ab5b4abdb18fe1dd1976b50d517df4428842ce50ba44a3a42585d3258be5412f272759a70e21a97b728744a99c2b3b3eea0bb0960586329e259880
7
+ data.tar.gz: 690f734508cb703306a36a637cd1c6187d7f88f137117061481e1499961c144678503493e821dc35333ace4198cffee38c067e32a91ac41035dfab40254cde8b
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">30.07.2022</span> (dd.mm.yyyy notation), at <span style="color: steelblue; font-weight: bold">14:15:13</span> o'clock.
5
+ This gem was <b>last updated</b> on the <span style="color: darkblue; font-weight: bold">06.08.2022</span> (dd.mm.yyyy notation), at <span style="color: steelblue; font-weight: bold">00:07:22</span> o'clock.
6
6
 
7
7
  ## Introducing the Roebe project
8
8
 
@@ -1425,39 +1425,6 @@ Eventually I may auto-generate the UUID entry as well, but for now
1425
1425
  I only wanted to remove the old code from **Roebe::FstabAppender**
1426
1426
  really.
1427
1427
 
1428
- ## GUIs: Graphical User Interfaces
1429
-
1430
- The roebe gem comes with a few GUI bindings. These are mostly just small
1431
- things, for demo-purposes.
1432
-
1433
- Traditionally I have been using ruby-gtk, but since as of 2021 I am also
1434
- using **libui**. Expect more libui-centric widgets to be added over the coming
1435
- years.
1436
-
1437
- To keep track which widgets were ported already the following small table
1438
- may be useful but it may become outdated eventually:
1439
-
1440
- (1) show_ten_aliases.rb # Just show the next ten exam topics; evidently only useful on my home system really
1441
- (2) wlan_interface.rb # This is about 80% complete; the combo-box is missing so far and the middle-buttons.
1442
- (3) interactive_caesar_cipher.rb # This is mostly complete; could need some minor improvements but for now it's fine.
1443
- (4) show_aliases # This is mostly complete, about 98%. Perhaps a few minor tweaks but for now it's fine.
1444
-
1445
- Since as of **September 2021 I** am experimenting with the project called
1446
- **simple_widgets**. The idea behind this project is to make it
1447
- possible to use different GUI toolkits. As to whether this will be used
1448
- for the whole code base remains to be seen.
1449
-
1450
- For now the first widget has been ported onto SimpleWidgets. Invoke this
1451
- from the commandline via:
1452
-
1453
- roebe --caesar-gtk # for the gtk variant
1454
- roebe --caesar-libui # for the libui variant
1455
-
1456
- You need ruby-gtk3 and ruby-libui for this, so install these first.
1457
-
1458
- We there use the same code base, but can support both ruby-gtk as
1459
- well as ruby-libui at the same time. \o/
1460
-
1461
1428
  ## class Roebe::SymlinkFilesFromThatDirectoryToTheCurrentDirectory.new
1462
1429
 
1463
1430
  First, before explaining what this class do, let's see how to use
@@ -2396,6 +2363,22 @@ may benefit from this class, but I realised that not a single
2396
2363
  other project ever made use of that code - so, better to get
2397
2364
  rid of "dead" code instead.
2398
2365
 
2366
+ ### The gtk-shell interface
2367
+
2368
+ There is a GUI for the shell, in <b>ruby-gtk3</b>. It is not
2369
+ the prettiest thing in the world, but I wanted to be able to
2370
+ use a GUI for the shell.
2371
+
2372
+ The following picture shows how this may look (in <b>August
2373
+ 2022</b>):
2374
+
2375
+ <img src="https://i.imgur.com/Vb0pySJ.png" style="margin: 1em">
2376
+
2377
+ This may not be extremely pretty, but for now getting the
2378
+ functionality to work without any bugs is the most important
2379
+ objective. At a later this may be improved upon, visually
2380
+ as well.
2381
+
2399
2382
  ## class Roebe::Configuration::Configuration
2400
2383
 
2401
2384
  This class used to be a separate project (a standalone gem),
@@ -2505,6 +2488,46 @@ so far:
2505
2488
  Roebe::TakeScreenshot | TakeScreenshot.java | 80%
2506
2489
  Roebe::ShowPrimeNumbers | ShowPrimeNumbers.java | 10%
2507
2490
 
2491
+ ## GUIs: Graphical User Interfaces
2492
+
2493
+ The <b>roebe</b> gem comes with a few GUI bindings. These are mostly just
2494
+ small things, for demo-purposes. For reasons of simplicity I consider
2495
+ www-specific code to be a GUI as well, such as any interface through
2496
+ the sinatra gem.
2497
+
2498
+ Traditionally I have been using ruby-gtk, but since as of 2021 I am also
2499
+ using **libui**. Expect more libui-centric widgets to be added over the
2500
+ coming years.
2501
+
2502
+ To keep track which widgets were ported already the following small table
2503
+ may be useful but it may become outdated eventually:
2504
+
2505
+ (1) show_ten_aliases.rb # Just show the next ten exam topics; evidently only useful on my home system really
2506
+ (2) wlan_interface.rb # This is about 80% complete; the combo-box is missing so far and the middle-buttons.
2507
+ (3) interactive_caesar_cipher.rb # This is mostly complete; could need some minor improvements but for now it's fine.
2508
+ (4) show_aliases # This is mostly complete, about 98%. Perhaps a few minor tweaks but for now it's fine.
2509
+
2510
+ Since as of **September 2021 I** am experimenting with the project called
2511
+ **simple_widgets**. The idea behind this project is to make it
2512
+ possible to use different GUI toolkits. As to whether this will be used
2513
+ for the whole code base remains to be seen.
2514
+
2515
+ For now the first widget has been ported onto SimpleWidgets. Invoke this
2516
+ from the commandline via:
2517
+
2518
+ roebe --caesar-gtk # for the gtk variant
2519
+ roebe --caesar-libui # for the libui variant
2520
+
2521
+ You need ruby-gtk3 and ruby-libui for this, so install these first.
2522
+
2523
+ We there use the same code base, but can support both ruby-gtk as
2524
+ well as ruby-libui at the same time. \o/
2525
+
2526
+ Since as of <b>August 2022</b> the ruby-gtk2 bindings have been
2527
+ mildly deprecated. They may remain as part of the roebe gem,
2528
+ but it is unlikely that any new ruby-gtk2 code is added. ruby-gtk3
2529
+ is better than ruby-gtk2 at this point in time.
2530
+
2508
2531
 
2509
2532
  ## Contact information and mandatory 2FA coming up in 2022
2510
2533
 
data/doc/README.gen CHANGED
@@ -1422,39 +1422,6 @@ Eventually I may auto-generate the UUID entry as well, but for now
1422
1422
  I only wanted to remove the old code from **Roebe::FstabAppender**
1423
1423
  really.
1424
1424
 
1425
- ## GUIs: Graphical User Interfaces
1426
-
1427
- The roebe gem comes with a few GUI bindings. These are mostly just small
1428
- things, for demo-purposes.
1429
-
1430
- Traditionally I have been using ruby-gtk, but since as of 2021 I am also
1431
- using **libui**. Expect more libui-centric widgets to be added over the coming
1432
- years.
1433
-
1434
- To keep track which widgets were ported already the following small table
1435
- may be useful but it may become outdated eventually:
1436
-
1437
- (1) show_ten_aliases.rb # Just show the next ten exam topics; evidently only useful on my home system really
1438
- (2) wlan_interface.rb # This is about 80% complete; the combo-box is missing so far and the middle-buttons.
1439
- (3) interactive_caesar_cipher.rb # This is mostly complete; could need some minor improvements but for now it's fine.
1440
- (4) show_aliases # This is mostly complete, about 98%. Perhaps a few minor tweaks but for now it's fine.
1441
-
1442
- Since as of **September 2021 I** am experimenting with the project called
1443
- **simple_widgets**. The idea behind this project is to make it
1444
- possible to use different GUI toolkits. As to whether this will be used
1445
- for the whole code base remains to be seen.
1446
-
1447
- For now the first widget has been ported onto SimpleWidgets. Invoke this
1448
- from the commandline via:
1449
-
1450
- roebe --caesar-gtk # for the gtk variant
1451
- roebe --caesar-libui # for the libui variant
1452
-
1453
- You need ruby-gtk3 and ruby-libui for this, so install these first.
1454
-
1455
- We there use the same code base, but can support both ruby-gtk as
1456
- well as ruby-libui at the same time. \o/
1457
-
1458
1425
  ## class Roebe::SymlinkFilesFromThatDirectoryToTheCurrentDirectory.new
1459
1426
 
1460
1427
  First, before explaining what this class do, let's see how to use
@@ -2393,6 +2360,22 @@ may benefit from this class, but I realised that not a single
2393
2360
  other project ever made use of that code - so, better to get
2394
2361
  rid of "dead" code instead.
2395
2362
 
2363
+ ### The gtk-shell interface
2364
+
2365
+ There is a GUI for the shell, in <b>ruby-gtk3</b>. It is not
2366
+ the prettiest thing in the world, but I wanted to be able to
2367
+ use a GUI for the shell.
2368
+
2369
+ The following picture shows how this may look (in <b>August
2370
+ 2022</b>):
2371
+
2372
+ <img src="https://i.imgur.com/Vb0pySJ.png" style="margin: 1em">
2373
+
2374
+ This may not be extremely pretty, but for now getting the
2375
+ functionality to work without any bugs is the most important
2376
+ objective. At a later this may be improved upon, visually
2377
+ as well.
2378
+
2396
2379
  ## class Roebe::Configuration::Configuration
2397
2380
 
2398
2381
  This class used to be a separate project (a standalone gem),
@@ -2502,4 +2485,44 @@ so far:
2502
2485
  Roebe::TakeScreenshot | TakeScreenshot.java | 80%
2503
2486
  Roebe::ShowPrimeNumbers | ShowPrimeNumbers.java | 10%
2504
2487
 
2488
+ ## GUIs: Graphical User Interfaces
2489
+
2490
+ The <b>roebe</b> gem comes with a few GUI bindings. These are mostly just
2491
+ small things, for demo-purposes. For reasons of simplicity I consider
2492
+ www-specific code to be a GUI as well, such as any interface through
2493
+ the sinatra gem.
2494
+
2495
+ Traditionally I have been using ruby-gtk, but since as of 2021 I am also
2496
+ using **libui**. Expect more libui-centric widgets to be added over the
2497
+ coming years.
2498
+
2499
+ To keep track which widgets were ported already the following small table
2500
+ may be useful but it may become outdated eventually:
2501
+
2502
+ (1) show_ten_aliases.rb # Just show the next ten exam topics; evidently only useful on my home system really
2503
+ (2) wlan_interface.rb # This is about 80% complete; the combo-box is missing so far and the middle-buttons.
2504
+ (3) interactive_caesar_cipher.rb # This is mostly complete; could need some minor improvements but for now it's fine.
2505
+ (4) show_aliases # This is mostly complete, about 98%. Perhaps a few minor tweaks but for now it's fine.
2506
+
2507
+ Since as of **September 2021 I** am experimenting with the project called
2508
+ **simple_widgets**. The idea behind this project is to make it
2509
+ possible to use different GUI toolkits. As to whether this will be used
2510
+ for the whole code base remains to be seen.
2511
+
2512
+ For now the first widget has been ported onto SimpleWidgets. Invoke this
2513
+ from the commandline via:
2514
+
2515
+ roebe --caesar-gtk # for the gtk variant
2516
+ roebe --caesar-libui # for the libui variant
2517
+
2518
+ You need ruby-gtk3 and ruby-libui for this, so install these first.
2519
+
2520
+ We there use the same code base, but can support both ruby-gtk as
2521
+ well as ruby-libui at the same time. \o/
2522
+
2523
+ Since as of <b>August 2022</b> the ruby-gtk2 bindings have been
2524
+ mildly deprecated. They may remain as part of the roebe gem,
2525
+ but it is unlikely that any new ruby-gtk2 code is added. ruby-gtk3
2526
+ is better than ruby-gtk2 at this point in time.
2527
+
2505
2528
  ADD_CONTACT_INFORMATION
@@ -0,0 +1,14 @@
1
+ ## How to require and include Fox
2
+
3
+ require 'fox16'
4
+ include Fox
5
+
6
+ # Or alternatively
7
+
8
+ require 'fox14'
9
+ include Fox
10
+
11
+ ## How to instantiate a new main application
12
+
13
+ main_application = Fox::FXApp.new
14
+ main_window = Fox::FXMainWindow.new(main_application, "This Is A Title")
@@ -0,0 +1,12 @@
1
+ ## Use a particular font size:
2
+
3
+ Prawn::Document.generate("example.pdf") do
4
+ font "Times-Roman"
5
+ draw_text "Hello World", at: [200,720], size: 32
6
+ end
7
+
8
+ ## Generate a .pdf file with a specific page size:
9
+
10
+ pdf = Prawn::Document.new(page_size: "A4",
11
+ page_layout: :landscape
12
+ )
@@ -1,3 +1,4 @@
1
+ # http://localhost/programming/ruby/src/roebe/doc/sinatra_tutorial/sinatra_tutorial.cgi
1
2
  english('Sinatra Tutorial') {
2
3
  autoextend
3
4
  ruby_favicon
@@ -41,7 +42,7 @@ doc('mar0px pad0px s0_8em') {
41
42
  # ========================================================================= #
42
43
  sinatra_header 'Requiring sinatra','BO marb1px'
43
44
  p_default {
44
- fragebr 'How do we require sinatra?'
45
+ frage 'How do we require sinatra?'
45
46
  cmd " require 'sinatra'"
46
47
  }
47
48
  # ========================================================================= #
@@ -73,10 +74,10 @@ doc('mar0px pad0px s0_8em') {
73
74
  cmd2 " 'Hello, world!'"
74
75
  cmd " end"
75
76
  br
76
- anm 'Note that the method <b style="color:tomato">get()</b> is just
77
- about the most important method as far as sinatra is concerned.
77
+ anm 'Note that the method <b class="BOLD" style="color: royalblue">get()</b> is
78
+ just about the most important method as far as sinatra is concerned.
78
79
  Another fairly commonly used route are <b>post()</b> routes.'
79
- br
80
+ brbr
80
81
  e 'Routes will be processed in linear order, from top to bottom.
81
82
  This means that the last defined route is the one that will be
82
83
  in effect. More information about this can be seen
@@ -291,22 +292,6 @@ doc('mar0px pad0px s0_8em') {
291
292
  cmd 'expires 3600, :public, :must_revalidate'
292
293
  }
293
294
  # ========================================================================= #
294
- # === How can we obtain all parameters via splat in sinatra? (splat tag, all tag)
295
- # ========================================================================= #
296
- sinatra_header 'How can we obtain all parameters via splat in sinatra?',
297
- 'BO marb1px'
298
- p_default {
299
- cmd "get('/more/*') {"
300
- cmd2 ' params[:splat]'
301
- cmd '}'
302
- br
303
- e 'All parts of the URL past <b>/more/</b> will be made
304
- available in <b>:splat</b> of params[], as shown above.'
305
- br
306
- e 'To <b>obtain the full route</b> you can use
307
- <b>request.path_info</b>.'
308
- }
309
- # ========================================================================= #
310
295
  # === How do we use DELETE in sinatra?
311
296
  # ========================================================================= #
312
297
  sinatra_header 'How do we use DELETE in sinatra?','BO marb1px'
@@ -348,8 +333,8 @@ doc('mar0px pad0px s0_8em') {
348
333
  anm 'As the example shows the ? is set before the name of the
349
334
  variable. This then means that these arguments are all optional.'
350
335
  br
351
- e 'In other words: optional parameters will be enclosed
352
- via ? ?.'
336
+ e 'In other words: <b>optional parameters will be enclosed
337
+ via ? ?</b>.'
353
338
  }
354
339
  # ========================================================================= #
355
340
  # === How do we skip a route within a method?
@@ -886,6 +871,51 @@ doc('mar0px pad0px s0_8em') {
886
871
  cmd ' register Sinatra::Prawn # Use the correct name, of course.'
887
872
  }
888
873
  # ========================================================================= #
874
+ # === How can we obtain all parameters via splat in sinatra? (splat tag, all tag)
875
+ # ========================================================================= #
876
+ sinatra_header 'How can we obtain all parameters via splat in sinatra?',
877
+ 'BO marb1px'
878
+ p_default {
879
+ cmd "get('/more/*') {"
880
+ cmd2 ' params[:splat]'
881
+ cmd '}'
882
+ br
883
+ e 'All parts of the URL past <b>/more/</b> will be made
884
+ available in <b>:splat</b> of params[], as shown above.'
885
+ br
886
+ e 'To <b>obtain the full route</b> you can use
887
+ <b>request.path_info</b>.'
888
+ }
889
+ # ========================================================================= #
890
+ # === How to use a form-tag in sinatra?
891
+ # ========================================================================= #
892
+ sinatra_header 'How to use a form-tag in sinatra?',
893
+ 'BO marb1px'
894
+ p_default {
895
+ e 'The method attribute tells the form what kind of request should be
896
+ fired to the server when the submit button is clicked.'
897
+ br
898
+ e 'The POST request is typically used, because we "post" data
899
+ to the server.'
900
+ br
901
+ e 'The action attribute tells the form what specific route the
902
+ post request should be sent to.'
903
+ br
904
+ e 'Thus, a form may look like this:'
905
+ br
906
+ cmd htmlescape('<form method="POST" action="/food">')
907
+ cmd htmlescape('<p>Your Name: <input type="text" /></p>')
908
+ cmd htmlescape('<p>Your Favorite Food: <input type="text" /></p>')
909
+ cmd htmlescape('<input type="submit" />')
910
+ cmd htmlescape('</form>')
911
+ br
912
+ e 'Then you can handle the parameters via:'
913
+ br
914
+ cmd 'what = params'
915
+ cmd "if what.is_a?(Hash) and what.has_key?('textarea_for_form1')"
916
+ cmd2 " what = what['textarea_for_form1']"
917
+ }
918
+ # ========================================================================= #
889
919
  # === Links to sinatra-related websites
890
920
  # ========================================================================= #
891
921
  h2 'Links to sinatra-related websites'
@@ -39,16 +39,6 @@ class Base
39
39
  @use_colours = false
40
40
  end
41
41
 
42
- # ========================================================================= #
43
- # === rev (rev tag)
44
- # ========================================================================= #
45
- def rev(
46
- use_colours = @use_colours
47
- )
48
- return COLOURS.rev if use_colours
49
- return ''
50
- end
51
-
52
42
  # ========================================================================= #
53
43
  # === powderblue
54
44
  # ========================================================================= #
@@ -177,15 +167,7 @@ class Base
177
167
  # ========================================================================= #
178
168
  def mediumpurple(i = '')
179
169
  return COLOURS.mediumpurple(i) if @use_colours
180
- i
181
- end
182
-
183
- # ========================================================================= #
184
- # === mediumseagreen
185
- # ========================================================================= #
186
- def mediumseagreen(i = '')
187
- return COLOURS.mediumseagreen(i) if @use_colours
188
- i
170
+ return i
189
171
  end
190
172
 
191
173
  # ========================================================================= #
@@ -193,7 +175,7 @@ class Base
193
175
  # ========================================================================= #
194
176
  def darkcyan(i = '')
195
177
  return COLOURS.darkcyan(i) if @use_colours
196
- i
178
+ return i
197
179
  end
198
180
 
199
181
  # ========================================================================= #
@@ -201,7 +183,7 @@ class Base
201
183
  # ========================================================================= #
202
184
  def lime(i = '')
203
185
  return COLOURS.lime(i) if @use_colours
204
- i
186
+ return i
205
187
  end
206
188
 
207
189
  # ========================================================================= #
@@ -260,14 +242,6 @@ class Base
260
242
  i
261
243
  end
262
244
 
263
- # ========================================================================= #
264
- # === steelblue
265
- # ========================================================================= #
266
- def steelblue(i = '')
267
- return COLOURS.steelblue(i) if @use_colours
268
- i
269
- end
270
-
271
245
  # ========================================================================= #
272
246
  # === red
273
247
  # ========================================================================= #
@@ -276,14 +250,6 @@ class Base
276
250
  i
277
251
  end
278
252
 
279
- # ========================================================================= #
280
- # === orchid
281
- # ========================================================================= #
282
- def orchid(i = '')
283
- return COLOURS.orchid(i) if @use_colours
284
- i
285
- end
286
-
287
253
  # ========================================================================= #
288
254
  # === mediumorchid
289
255
  # ========================================================================= #
@@ -484,35 +450,46 @@ class Base
484
450
  end
485
451
 
486
452
  # ========================================================================= #
487
- # === pink
453
+ # === sandybrown
488
454
  # ========================================================================= #
489
- def pink(
455
+ def sandybrown(
490
456
  i = '',
491
- use_colours = @use_colours
457
+ use_colours = use_colours?
492
458
  )
493
- return COLOURS.pink(i) if use_colours
459
+ return COLOURS.sandybrown(i) if use_colours
494
460
  return i
495
461
  end
496
462
 
497
463
  # ========================================================================= #
498
- # === sandybrown
464
+ # === lightblue
499
465
  # ========================================================================= #
500
- def sandybrown(
466
+ def lightblue(
501
467
  i = '',
502
- use_colours = @use_colours
468
+ use_colours = use_colours?
503
469
  )
504
- return COLOURS.sandybrown(i) if use_colours
470
+ return COLOURS.lightblue(i) if use_colours
505
471
  return i
506
472
  end
507
473
 
508
474
  # ========================================================================= #
509
- # === lightblue
475
+ # === pink
510
476
  # ========================================================================= #
511
- def lightblue(
477
+ def pink(
512
478
  i = '',
513
- use_colours = @use_colours
479
+ use_colours = use_colours?
514
480
  )
515
- return COLOURS.lightblue(i) if use_colours
481
+ return COLOURS.pink(i) if use_colours
482
+ return i
483
+ end
484
+
485
+ # ========================================================================= #
486
+ # === mediumseagreen
487
+ # ========================================================================= #
488
+ def mediumseagreen(
489
+ i = '',
490
+ use_colours = use_colours?
491
+ )
492
+ return COLOURS.mediumseagreen(i) if use_colours
516
493
  return i
517
494
  end
518
495
 
@@ -521,10 +498,42 @@ class Base
521
498
  # ========================================================================= #
522
499
  def yellow(
523
500
  i = '',
524
- use_colours = @use_colours
501
+ use_colours = use_colours?
525
502
  )
526
503
  return COLOURS.yellow(i) if use_colours
527
504
  return i
528
505
  end; alias yel yellow # === yel
529
506
 
507
+ # ========================================================================= #
508
+ # === steelblue
509
+ # ========================================================================= #
510
+ def steelblue(
511
+ i = '',
512
+ use_colours = use_colours?
513
+ )
514
+ return COLOURS.steelblue(i) if use_colours
515
+ return i
516
+ end
517
+
518
+ # ========================================================================= #
519
+ # === rev (rev tag)
520
+ # ========================================================================= #
521
+ def rev(
522
+ use_colours = use_colours?
523
+ )
524
+ return COLOURS.rev if use_colours
525
+ return ''
526
+ end
527
+
528
+ # ========================================================================= #
529
+ # === orchid
530
+ # ========================================================================= #
531
+ def orchid(
532
+ i = '',
533
+ use_colours = use_colours?
534
+ )
535
+ return COLOURS.orchid(i) if use_colours
536
+ return i
537
+ end
538
+
530
539
  end; end
@@ -76,6 +76,7 @@ class CreateFileSkeleton < Roebe::Base
76
76
  _ ' # === @namespace'
77
77
  _ ' # ======================================================================= #'
78
78
  _ ' @namespace = NAMESPACE'
79
+ _ ' # infer_the_namespace'
79
80
  _ ' end'
80
81
  # ======================================================================= #
81
82
  # Add the method called set_commandline_arguments() next:
@@ -42,17 +42,24 @@ class CurrentMonitorResolution < Base # === Roebe::CurrentMonitorResolution
42
42
  end
43
43
 
44
44
  # ========================================================================= #
45
- # === run (run tag)
45
+ # === raw_system_command_for_xrandr
46
46
  # ========================================================================= #
47
- def run
48
- run_the_xrandr_system_command
47
+ def raw_system_command_for_xrandr
48
+ `xrandr`
49
49
  end
50
50
 
51
51
  # ========================================================================= #
52
52
  # === run_the_xrandr_system_command
53
53
  # ========================================================================= #
54
54
  def run_the_xrandr_system_command
55
- @result = `xrandr`
55
+ @result = raw_system_command_for_xrandr
56
+ sanitize_the_result
57
+ end
58
+
59
+ # ========================================================================= #
60
+ # === sanitize_result
61
+ # ========================================================================= #
62
+ def sanitize_the_result
56
63
  splitted = @result.split("\n")
57
64
  selection = splitted.select {|line| line.include? '*+' }
58
65
  if selection.is_a? Array
@@ -60,15 +67,26 @@ class CurrentMonitorResolution < Base # === Roebe::CurrentMonitorResolution
60
67
  end
61
68
  selection.strip!
62
69
  @result = selection
63
- report_the_result
64
70
  end
65
71
 
66
72
  # ========================================================================= #
67
73
  # === report_the_result
68
74
  # ========================================================================= #
69
75
  def report_the_result(i = @result)
70
- e steelblue(i)
71
- end; alias report report_the_result # === report
76
+ opnn; e lightblue('The currentmonitor resolution is: ')
77
+ e
78
+ e " #{simp(i)}"
79
+ e
80
+ end; alias report report_the_result # === report
81
+ alias report_the_monitor_resolution report_the_result # === report_the_monitor_resolution
82
+
83
+ # ========================================================================= #
84
+ # === run (run tag)
85
+ # ========================================================================= #
86
+ def run
87
+ run_the_xrandr_system_command
88
+ report_the_result
89
+ end
72
90
 
73
91
  # ========================================================================= #
74
92
  # === Roebe::CurrentMonitorResolution[]
@@ -79,11 +97,11 @@ class CurrentMonitorResolution < Base # === Roebe::CurrentMonitorResolution
79
97
  #
80
98
  # ========================================================================= #
81
99
  def self.[](i = '31.03.2018')
82
- new(i, :be_silent)
100
+ new(i)
83
101
  end
84
102
 
85
103
  end; end
86
104
 
87
105
  if __FILE__ == $PROGRAM_NAME
88
106
  Roebe::CurrentMonitorResolution.new(ARGV)
89
- end # currentmonitorresolution
107
+ end # monitorresolution
@@ -21,11 +21,6 @@ module Roebe
21
21
 
22
22
  class DoInstall < ::Roebe::Base # === Roebe::DoInstall
23
23
 
24
- # ========================================================================= #
25
- # === NAMESPACE
26
- # ========================================================================= #
27
- NAMESPACE = inspect
28
-
29
24
  # ========================================================================= #
30
25
  # === PERL_MAKEFILE
31
26
  # ========================================================================= #
@@ -53,10 +48,7 @@ class DoInstall < ::Roebe::Base # === Roebe::DoInstall
53
48
  # ========================================================================= #
54
49
  def reset
55
50
  super()
56
- # ======================================================================= #
57
- # === @namespace
58
- # ======================================================================= #
59
- @namespace = NAMESPACE
51
+ infer_the_namespace
60
52
  end
61
53
 
62
54
  # ========================================================================= #