Module: Roebe

Includes:
Encoding
Defined in:
lib/roebe/math/pi.rb,
lib/roebe/base/env.rb,
lib/roebe/base/run.rb,
lib/roebe/base/base.rb,
lib/roebe/base/copy.rb,
lib/roebe/base/misc.rb,
lib/roebe/base/next.rb,
lib/roebe/base/opnn.rb,
lib/roebe/base/simp.rb,
lib/roebe/base/time.rb,
lib/roebe/cat/class.rb,
lib/roebe/math/fact.rb,
lib/roebe/math/math.rb,
lib/roebe/time/time.rb,
lib/roebe/base/chdir.rb,
lib/roebe/base/reset.rb,
lib/roebe/classes/at.rb,
lib/roebe/classes/in.rb,
lib/roebe/math/log10.rb,
lib/roebe/base/editor.rb,
lib/roebe/classes/mbl.rb,
lib/roebe/classes/ram.rb,
lib/roebe/classes/vte.rb,
lib/roebe/linux/linux.rb,
lib/roebe/math/circle.rb,
lib/roebe/math/sphere.rb,
lib/roebe/mouse/mouse.rb,
lib/roebe/base/colours.rb,
lib/roebe/base/esystem.rb,
lib/roebe/base/symlink.rb,
lib/roebe/browser/menu.rb,
lib/roebe/browser/misc.rb,
lib/roebe/classes/dbus.rb,
lib/roebe/classes/done.rb,
lib/roebe/classes/imdb.rb,
lib/roebe/classes/into.rb,
lib/roebe/classes/quiz.rb,
lib/roebe/classes/zoll.rb,
lib/roebe/math/anagram.rb,
lib/roebe/math/binning.rb,
lib/roebe/windows/misc.rb,
lib/roebe/base/encoding.rb,
lib/roebe/browser/reset.rb,
lib/roebe/classes/clock.rb,
lib/roebe/classes/conky.rb,
lib/roebe/classes/email.rb,
lib/roebe/classes/empty.rb,
lib/roebe/classes/merge.rb,
lib/roebe/classes/mrxvt.rb,
lib/roebe/classes/my_ip.rb,
lib/roebe/classes/rdate.rb,
lib/roebe/classes/story.rb,
lib/roebe/classes/today.rb,
lib/roebe/classes/unrar.rb,
lib/roebe/classes/usage.rb,
lib/roebe/constants/www.rb,
lib/roebe/math/steigung.rb,
lib/roebe/math/zylinder.rb,
lib/roebe/www/std_linux.rb,
lib/roebe/base/constants.rb,
lib/roebe/base/prototype.rb,
lib/roebe/classes/bezirk.rb,
lib/roebe/classes/enable.rb,
lib/roebe/classes/github.rb,
lib/roebe/classes/inhalt.rb,
lib/roebe/classes/ipaste.rb,
lib/roebe/classes/nvidia.rb,
lib/roebe/classes/to_buy.rb,
lib/roebe/classes/to_utf.rb,
lib/roebe/classes/undone.rb,
lib/roebe/classes/update.rb,
lib/roebe/classes/zenity.rb,
lib/roebe/constants/misc.rb,
lib/roebe/math/draw_line.rb,
lib/roebe/modules/as_uid.rb,
lib/roebe/www/module_www.rb,
lib/roebe/browser/firefox.rb,
lib/roebe/classes/aliases.rb,
lib/roebe/classes/disable.rb,
lib/roebe/classes/holiday.rb,
lib/roebe/classes/n_files.rb,
lib/roebe/classes/n_fotos.rb,
lib/roebe/classes/rbashrc.rb,
lib/roebe/classes/run/run.rb,
lib/roebe/classes/schlafe.rb,
lib/roebe/classes/size_of.rb,
lib/roebe/classes/slogans.rb,
lib/roebe/classes/stories.rb,
lib/roebe/classes/to_next.rb,
lib/roebe/classes/upcaser.rb,
lib/roebe/colours/colours.rb,
lib/roebe/constants/roebe.rb,
lib/roebe/project/project.rb,
lib/roebe/shell/help/help.rb,
lib/roebe/version/version.rb,
lib/roebe/base/is_on_roebe.rb,
lib/roebe/browser/palemoon.rb,
lib/roebe/classes/calendar.rb,
lib/roebe/classes/ethernet.rb,
lib/roebe/classes/make_gem.rb,
lib/roebe/classes/modright.rb,
lib/roebe/classes/open_pdf.rb,
lib/roebe/classes/ruby_cat.rb,
lib/roebe/classes/ruby_seq.rb,
lib/roebe/classes/run/menu.rb,
lib/roebe/classes/terminal.rb,
lib/roebe/classes/treeview.rb,
lib/roebe/commandline/help.rb,
lib/roebe/commandline/menu.rb,
lib/roebe/commandline/misc.rb,
lib/roebe/constants/emojis.rb,
lib/roebe/browser/constants.rb,
lib/roebe/classes/all_games.rb,
lib/roebe/classes/autodater.rb,
lib/roebe/classes/clipboard.rb,
lib/roebe/classes/copy_here.rb,
lib/roebe/classes/daemonize.rb,
lib/roebe/classes/date_sort.rb,
lib/roebe/classes/fetch_url.rb,
lib/roebe/classes/identical.rb,
lib/roebe/classes/last_line.rb,
lib/roebe/classes/mount_dvd.rb,
lib/roebe/classes/move_file.rb,
lib/roebe/classes/nutrition.rb,
lib/roebe/classes/passwords.rb,
lib/roebe/classes/qemu/qemu.rb,
lib/roebe/classes/ruby_main.rb,
lib/roebe/classes/slow_load.rb,
lib/roebe/classes/test_yaml.rb,
lib/roebe/classes/to_binary.rb,
lib/roebe/classes/to_tar_gz.rb,
lib/roebe/classes/translate.rb,
lib/roebe/classes/use_jruby.rb,
lib/roebe/classes/wallpaper.rb,
lib/roebe/classes/wikipedia.rb,
lib/roebe/classes/wlan/wlan.rb,
lib/roebe/classes/word_wrap.rb,
lib/roebe/constants/newline.rb,
lib/roebe/editors/ruby_nano.rb,
lib/roebe/encoding/encoding.rb,
lib/roebe/shell/shell/shell.rb,
lib/roebe/base/verbose_truth.rb,
lib/roebe/classes/books/menu.rb,
lib/roebe/classes/check_yaml.rb,
lib/roebe/classes/create_iso.rb,
lib/roebe/classes/create_zip.rb,
lib/roebe/classes/cute_emoji.rb,
lib/roebe/classes/do_install.rb,
lib/roebe/classes/good_night.rb,
lib/roebe/classes/hex_to_rgb.rb,
lib/roebe/classes/iso_to_usb.rb,
lib/roebe/classes/meal_maker.rb,
lib/roebe/classes/move_mouse.rb,
lib/roebe/classes/n_symlinks.rb,
lib/roebe/classes/send_email.rb,
lib/roebe/classes/sourcerank.rb,
lib/roebe/classes/to_tar_bz2.rb,
lib/roebe/classes/yaml_check.rb,
lib/roebe/math/draw_triangle.rb,
lib/roebe/toplevel_methods/e.rb,
lib/roebe/windows/powershell.rb,
lib/roebe/classes/all_my_gems.rb,
lib/roebe/classes/append_this.rb,
lib/roebe/classes/automounter.rb,
lib/roebe/classes/books/books.rb,
lib/roebe/classes/file_filter.rb,
lib/roebe/classes/file_parser.rb,
lib/roebe/classes/fix_mcookie.rb,
lib/roebe/classes/hello_world.rb,
lib/roebe/classes/java_header.rb,
lib/roebe/classes/java_runner.rb,
lib/roebe/classes/line_padder.rb,
lib/roebe/classes/nano_config.rb,
lib/roebe/classes/php_to_ruby.rb,
lib/roebe/classes/publish_gem.rb,
lib/roebe/classes/random_open.rb,
lib/roebe/classes/remote_gems.rb,
lib/roebe/classes/remove_gems.rb,
lib/roebe/classes/remove_line.rb,
lib/roebe/classes/ruby_header.rb,
lib/roebe/classes/set_aliases.rb,
lib/roebe/classes/set_chained.rb,
lib/roebe/classes/set_hwclock.rb,
lib/roebe/classes/show_sigint.rb,
lib/roebe/classes/std_renamer.rb,
lib/roebe/classes/supermerger.rb,
lib/roebe/classes/tic_tac_toe.rb,
lib/roebe/classes/to_squashfs.rb,
lib/roebe/constants/constants.rb,
lib/roebe/modules/remove_html.rb,
lib/roebe/windows/usb_devices.rb,
lib/roebe/base/write_what_into.rb,
lib/roebe/classes/css_analyzer.rb,
lib/roebe/classes/day_calendar.rb,
lib/roebe/classes/file_renamer.rb,
lib/roebe/classes/fix_timezone.rb,
lib/roebe/classes/inputrc/misc.rb,
lib/roebe/classes/kill_firefox.rb,
lib/roebe/classes/misc/anteile.rb,
lib/roebe/classes/non_symlinks.rb,
lib/roebe/classes/number_files.rb,
lib/roebe/classes/prepend_this.rb,
lib/roebe/classes/rxinitrc/run.rb,
lib/roebe/classes/terminal_ps1.rb,
lib/roebe/classes/test_openssl.rb,
lib/roebe/configuration/module.rb,
lib/roebe/gui/gtk4/shell/shell.rb,
lib/roebe/toplevel_methods/env.rb,
lib/roebe/toplevel_methods/irb.rb,
lib/roebe/toplevel_methods/rds.rb,
lib/roebe/classes/add_irc_quote.rb,
lib/roebe/classes/caesar_cipher.rb,
lib/roebe/classes/dhcpcd/dhcpcd.rb,
lib/roebe/classes/done_and_open.rb,
lib/roebe/classes/foto_searcher.rb,
lib/roebe/classes/grub_appender.rb,
lib/roebe/classes/kill_palemoon.rb,
lib/roebe/classes/mrxvt_options.rb,
lib/roebe/classes/n_directories.rb,
lib/roebe/classes/pristine_gems.rb,
lib/roebe/classes/pull_together.rb,
lib/roebe/classes/rxinitrc/help.rb,
lib/roebe/classes/sorted_output.rb,
lib/roebe/classes/start_program.rb,
lib/roebe/classes/todo_overview.rb,
lib/roebe/custom_methods/module.rb,
lib/roebe/math/regel_von_sarrus.rb,
lib/roebe/shell/colours/colours.rb,
lib/roebe/shell/project/project.rb,
lib/roebe/shell/session/session.rb,
lib/roebe/shell/shell/constants.rb,
lib/roebe/sql_paradise/commands.rb,
lib/roebe/toplevel_methods/jp2a.rb,
lib/roebe/toplevel_methods/mama.rb,
lib/roebe/toplevel_methods/math.rb,
lib/roebe/toplevel_methods/misc.rb,
lib/roebe/toplevel_methods/opnn.rb,
lib/roebe/toplevel_methods/time.rb,
lib/roebe/toplevel_methods/trad.rb,
lib/roebe/toplevel_methods/wget.rb,
lib/roebe/toplevel_methods/zlib.rb,
lib/roebe/classes/append_to_line.rb,
lib/roebe/classes/calendar_maker.rb,
lib/roebe/classes/compile_kernel.rb,
lib/roebe/classes/font_installer.rb,
lib/roebe/classes/fragment_maker.rb,
lib/roebe/classes/gzip_this_file.rb,
lib/roebe/classes/hosts_appender.rb,
lib/roebe/classes/mount_iso_file.rb,
lib/roebe/classes/pad_via_quotes.rb,
lib/roebe/classes/proper_english.rb,
lib/roebe/classes/remove_missing.rb,
lib/roebe/classes/set_background.rb,
lib/roebe/classes/size_of_states.rb,
lib/roebe/classes/syntax_checker.rb,
lib/roebe/classes/system_checker.rb,
lib/roebe/classes/telnet_wrapper.rb,
lib/roebe/classes/test_for_psych.rb,
lib/roebe/classes/todo_sanitizer.rb,
lib/roebe/toplevel_methods/chdir.rb,
lib/roebe/toplevel_methods/email.rb,
lib/roebe/toplevel_methods/files.rb,
lib/roebe/toplevel_methods/ntrad.rb,
lib/roebe/toplevel_methods/regex.rb,
lib/roebe/toplevel_methods/setup.rb,
lib/roebe/toplevel_methods/video.rb,
lib/roebe/toplevel_methods/whois.rb,
lib/roebe/classes/add_user_lighty.rb,
lib/roebe/classes/basic_configure.rb,
lib/roebe/classes/copy_from_glibc.rb,
lib/roebe/classes/covid_lethality.rb,
lib/roebe/classes/cut_after_colon.rb,
lib/roebe/classes/duplicate_files.rb,
lib/roebe/classes/handle_lighttpd.rb,
lib/roebe/classes/inputrc/inputrc.rb,
lib/roebe/classes/install_my_gems.rb,
lib/roebe/classes/install_wrapper.rb,
lib/roebe/classes/kde/restore_kde.rb,
lib/roebe/classes/remove_newlines.rb,
lib/roebe/classes/set_current_iso.rb,
lib/roebe/classes/show_only_files.rb,
lib/roebe/classes/special_symlink.rb,
lib/roebe/classes/take_screenshot.rb,
lib/roebe/classes/top_ten_aliases.rb,
lib/roebe/classes/unicode_snowman.rb,
lib/roebe/classes/unified_padding.rb,
lib/roebe/classes/upload_to_imgur.rb,
lib/roebe/classes/upwards_counter.rb,
lib/roebe/classes/usb/usb_devices.rb,
lib/roebe/classes/write_what_into.rb,
lib/roebe/constants/archive_types.rb,
lib/roebe/toplevel_methods/base64.rb,
lib/roebe/toplevel_methods/chroot.rb,
lib/roebe/toplevel_methods/cliner.rb,
lib/roebe/toplevel_methods/editor.rb,
lib/roebe/toplevel_methods/enable.rb,
lib/roebe/toplevel_methods/images.rb,
lib/roebe/toplevel_methods/to_mp3.rb,
lib/roebe/classes/config_generator.rb,
lib/roebe/classes/count_characters.rb,
lib/roebe/classes/doskey_generator.rb,
lib/roebe/classes/enable_autologin.rb,
lib/roebe/classes/extract_gem_file.rb,
lib/roebe/classes/file_filters/jpg.rb,
lib/roebe/classes/find_empty_files.rb,
lib/roebe/classes/fotos_für_ingrid.rb,
lib/roebe/classes/generate_locales.rb,
lib/roebe/classes/get_dependencies.rb,
lib/roebe/classes/key_value_parser.rb,
lib/roebe/classes/nibble_converter.rb,
lib/roebe/classes/open_random_book.rb,
lib/roebe/classes/remove_directory.rb,
lib/roebe/classes/remove_extension.rb,
lib/roebe/classes/remove_localhost.rb,
lib/roebe/classes/serve_local_page.rb,
lib/roebe/classes/show_ten_aliases.rb,
lib/roebe/classes/simple_extractor.rb,
lib/roebe/classes/traverse_install.rb,
lib/roebe/classes/umlaut_converter.rb,
lib/roebe/custom_methods/constants.rb,
lib/roebe/editors/vim_paradise/run.rb,
lib/roebe/jruby/jruby_enhancements.rb,
lib/roebe/math/primfaktorzerlegung.rb,
lib/roebe/requires/require_unicode.rb,
lib/roebe/shell/module_methods/ftp.rb,
lib/roebe/sql_paradise/insert_into.rb,
lib/roebe/sql_paradise/sql_command.rb,
lib/roebe/toplevel_methods/c_debug.rb,
lib/roebe/toplevel_methods/chained.rb,
lib/roebe/toplevel_methods/disable.rb,
lib/roebe/toplevel_methods/esystem.rb,
lib/roebe/toplevel_methods/extract.rb,
lib/roebe/toplevel_methods/newstud.rb,
lib/roebe/toplevel_methods/no_caps.rb,
lib/roebe/toplevel_methods/rubyzip.rb,
lib/roebe/toplevel_methods/to_bool.rb,
lib/roebe/toplevel_methods/warning.rb,
lib/roebe/toplevel_methods/webrick.rb,
lib/roebe/toplevel_methods/windows.rb,
lib/roebe/www/embeddable_interface.rb,
lib/roebe/classes/add_newline_after.rb,
lib/roebe/classes/alltagsgeschichte.rb,
lib/roebe/classes/available_classes.rb,
lib/roebe/classes/burn_iso/burn_iso.rb,
lib/roebe/classes/colourize_numbers.rb,
lib/roebe/classes/correct_gibberish.rb,
lib/roebe/classes/english_to_german.rb,
lib/roebe/classes/filter_apache_log.rb,
lib/roebe/classes/generate_rtf_file.rb,
lib/roebe/classes/html_form_fetcher.rb,
lib/roebe/classes/inputrc/constants.rb,
lib/roebe/classes/manipulate_quotes.rb,
lib/roebe/classes/number_to_english.rb,
lib/roebe/classes/on_screen_display.rb,
lib/roebe/classes/random_background.rb,
lib/roebe/classes/replace_what_with.rb,
lib/roebe/classes/rxinitrc/rxinitrc.rb,
lib/roebe/classes/show_appointments.rb,
lib/roebe/classes/show_non_symlinks.rb,
lib/roebe/classes/symlink_directory.rb,
lib/roebe/classes/usb/automount_usb.rb,
lib/roebe/editors/vim_paradise/help.rb,
lib/roebe/editors/vim_paradise/menu.rb,
lib/roebe/linux/slackware/slackware.rb,
lib/roebe/shell/module_methods/misc.rb,
lib/roebe/sql_paradise/create_table.rb,
lib/roebe/toplevel_methods/heredocs.rb,
lib/roebe/toplevel_methods/hostname.rb,
lib/roebe/toplevel_methods/keywords.rb,
lib/roebe/toplevel_methods/lighttpd.rb,
lib/roebe/toplevel_methods/platform.rb,
lib/roebe/toplevel_methods/studium1.rb,
lib/roebe/base/commandline_arguments.rb,
lib/roebe/classes/backup_core_system.rb,
lib/roebe/classes/burn_iso/constants.rb,
lib/roebe/classes/chmod_current_time.rb,
lib/roebe/classes/copy_kernel_config.rb,
lib/roebe/classes/create_jar_archive.rb,
lib/roebe/classes/delete_empty_files.rb,
lib/roebe/classes/dhcpcd/kill_dhcpcd.rb,
lib/roebe/classes/do_a_google_search.rb,
lib/roebe/classes/downcase_extension.rb,
lib/roebe/classes/euclidian_distance.rb,
lib/roebe/classes/general_overviewer.rb,
lib/roebe/classes/generate_alsa_conf.rb,
lib/roebe/classes/generate_ls_colors.rb,
lib/roebe/classes/generate_protocols.rb,
lib/roebe/classes/google_url_cleaner.rb,
lib/roebe/classes/make_cookbooks_gem.rb,
lib/roebe/classes/one_line_passwords.rb,
lib/roebe/classes/output_random_line.rb,
lib/roebe/classes/percentage_counter.rb,
lib/roebe/classes/remove_lighty_logs.rb,
lib/roebe/classes/require_everything.rb,
lib/roebe/classes/rxinitrc/constants.rb,
lib/roebe/classes/show_prime_numbers.rb,
lib/roebe/classes/simple_boot_script.rb,
lib/roebe/classes/sum_of_all_numbers.rb,
lib/roebe/classes/threshold_splitter.rb,
lib/roebe/classes/wochentag_anzeiger.rb,
lib/roebe/classes/youtube_downloader.rb,
lib/roebe/shell/colours/colour_codes.rb,
lib/roebe/toplevel_methods/autoprune.rb,
lib/roebe/toplevel_methods/fibonacci.rb,
lib/roebe/toplevel_methods/halloween.rb,
lib/roebe/toplevel_methods/load_yaml.rb,
lib/roebe/toplevel_methods/move_file.rb,
lib/roebe/toplevel_methods/pp_output.rb,
lib/roebe/toplevel_methods/purgeboth.rb,
lib/roebe/toplevel_methods/puts_this.rb,
lib/roebe/toplevel_methods/rinstall2.rb,
lib/roebe/toplevel_methods/tokenitor.rb,
lib/roebe/toplevel_methods/variables.rb,
lib/roebe/classes/alphabetical_sorter.rb,
lib/roebe/classes/become_another_user.rb,
lib/roebe/classes/burn_iso/initialize.rb,
lib/roebe/classes/create_desktop_file.rb,
lib/roebe/classes/display_gcc_version.rb,
lib/roebe/classes/feet_to_centimetres.rb,
lib/roebe/classes/find_expanded_alias.rb,
lib/roebe/classes/find_out_version_of.rb,
lib/roebe/classes/install_debian_file.rb,
lib/roebe/classes/kde/kde_konsole/run.rb,
lib/roebe/classes/kde/konsole_new_tab.rb,
lib/roebe/classes/mark_this_directory.rb,
lib/roebe/classes/pascalsches_dreieck.rb,
lib/roebe/classes/path_generator/misc.rb,
lib/roebe/classes/prepend_todays_date.rb,
lib/roebe/classes/remove_solo_numbers.rb,
lib/roebe/classes/return_random_image.rb,
lib/roebe/classes/scan_for_http_links.rb,
lib/roebe/classes/set_normal_alias_to.rb,
lib/roebe/classes/show_kernel_modules.rb,
lib/roebe/classes/show_twenty_aliases.rb,
lib/roebe/classes/webfancy_controller.rb,
lib/roebe/gui/libui/rundll32/rundll32.rb,
lib/roebe/math/average_of_differences.rb,
lib/roebe/math/calculate_the_variance.rb,
lib/roebe/toplevel_methods/arrow_keys.rb,
lib/roebe/toplevel_methods/background.rb,
lib/roebe/toplevel_methods/cp_to_here.rb,
lib/roebe/toplevel_methods/multimedia.rb,
lib/roebe/toplevel_methods/open_ports.rb,
lib/roebe/toplevel_methods/return_pwd.rb,
lib/roebe/toplevel_methods/sitelibdir.rb,
lib/roebe/classes/check_for_bad_blocks.rb,
lib/roebe/classes/create_asoundrc_file.rb,
lib/roebe/classes/create_iso_for_games.rb,
lib/roebe/classes/downcase_directories.rb,
lib/roebe/classes/generate_grub_config.rb,
lib/roebe/classes/install_ruby_project.rb,
lib/roebe/classes/kde/kde_konsole/help.rb,
lib/roebe/classes/kde/kde_konsole/menu.rb,
lib/roebe/classes/kde/kde_konsole/misc.rb,
lib/roebe/classes/kde/kde_servicemenus.rb,
lib/roebe/classes/level_subdirectories.rb,
lib/roebe/classes/path_generator/reset.rb,
lib/roebe/classes/purge_gmon_out_files.rb,
lib/roebe/classes/readme_generator/run.rb,
lib/roebe/classes/ruby_use_config_file.rb,
lib/roebe/classes/show_available_fonts.rb,
lib/roebe/classes/show_available_users.rb,
lib/roebe/classes/skel_maker/constants.rb,
lib/roebe/classes/string_colour_parser.rb,
lib/roebe/classes/tales_from_the_crypt.rb,
lib/roebe/classes/wlan/eduroam/eduroam.rb,
lib/roebe/editors/vim_paradise/colours.rb,
lib/roebe/sql_paradise/create_database.rb,
lib/roebe/toplevel_methods/display_mbr.rb,
lib/roebe/toplevel_methods/grab_colour.rb,
lib/roebe/toplevel_methods/hello_world.rb,
lib/roebe/toplevel_methods/install_nss.rb,
lib/roebe/toplevel_methods/is_on_roebe.rb,
lib/roebe/toplevel_methods/mount_procs.rb,
lib/roebe/toplevel_methods/nano_addons.rb,
lib/roebe/toplevel_methods/remove_user.rb,
lib/roebe/toplevel_methods/return_date.rb,
lib/roebe/toplevel_methods/xorg_buffer.rb,
lib/roebe/base/home_directory_of_user_x.rb,
lib/roebe/classes/celsius_to_fahrenheit.rb,
lib/roebe/classes/create_benchmark_file.rb,
lib/roebe/classes/create_my_directories.rb,
lib/roebe/classes/extract_documentation.rb,
lib/roebe/classes/find_static_libraries.rb,
lib/roebe/classes/kde/kde_konsole/reset.rb,
lib/roebe/classes/lilo_config_generator.rb,
lib/roebe/classes/married_with_children.rb,
lib/roebe/classes/n_gems_exist_in_total.rb,
lib/roebe/classes/package_java_compiler.rb,
lib/roebe/classes/pound_to_kg_converter.rb,
lib/roebe/classes/readme_generator/misc.rb,
lib/roebe/classes/remove_file_extension.rb,
lib/roebe/classes/ruby_version_switcher.rb,
lib/roebe/classes/skel_maker/skel_maker.rb,
lib/roebe/classes/time/display_weekdays.rb,
lib/roebe/classes/time/query_world_time.rb,
lib/roebe/classes/wayland_or_xorgserver.rb,
lib/roebe/commandline/parse_commandline.rb,
lib/roebe/dosbox/generate_dosbox_config.rb,
lib/roebe/knowledge_base/knowledge_base.rb,
lib/roebe/mouse/libffi_is_not_available.rb,
lib/roebe/shell/commandline/commandline.rb,
lib/roebe/shell/module_methods/encoding.rb,
lib/roebe/shell/standalone_classes/todo.rb,
lib/roebe/toplevel_methods/install_rust.rb,
lib/roebe/toplevel_methods/sanitize_url.rb,
lib/roebe/toplevel_methods/to_camelcase.rb,
lib/roebe/base/support_for_beautiful_url.rb,
lib/roebe/classes/add_two_binary_numbers.rb,
lib/roebe/classes/birthday_notifications.rb,
lib/roebe/classes/conky_rcfile_generator.rb,
lib/roebe/classes/delete_all_directories.rb,
lib/roebe/classes/download_from_this_url.rb,
lib/roebe/classes/generate_nsswitch_conf.rb,
lib/roebe/classes/generate_rewrite_rules.rb,
lib/roebe/classes/generate_system_values.rb,
lib/roebe/classes/grant_superuser_rights.rb,
lib/roebe/classes/readme_generator/reset.rb,
lib/roebe/classes/remove_duplicate_lines.rb,
lib/roebe/classes/roman_number_converter.rb,
lib/roebe/classes/simple_markdown_parser.rb,
lib/roebe/editors/vim_paradise/constants.rb,
lib/roebe/shell/module_methods/anmeldung.rb,
lib/roebe/shell/module_methods/main_file.rb,
lib/roebe/toplevel_methods/calculate_bmi.rb,
lib/roebe/toplevel_methods/display_array.rb,
lib/roebe/toplevel_methods/prime_numbers.rb,
lib/roebe/toplevel_methods/to_underscore.rb,
lib/roebe/toplevel_methods/update_pciids.rb,
lib/roebe/toplevel_methods/verbose_truth.rb,
lib/roebe/classes/compare_these_two_files.rb,
lib/roebe/classes/lotto/handle_quicktipps.rb,
lib/roebe/classes/paragraph_onto_one_line.rb,
lib/roebe/classes/permission_ascii_format.rb,
lib/roebe/classes/purge_ordoc_directories.rb,
lib/roebe/classes/report_same_named_files.rb,
lib/roebe/classes/time/set_hardware_clock.rb,
lib/roebe/classes/turn_ruby_file_into_gem.rb,
lib/roebe/classes/usb/create_bootable_usb.rb,
lib/roebe/classes/xfce/set_xfce_wallpaper.rb,
lib/roebe/shell/help/colourized_help_line.rb,
lib/roebe/shell/module_methods/benchmarks.rb,
lib/roebe/snippets/obtain_all_descendants.rb,
lib/roebe/toplevel_methods/ascii_paradise.rb,
lib/roebe/toplevel_methods/human_readable.rb,
lib/roebe/toplevel_methods/module_methods.rb,
lib/roebe/toplevel_methods/open_in_editor.rb,
lib/roebe/toplevel_methods/report_classes.rb,
lib/roebe/toplevel_methods/show_processes.rb,
lib/roebe/classes/create_file_skeleton/run.rb,
lib/roebe/classes/create_firefox_extension.rb,
lib/roebe/classes/delete_empty_directories.rb,
lib/roebe/classes/generate_robots_txt_file.rb,
lib/roebe/classes/generate_xauthority_file.rb,
lib/roebe/classes/interactive_file_creator.rb,
lib/roebe/classes/keys_generator/constants.rb,
lib/roebe/classes/left_hyphen_in_this_file.rb,
lib/roebe/classes/menu_generator/append_to.rb,
lib/roebe/classes/menu_generator/constants.rb,
lib/roebe/classes/path_generator/constants.rb,
lib/roebe/classes/run_each_line_as_esystem.rb,
lib/roebe/classes/time/trivial_time_parser.rb,
lib/roebe/toplevel_methods/beautify_system.rb,
lib/roebe/toplevel_methods/blinking_cursor.rb,
lib/roebe/toplevel_methods/crazy_make_mode.rb,
lib/roebe/toplevel_methods/download_emojis.rb,
lib/roebe/toplevel_methods/increase_volume.rb,
lib/roebe/toplevel_methods/install_vivaldi.rb,
lib/roebe/toplevel_methods/new_konsole_tab.rb,
lib/roebe/toplevel_methods/open_in_browser.rb,
lib/roebe/toplevel_methods/register_sigint.rb,
lib/roebe/toplevel_methods/set_ten_aliases.rb,
lib/roebe/toplevel_methods/write_what_into.rb,
lib/roebe/classes/copy_these_directories_to.rb,
lib/roebe/classes/custom_table/custom_table.rb,
lib/roebe/classes/kde/kde_konsole/constants.rb,
lib/roebe/classes/lighttpd_config_generator.rb,
lib/roebe/classes/my_default_webrick_server.rb,
lib/roebe/classes/remove_bad_fluxbox_styles.rb,
lib/roebe/classes/remove_comments/constants.rb,
lib/roebe/classes/twentyfour_hours_notation.rb,
lib/roebe/configuration/class/configuration.rb,
lib/roebe/editors/vim_paradise/vim_paradise.rb,
lib/roebe/gui/libui/todo_viewer/todo_viewer.rb,
lib/roebe/gui/universal_widgets/shell/shell.rb,
lib/roebe/linux/slackware/remove_pulseaudio.rb,
lib/roebe/math/traurige_oder_fröhliche_zahl.rb,
lib/roebe/shell/configuration/configuration.rb,
lib/roebe/shell/gui/gtk3/vte_terminal_frame.rb,
lib/roebe/shell/module_methods/startup_time.rb,
lib/roebe/toplevel_methods/create_directory.rb,
lib/roebe/toplevel_methods/newstud/newstud1.rb,
lib/roebe/toplevel_methods/newstud/newstud2.rb,
lib/roebe/toplevel_methods/newstud/newstud3.rb,
lib/roebe/toplevel_methods/newstud/newstud4.rb,
lib/roebe/toplevel_methods/newstud/newstud5.rb,
lib/roebe/toplevel_methods/newstud/newstud6.rb,
lib/roebe/toplevel_methods/newstud/newstud7.rb,
lib/roebe/toplevel_methods/newstud/newstud8.rb,
lib/roebe/toplevel_methods/newstud/newstud9.rb,
lib/roebe/toplevel_methods/word_frequencies.rb,
lib/roebe/classes/apache_configuration_maker.rb,
lib/roebe/classes/batch_generate_all_my_gems.rb,
lib/roebe/classes/create_file_skeleton/reset.rb,
lib/roebe/classes/current_monitor_resolution.rb,
lib/roebe/classes/generate_gemspec/constants.rb,
lib/roebe/classes/grub/grub_config_generator.rb,
lib/roebe/classes/icewm/icewm_keys_generator.rb,
lib/roebe/classes/kde/kde_konsole/initialize.rb,
lib/roebe/classes/parse_apache_log/constants.rb,
lib/roebe/classes/purge_files_or_directories.rb,
lib/roebe/classes/readme_generator/constants.rb,
lib/roebe/classes/setup_chrooted_environment.rb,
lib/roebe/gui/gtk3/os_installer/os_installer.rb,
lib/roebe/gui/shared_code/email/email_module.rb,
lib/roebe/shell/help/documented_help_options.rb,
lib/roebe/shell/shell/menu_for_the_main_loop.rb,
lib/roebe/toplevel_methods/download_certdata.rb,
lib/roebe/toplevel_methods/install_this_font.rb,
lib/roebe/toplevel_methods/newstud/newstud10.rb,
lib/roebe/toplevel_methods/newstud/newstud11.rb,
lib/roebe/toplevel_methods/newstud/newstud12.rb,
lib/roebe/toplevel_methods/newstud/newstud13.rb,
lib/roebe/toplevel_methods/newstud/newstud14.rb,
lib/roebe/toplevel_methods/newstud/newstud15.rb,
lib/roebe/toplevel_methods/newstud/newstud16.rb,
lib/roebe/toplevel_methods/newstud/newstud17.rb,
lib/roebe/toplevel_methods/newstud/newstud18.rb,
lib/roebe/toplevel_methods/newstud/newstud19.rb,
lib/roebe/toplevel_methods/newstud/newstud20.rb,
lib/roebe/toplevel_methods/newstud/newstud21.rb,
lib/roebe/toplevel_methods/newstud/newstud22.rb,
lib/roebe/toplevel_methods/newstud/newstud23.rb,
lib/roebe/toplevel_methods/newstud/newstud24.rb,
lib/roebe/toplevel_methods/newstud/newstud25.rb,
lib/roebe/toplevel_methods/unicode/completed.rb,
lib/roebe/classes/install_flash/install_flash.rb,
lib/roebe/classes/kde/kde_konsole/kde_konsole.rb,
lib/roebe/classes/n_downloads_on_rubygems_org.rb,
lib/roebe/classes/readme_generator/initialize.rb,
lib/roebe/constants/home_of_the_user_called_x.rb,
lib/roebe/gui/libui/md5_comparer/md5_comparer.rb,
lib/roebe/gui/libui/show_aliases/show_aliases.rb,
lib/roebe/modules/http_status_codes/constants.rb,
lib/roebe/shell/module_methods/home_directory.rb,
lib/roebe/shell/shellrc_parser/shellrc_parser.rb,
lib/roebe/toplevel_methods/boku_opening_times.rb,
lib/roebe/toplevel_methods/convert_global_env.rb,
lib/roebe/toplevel_methods/copy_setup_rb_file.rb,
lib/roebe/toplevel_methods/create_this_c_file.rb,
lib/roebe/toplevel_methods/master_boot_record.rb,
lib/roebe/toplevel_methods/programs_directory.rb,
lib/roebe/toplevel_methods/repetition_pattern.rb,
lib/roebe/toplevel_methods/show_beauty_string.rb,
lib/roebe/toplevel_methods/silent_redirection.rb,
lib/roebe/classes/create_ruby_directory_layout.rb,
lib/roebe/classes/files_that_could_become_apps.rb,
lib/roebe/classes/generate_master_shell_script.rb,
lib/roebe/classes/generate_xorg_conf/constants.rb,
lib/roebe/classes/install_openssl_certificates.rb,
lib/roebe/classes/kde/kde_konsole_send_command.rb,
lib/roebe/classes/monthly_activity_on_rubygems.rb,
lib/roebe/classes/traurige_oder_fröhliche_zahl.rb,
lib/roebe/toplevel_methods/bundle_exam_results.rb,
lib/roebe/toplevel_methods/important_pdf_files.rb,
lib/roebe/toplevel_methods/install_this_locale.rb,
lib/roebe/classes/compare_these_two_directories.rb,
lib/roebe/classes/convert_encoding_of_this_file.rb,
lib/roebe/classes/create_local_images_yaml_file.rb,
lib/roebe/classes/find_all_files_encoded_in_iso.rb,
lib/roebe/classes/fluxbox/install_fluxbox_style.rb,
lib/roebe/classes/generate_etc_resolv_conf_file.rb,
lib/roebe/classes/increment_application_version.rb,
lib/roebe/classes/install_libreoffice/constants.rb,
lib/roebe/classes/kde/return_pid_of_kde_konsole.rb,
lib/roebe/classes/keys_generator/keys_generator.rb,
lib/roebe/classes/menu_generator/menu_generator.rb,
lib/roebe/classes/total_pages_in_finished_books.rb,
lib/roebe/gui/libui/foto_searcher/foto_searcher.rb,
lib/roebe/gui/sinatra/md5_comparer/md5_comparer.rb,
lib/roebe/pdf/prawn/all_in_one_showcasing_prawn.rb,
lib/roebe/toplevel_methods/calculate_hypotenuse.rb,
lib/roebe/toplevel_methods/colourized_tokenitor.rb,
lib/roebe/toplevel_methods/install_roebe_addons.rb,
lib/roebe/www/ginger_der_bandit/GingerDerBandit.rb,
lib/roebe/classes/add_newline_after_n_characters.rb,
lib/roebe/classes/convert_file_into_utf_encoding.rb,
lib/roebe/classes/create_file_skeleton/constants.rb,
lib/roebe/classes/kde/install_this_konsole_theme.rb,
lib/roebe/classes/prepend_this_line_to_that_file.rb,
lib/roebe/classes/put_all_gems_into_this_project.rb,
lib/roebe/classes/shells/generate_etc_shell_file.rb,
lib/roebe/classes/time/current_time_in_singapore.rb,
lib/roebe/constants/file_and_directory_constants.rb,
lib/roebe/toplevel_methods/copy_the_linux_kernel.rb,
lib/roebe/toplevel_methods/install_the_hack_font.rb,
lib/roebe/toplevel_methods/instance_variable_get.rb,
lib/roebe/browser/output_url_then_open_in_browser.rb,
lib/roebe/classes/create_docbook_sgml_dtd_catalog.rb,
lib/roebe/classes/remove_comments/remove_comments.rb,
lib/roebe/classes/return_aliases/return_n_aliases.rb,
lib/roebe/gui/libui/wlan_interface/wlan_interface.rb,
lib/roebe/gui/universal_widgets/ifconfig/ifconfig.rb,
lib/roebe/requires/require_all_standalone_classes.rb,
lib/roebe/requires/require_all_standalone_modules.rb,
lib/roebe/shell/standalone_classes/time_converter.rb,
lib/roebe/toplevel_methods/load_custom_ruby_files.rb,
lib/roebe/toplevel_methods/build_all_my_local_gems.rb,
lib/roebe/toplevel_methods/create_directory_layout.rb,
lib/roebe/toplevel_methods/does_this_program_exist.rb,
lib/roebe/www/die_katze_im_schnee/DieKatzeImSchnee.rb,
lib/roebe/classes/add_this_user_to_the_sudoers_file.rb,
lib/roebe/classes/generate_gemspec/generate_gemspec.rb,
lib/roebe/classes/parse_apache_log/parse_apache_log.rb,
lib/roebe/classes/return_aliases/return_ten_aliases.rb,
lib/roebe/gui/gtk3/guess_the_world_capitals/capital.rb,
lib/roebe/shell/module_methods/available_components.rb,
lib/roebe/toplevel_methods/require_this_roebe_class.rb,
lib/roebe/toplevel_methods/wlan/scan_for_wlan_spots.rb,
lib/roebe/classes/fluxbox/autogenerate_fluxbox_files.rb,
lib/roebe/classes/fluxbox/generate_fluxbox_apps_file.rb,
lib/roebe/classes/fluxbox/generate_fluxbox_keys_file.rb,
lib/roebe/classes/mate_terminal/rename_mate_terminal.rb,
lib/roebe/constants/array_install_these_gem_projects.rb,
lib/roebe/shell/module_methods/commandline_arguments.rb,
lib/roebe/toplevel_methods/generate_konsole_css_file.rb,
lib/roebe/toplevel_methods/install_the_cascadia_font.rb,
lib/roebe/toplevel_methods/move_to_torrent_directory.rb,
lib/roebe/toplevel_methods/n_characters_in_this_file.rb,
lib/roebe/toplevel_methods/replace_leading_file_name.rb,
lib/roebe/classes/audio_information/audio_information.rb,
lib/roebe/classes/books/finished_books/finished_books.rb,
lib/roebe/classes/differences_between_two_directories.rb,
lib/roebe/classes/find_all_files_with_a_question_mark.rb,
lib/roebe/gui/libui/show_ten_aliases/show_ten_aliases.rb,
lib/roebe/gui/universal_widgets/calculator/calculator.rb,
lib/roebe/gui/universal_widgets/send_email/send_email.rb,
lib/roebe/gui/universal_widgets/view_image/view_image.rb,
lib/roebe/modules/http_status_codes/http_status_codes.rb,
lib/roebe/toplevel_methods/install_and_update_rcfiles.rb,
lib/roebe/toplevel_methods/open_in_editor_and_browser.rb,
lib/roebe/classes/auto_rename_file_based_on_time_today.rb,
lib/roebe/classes/find_duplicate_entries_in_alias_file.rb,
lib/roebe/classes/kde/split_kde_konsole_tab_vertically.rb,
lib/roebe/classes/remove_this_substring_from_all_files.rb,
lib/roebe/classes/return_aliases/return_twenty_aliases.rb,
lib/roebe/gui/shared_code/calculator/calculator_module.rb,
lib/roebe/shell/module_methods/generate_tab_completion.rb,
lib/roebe/toplevel_methods/replace_localhost_with_data.rb,
lib/roebe/classes/generate_xorg_conf/generate_xorg_conf.rb,
lib/roebe/classes/last_called_logger/last_called_logger.rb,
lib/roebe/classes/replace_global_variables_in_this_file.rb,
lib/roebe/gui/universal_widgets/ping_widget/ping_widget.rb,
lib/roebe/gui/universal_widgets/task_viewer/task_viewer.rb,
lib/roebe/gui/universal_widgets/todo_viewer/todo_viewer.rb,
lib/roebe/classes/create_file_skeleton/generate_c_string.rb,
lib/roebe/math/calculate_the_distance_between_two_points.rb,
lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb,
lib/roebe/classes/generate_fstab_file/generate_fstab_file.rb,
lib/roebe/classes/generate_unit_files/generate_unit_files.rb,
lib/roebe/classes/install_libreoffice/install_libreoffice.rb,
lib/roebe/gui/universal_widgets/md5_comparer/md5_comparer.rb,
lib/roebe/gui/universal_widgets/show_aliases/show_aliases.rb,
lib/roebe/gui/universal_widgets/simple_clock/simple_clock.rb,
lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb,
lib/roebe/toplevel_methods/wlan/bring_up_this_wlan_device.rb,
lib/roebe/classes/create_file_skeleton/generate_cpp_string.rb,
lib/roebe/gui/shared_code/simple_clock/simple_clock_module.rb,
lib/roebe/toplevel_methods/colourize_files_and_directories.rb,
lib/roebe/toplevel_methods/run_this_file_in_the_background.rb,
lib/roebe/toplevel_methods/unicode/display_unicode_snowman.rb,
lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb,
lib/roebe/classes/create_file_skeleton/create_file_skeleton.rb,
lib/roebe/classes/create_file_skeleton/generate_ruby_string.rb,
lib/roebe/classes/symlink_all_directories_in_this_directory.rb,
lib/roebe/gui/universal_widgets/system_widget/system_widget.rb,
lib/roebe/toplevel_methods/install_linux_kernel_api_headers.rb,
lib/roebe/toplevel_methods/install_the_jet_brains_mono_font.rb,
lib/roebe/toplevel_methods/unicode/download_unicode_dataset.rb,
lib/roebe/classes/output_text_then_assign_to_the_xorg_buffer.rb,
lib/roebe/toplevel_methods/report_the_gtk_versions_available.rb,
lib/roebe/toplevel_methods/unicode/colourful_unicode_snowmen.rb,
lib/roebe/validation/validate_roeberia_environment_variables.rb,
lib/roebe/www/ariolante_and_the_kitten/AriolanteAndTheKitten.rb,
lib/roebe/classes/auto_rename_file_based_on_its_creation_date.rb,
lib/roebe/classes/modify_shebang_header/modify_shebang_header.rb,
lib/roebe/gui/universal_widgets/code_generator/code_generator.rb,
lib/roebe/gui/universal_widgets/world_capitals/world_capitals.rb,
lib/roebe/toplevel_methods/does_this_terminal_support_unicode.rb,
lib/roebe/toplevel_methods/unicode/return_all_unicode_symbols.rb,
lib/roebe/classes/ascii/fix_missing_numbers_for_ascii_paradise.rb,
lib/roebe/toplevel_methods/unicode/map_input_to_unicode_symbol.rb,
lib/roebe/classes/prepend_this_string_to_every_line_of_this_file.rb,
lib/roebe/toplevel_methods/try_to_enable_the_expanded_cd_aliases.rb,
lib/roebe/toplevel_methods/unicode/decompose_this_unicode_symbol.rb,
lib/roebe/classes/obtain_audio_recordings_from_voice_recorder/run.rb,
lib/roebe/gui/universal_widgets/show_ten_aliases/show_ten_aliases.rb,
lib/roebe/classes/aggregate_all_files_together_from_this_directory.rb,
lib/roebe/classes/generate_overview_of_the_locally_available_books.rb,
lib/roebe/classes/obtain_audio_recordings_from_voice_recorder/help.rb,
lib/roebe/classes/report_how_many_classes_exist_for_this_directory.rb,
lib/roebe/toplevel_methods/return_all_remote_entries_from_this_url.rb,
lib/roebe/gui/gtk3/guess_the_world_capitals/guess_the_world_capitals.rb,
lib/roebe/toplevel_methods/permanently_set_project_base_directory_to.rb,
lib/roebe/toplevel_methods/return_even_numbered_lines_from_this_file.rb,
lib/roebe/toplevel_methods/report_the_location_of_the_default_browser.rb,
lib/roebe/classes/convert_this_cgi_file_into_a_sinatrafied_application.rb,
lib/roebe/gui/gtk4/interactive_caesar_cipher/interactive_caesar_cipher.rb,
lib/roebe/classes/books/sanitize_this_book_path/sanitize_this_book_path.rb,
lib/roebe/classes/obtain_audio_recordings_from_voice_recorder/constants.rb,
lib/roebe/gui/libui/interactive_caesar_cipher/interactive_caesar_cipher.rb,
lib/roebe/toplevel_methods/downcase_all_entries_in_the_current_directory.rb,
lib/roebe/gui/universal_widgets/microsoft_controller/microsoft_controller.rb,
lib/roebe/classes/symlink_everything_from_that_directory_to_this_directory.rb,
lib/roebe/shell/module_methods/report_where_the_home_directory_can_be_found.rb,
lib/roebe/toplevel_methods/check_whether_an_internet_connection_is_available.rb,
lib/roebe/toplevel_methods/update_the_main_pdf_viewer_file_with_this_program.rb,
lib/roebe/classes/replace_space_with_underscore/replace_space_with_underscore.rb,
lib/roebe/classes/update_static_html_pages_in_the_directory_containing_my_fotos.rb,
lib/roebe/gui/universal_widgets/wlan_information_center/wlan_information_center.rb,
lib/roebe/classes/symlink_directories_from_that_directory_to_the_current_directory.rb,
lib/roebe/gui/universal_widgets/interactive_caesar_cipher/interactive_caesar_cipher.rb,
lib/roebe/gui/shared_code/interactive_caesar_cipher/interactive_caesar_cipher_module.rb,
lib/roebe/gui/universal_widgets/generate_xorg_configuration/generate_xorg_configuration.rb,
lib/roebe/classes/move_content_of_this_directory_to_that_directory_unless_target_already_exists.rb,
lib/roebe/classes/obtain_audio_recordings_from_voice_recorder/obtain_audio_recordings_from_voice_recorder.rb,
lib/roebe/classes/symlink_files_from_that_directory_to_the_current_directory/symlink_files_from_that_directory_to_the_current_directory.rb

Overview

#

Roebe::GUI::InteractiveCaesarCipherModule

#

require ‘roebe/gui/shared_code/interactive_caesar_cipher/interactive_caesar_cipher_module.rb’ include Roebe::GUI::InteractiveCaesarCipherModule

#

Defined Under Namespace

Modules: ArrowKeys, BlinkingCursor, CdHelperModule, Chess, Configuration, CustomMethods, DisplayArray, Editors, EmbeddableInterface, Encoding, GUI, HtmlColours, HttpStatusCodes, HumanReadable, Jruby, KnowledgeBase, Linux, Math, Menu, Process, RemoveHtml, SaveFile, Sigint, SqlParadise, Stories, Terminal, Time, WWW, Warning, Windows, WordWrap Classes: AddIrcQuote, AddNewlineAfter, AddNewlineAfterNCharacters, AddThisUserToTheSudoersFile, AddTwoBinaryNumbers, AddUserLighty, AggregateAllFilesTogetherFromThisDirectory, Aliases, AllGames, AllInOneShowcasingPrawn, AllMyGems, Alltagsgeschichte, AlphabeticalSorter, Anteile, ApacheConfigurationMaker, AppendThis, AppendToLine, At, AudioInformation, AutoRenameFileBasedOnItsCreationDate, AutoRenameFileBasedOnTimeToday, Autodater, AutomountUSB, Automounter, AvailableClasses, BackupCoreSystem, Base, BasicConfigure, BatchGenerateAllMyGems, BecomeAnotherUser, Bezirk, BirthdayNotifications, Books, Browser, BurnISO, CSS_Analyzer, CaesarCipher, Calendar, CalendarMaker, Cat, CelsiusToFahrenheit, CheckForBadBlocks, CheckYaml, Child, ChmodCurrentTime, Clipboard, Clock, ColourizeNumbers, CompareTheseTwoDirectories, CompareTheseTwoFiles, CompileKernel, ConfigGenerator, Conky, ConkyRcfileGenerator, ConvertEncodingOfThisFile, ConvertFileIntoUtfEncoding, ConvertThisCgiFileIntoASinatrafiedApplication, CopyFromGlibc, CopyHere, CopyKernelConfig, CopyTheseDirectoriesTo, CorrectGibberish, CountCharacters, CovidLethality, CreateAsoundrcFile, CreateBenchmarkFile, CreateBootableUSB, CreateDesktopFile, CreateDocbookSgmlDtdCatalog, CreateFileSkeleton, CreateFirefoxExtension, CreateISO, CreateIsoForGames, CreateJarArchive, CreateLocalImagesYamlFile, CreateMyDirectories, CreateRubyDirectoryLayout, CreateZip, CurrentMonitorResolution, CurrentTimeInSingapore, CustomTable, CutAfterColon, CuteEmoji, Daemonize, DateSort, DayCalendar, Dbus, DeleteAllDirectories, DeleteEmptyDirectories, DeleteEmptyFiles, Dhcpcd, DifferencesBetweenTwoDirectories, Disable, DisplayGccVersion, DisplayWeekdays, DoAGoogleSearch, DoInstall, Done, DoneAndOpen, DoskeyGenerator, DowncaseDirectories, DowncaseExtension, DownloadFromThisUrl, DuplicateFiles, Eduroam, Email, Empty, Enable, EnableAutologin, EnglishToGerman, Ethernet, EuclidianDistance, ExtractDocumentation, ExtractGemFile, FeetToCentimetres, FetchUrl, FileFilter, FileParser, FileRenamer, FilesThatCouldBecomeApps, FilterApacheLog, FindAllFilesEncodedInISO, FindAllFilesWithAQuestionMark, FindDuplicateEntriesInAliasFile, FindEmptyFiles, FindExpandedAlias, FindOutVersionOf, FindStaticLibraries, FinishedBooks, Firefox, FixMcookie, FixMissingNumbersForAsciiParadise, FixTimezone, FontInstaller, FotoSearcher, FotosFürIngrid, FragmentMaker, GeneralOverviewer, GenerateAlsaConf, GenerateDosboxConfig, GenerateEtcResolvConfFile, GenerateEtcShellFile, GenerateFluxboxAppsFile, GenerateFluxboxKeysFile, GenerateFstabFile, GenerateGemspec, GenerateGrubConfig, GenerateLocales, GenerateLsColors, GenerateMasterShellScript, GenerateNanoConfig, GenerateNsswitchConf, GenerateOverviewOfTheLocallyAvailableBooks, GenerateProtocols, GenerateRewriteRules, GenerateRobotsTxtFile, GenerateRtfFile, GenerateSystemValues, GenerateUnitFiles, GenerateXauthorityFile, GenerateXorgConf, GetDependencies, Github, GoodNight, GoogleUrlCleaner, GrandChild, GrantSuperuserRights, GrubAppender, GrubConfigGenerator, GzipThisFile, HandleLightppd, HandleQuicktipps, HelloWorld, HexToRGB, Holiday, HostsAppender, HtmlFormFetcher, IPaste, IcewmKeysGenerator, Identical, Imdb, In, IncrementApplicationVersion, Inhalt, Inputrc, InstallDebianFile, InstallFlash, InstallFluxboxStyle, InstallLibreoffice, InstallMyGems, InstallOpensslCertificates, InstallRubyProject, InstallThisKonsoleTheme, InstallWrapper, InteractiveFileCreator, Into, IsoToUsb, JavaHeader, JavaRunner, Jpg, KdeKonsole, KdeKonsoleSendCommand, KdeServicemenus, KeyValueParser, KeysGenerator, KillDhcpcd, KillFirefox, KillPalemoon, KonsoleNewTab, LastCalledLogger, LastLine, LeftHyphenInThisFile, LevelSubdirectories, LighttpdConfigGenerator, LiloConfigGenerator, LinePadder, Log10, MakeCookbooksGem, MakeGem, ManipulateQuotes, MarkThisDirectory, MarriedWithChildren, Mbl, MealMaker, Merge, ModifyShebangHeader, Modright, MonthlyActivityOnRubygems, MountDVD, MountIsoFile, Mouse, MoveContentOfThisDirectoryToThatDirectoryUnlessTargetAlreadyExists, MoveFile, MoveMouse, Mrxvt, MrxvtOptions, MyDefaultWebrickServer, MyIp, NDirectories, NDownloadsOnRubygemsOrg, NFiles, NFotos, NGemsExistInTotal, NSymlinks, NcursesTerminal, NibbleConverter, NonSymlinks, NumberFiles, NumberToEnglish, Nutrition, Nvidia, ObtainAudioRecordingsFromVoiceRecorder, OnScreenDisplay, OneLinePasswords, OpenPDF, OpenRandomBook, OutputRandomLine, OutputTextThenAssignToTheXorgBuffer, OutputUrlThenOpenInBrowser, PackageJavaCompiler, PadViaQuotes, Palemoon, ParagraphOntoOneLine, Parent, ParseApacheLog, PascalschesDreieck, Passwords, PathGenerator, PercentageCounter, PermissionAsciiFormat, PhpToRuby, PoundToKgConverter, PrependThis, PrependThisLineToThatFile, PrependThisStringToEveryLineOfThisFile, PrependTodaysDate, Primfaktorzerlegung, PristineGems, ProperEnglish, PublishGem, PullTogether, PurgeFilesOrDirectories, PurgeGmonOutFiles, PurgeOrdocDirectories, PutAllGemsIntoThisProject, Qemu, QueryWorldTime, Quiz, RXinitrc, Ram, RandomBackground, RandomOpen, Rbashrc, Rdate, ReadmeGenerator, RegelVonSarrus, RemoteGems, RemoveBadFluxboxStyles, RemoveComments, RemoveDirectory, RemoveDuplicateLines, RemoveExtension, RemoveFileExtension, RemoveGems, RemoveLightyLogs, RemoveLine, RemoveLocalhost, RemoveMissing, RemoveNewlines, RemoveSoloNumbers, RemoveThisSubstringFromAllFiles, RenameMateTerminal, ReplaceGlobalVariablesInThisFile, ReplaceSpaceWithUnderscore, ReplaceWhatWith, ReportHowManyClassesExistForThisDirectory, ReportSameNamedFiles, RequireEverything, RestoreKde, ReturnNAliases, ReturnRandomImage, ReturnTenAliases, ReturnTwentyAliases, RomanNumberConverter, RubyCat, RubyHeader, RubyMain, RubyNano, RubySeq, RubyUseConfigFile, RubyVersionSwitcher, Run, RunEachLineAsEsystem, Rundll32, SanitizeThisBookPath, ScanForHttpLinks, Schlafe, SendEmail, ServeLocalPage, SetAliases, SetBackground, SetChained, SetCurrentISO, SetHardwareClock, SetHwclock, SetNormalAliasTo, SetXfceWallpaper, SetupChrootedEnvironment, Shell, ShowAppointments, ShowAvailableFonts, ShowAvailableUsers, ShowKernelModules, ShowNonSymlinks, ShowOnlyFiles, ShowPrimeNumbers, ShowSigint, ShowTenAliases, ShowTwentyAliases, SimpleBootScript, SimpleExtractor, SimpleMarkdownParser, SizeOf, SizeOfStates, SkelMaker, Slackware, Slogans, SlowLoad, SortedOutput, Sourcerank, SpecialSymlink, StartProgram, StdRenamer, Story, StringColourParser, SumOfAllNumbers, Supermerger, SymlinkAllDirectoriesInThisDirectory, SymlinkDirectoriesFromThatDirectoryToTheCurrentDirectory, SymlinkDirectory, SymlinkEverythingFromThatDirectoryToThisDirectory, SymlinkFilesFromThatDirectoryToTheCurrentDirectory, SyntaxChecker, SystemChecker, TakeScreenshot, TalesFromTheCrypt, TelnetWrapper, TerminalPS1, TestForPsych, TestOpenssl, TestYaml, ThresholdSplitter, TicTacToe, ToBinary, ToBuy, ToNext, ToSquashfs, ToTarBz2, ToTarGz, ToUtf, Today, TodoOverview, TodoSanitizer, TopTenAliases, TotalPagesInFinishedBooks, Translate, TraurigeOderFröhlicheZahl, TraverseInstall, Treeview, TrivialTimeParser, TurnRubyFileIntoGem, TwentyfourHoursNotation, UmlautConverter, Undone, UnicodeSnowman, UnifiedPadding, Unrar, Upcaser, Update, UpdateStaticHtmlPagesInTheDirectoryContainingMyFotos, UploadToImgur, UpwardsCounter, Usage, UsbDevices, UseJruby, ValidateRoeberiaEnvironmentVariables, VteStarter, Wallpaper, WaylandOrXorgserver, WebfancyController, Wikipedia, Wlan, WochentagAnzeiger, WriteWhatInto, YamlCheck, YoutubeDownloader, Zenity, Zoll

Constant Summary collapse

ONE_MINUTE =
#

Roebe::ONE_MINUTE

#
Roebe::Time::ONE_MINUTE
ONE_HOUR =
#

Roebe::ONE_HOUR

#
Roebe::Time::ONE_HOUR
ONE_DAY =
#

Roebe::ONE_DAY

#
Roebe::Time::ONE_DAY
DAY_NAMES =
#

Roebe::DAY_NAMES

#
Roebe::Time::DAY_NAMES
ERROR_LINE =
#

ERROR_LINE

#
'2>&1'
MAIN_EDITOR_TO_USE =
#

MAIN_EDITOR_TO_USE

This used to be bluefish until May 2019 where it was changed to geany.

#
'bluefish'
BROWSER_TO_USE_BY_DEFAULT =
#

BROWSER_TO_USE_BY_DEFAULT

Which browser to use by default.

#
'palemoon'
STUDIUM =
"#{HOME_DIRECTORY_OF_USER_X}studium/"
STUDIUM_DIRECTORY =

STUDIUM_DIRECTORY

STUDIUM
STUDIUM_DIR =

STUDIUM_DIR

STUDIUM
DIRECTORY_ROEBE_YAML_PDF =
#

Roebe::DIRECTORY_ROEBE_YAML_PDF

The next constant is the base towards the various pdf-yaml files, such as pdf1.yml, pdf2.yml and so forth.

#
"#{Roebe.project_yaml_directory?}pdf/"
ASCII_DIFFERENCE =
#

Roebe::ASCII_DIFFERENCE

Ascii difference means the difference between an upcased and a downcased string.

#
32
TEMP_DIR =
'/tmp/'
FILE_BROWSER_YAML =
#

Roebe::FILE_BROWSER_YAML

This may be at a location such as:

/usr/lib/ruby/site_ruby/3.1.0/roebe/yaml/browser.yml
#
"#{project_yaml_dir?}browser.yml"
PROGRAMS_DIRECTORY =
'/Programs/'
VALID_IMAGES =
#

Roebe::VALID_IMAGES

All valid image formats shall be denoted here.

In the long run we may have to use ImageParadise for this, as it seems nonsensical to maintain the same dataset in multiple different locations.

#
%w(
  .png
  .jpg
  .gif
  .jpeg
  .avif
)
FILE_USE_COLOURS =
#

Roebe::FILE_USE_COLOURS

#
"#{project_base_dir?}yaml/use_colours.yml"
COLOURS =

failsafe clause here

nil
ROEBE_IRB_PROMPT =
#

Roebe::ROEBE_IRB_PROMPT

#
{
  PROMPT_I: "", # "\n",  # A newline is, oddly enough, required here. # no longer as of 2024.
  PROMPT_N: ".. ", # Or: "",
  PROMPT_S: '"',   # Or nil
  PROMPT_C: '',
  RETURN:   "=> %s\n"
  # Other entries not in use are:
  # :AUTO_INDENT => true,           # enables auto-indent mode
}
PC =

Else we hardcode it.

"#{HOME_OF_THE_USER_CALLED_X}data/PC/"
LINUX_YAML =
#

LINUX_YAML

#
ENV['LINUX_YAML'].to_s
ROEBE_DATA_DIRECTORY =
#

Roebe::ROEBE_DATA_DIRECTORY

#
"#{HOME_OF_THE_USER_CALLED_X}data/"
ROEBE_PERSONAL_DIRECTORY =
#

ROEBE_PERSONAL_DIRECTORY

#
"#{ROEBE_DATA_DIRECTORY}personal/"
FILE_CONTACTS_YAML =
#

Roebe::FILE_CONTACTS_YAML

#
"#{ROEBE_DATA_DIRECTORY}/personal/yaml/contacts.yml"
FILE_CONTACTS =

FILE_CONTACTS

FILE_CONTACTS_YAML
PROJECT_BASE_DIRECTORY =
#

Roebe::PROJECT_BASE_DIRECTORY

Note that the constant here is only used as the initial setter. The real query-value comes from @project_base_directory defined lateron in this file. Reason being that you can also lateron, at runtime, re-define that variable.

#
File.absolute_path("#{__dir__}/..")+'/'
FILE_PROJECT_BASE_DIRECTORY =
#

FILE_PROJECT_BASE_DIRECTORY

#
"#{Roebe.project_base_directory?}yaml/project_base_directory.yml"
VERSION =
#

VERSION

#
'0.5.191'
LAST_UPDATE =
#

LAST_UPDATE

This constant will keep track of when this project was last updated. We will store the time here in dd.mm.yyyy notation. Do note that this constant is not updated very frequently, so do not rely on it too much - it is more a “hint” as to when a last important updated happened.

#
'31.01.2024'
URL_TO_THE_DOCUMENTATION =
#

URL_TO_THE_DOCUMENTATION

#
"https://www.rubydoc.info/gems/#{self.to_s.downcase}/#{VERSION}"
BOOK_EMOJI =
#

Roebe::BOOK_EMOJI

This is specifically used for .pdf-related functionality, to show a useful book-icon to the user - both on the commandline, as well as for web-related sites. See class Roebe::GenerateOverviewOfTheLocallyAvailableBooks.

#
'📚'
N =
#

N

Simply a constant towards a newline.

#
"\n"
NAMESPACE =
#

Roebe::NAMESPACE

#
inspect
EURO =
#

Roebe::EURO

#
13.760300
ALPHABET =
#

Roebe::ALPHABET

#
('a'..'z').to_a
FILE_SIZE_OF_COUNTRIES =
#

FILE_SIZE_OF_COUNTRIES

#
"#{project_base_dir?}yaml/size_of_countries.yml"
RUBY_SRC_DIR =
HOME_OF_THE_USER_CALLED_X+'programming/ruby/src/'
RUBY_SRC =

RUBY_SRC

RUBY_SRC_DIR
STD_COMMENT =
#

STD_COMMENT

#
'# ====================================================================== #'
TOKEN =
#

TOKEN

#
STD_COMMENT
EOL =
#

EOL

#
"\r\n"
FILE_TO_BROWSER =
#

Roebe::FILE_TO_BROWSER

Denote where the browser.yml file resides, by default.

This is obviously highly specific for my own home system.

#
HOME_OF_THE_USER_CALLED_X+'DATA/PC/yaml/browser.yml'
ARRAY_VIDEO_FILE_TYPES =
#

ARRAY_VIDEO_FILE_TYPES

#
%w(
  .vob
  .avi
  .flv
  .mp4
)
DEFAULT_RUBY_HEADER =
#

DEFAULT_RUBY_HEADER

#
'#!/System/Index/bin/ruby -w
# Encoding: UTF-8
# frozen_string_literal: true
# =========================================================================== #
'
WEEKDAYS_FROM_ENGLISH_TO_GERMAN =
#

Roebe::WEEKDAYS_FROM_ENGLISH_TO_GERMAN

We start with Monday.

#
{ # english -> german
  'Mon' => 'Montag',
  'Tue' => 'Dienstag',
  'Wed' => 'Mittwoch',
  'Thu' => 'Donnerstag',
  'Fri' => 'Freitag',
  'Sat' => 'Samstag',
  'Sun' => 'Sonntag',
}
ENGLISH_TO_GERMAN_WEEKDAY =
#

ENGLISH_TO_GERMAN_WEEKDAY

#
{
  'Monday'    => 'Montag',
  'Tuesday'   => 'Dienstag',
  'Wednesday' => 'Mittwoch',
  'Thursday'  => 'Donnerstag',
  'Friday'    => 'Freitag',
  'Saturday'  => 'Samstag',
  'Sunday'    => 'Sonntag'
}
WEEKDAYS_FROM_GERMAN_TO_ENGLISH =
#

Roebe::WEEKDAYS_FROM_GERMAN_TO_ENGLISH

We start with Monday.

#
{ # german -> english
  'Montag'     => 'Monday',
  'Dienstag'   => 'Tuesday',
  'Mittwoch'   => 'Wednesday',
  'Donnerstag' => 'Thursday',
  'Freitag'    => 'Friday',
  'Samstag'    => 'Saturday',
  'Sonntag'    => 'Sunday',
}
HASH_SHORT_TO_LONG_WEEKDAYS =
#

HASH_SHORT_TO_LONG_WEEKDAYS

#
{
  'Mon' => 'Monday',
  'Tue' => 'Tuesday',
  'Wed' => 'Wednesday',
  'Thu' => 'Thursday',
  'Fri' => 'Friday',
  'Sat' => 'Saturday',
  'Sun' => 'Sunday'
}
ARCHIVE_TYPES =
#

ARCHIVE_TYPES

Possible archive types are stored here.

#
%w(
  .gz
  .bz2
  .xz
  .tar
  .zip
  .tar.xz
  .tar.gz
  .tar.bz2
  .lz
)
ARRAY_RUBY_KEYWORDS =
#

Roebe::ARRAY_RUBY_KEYWORDS

#
%w(
  __ENCODING__
  __FILE__
  __LINE__
  alias
  and
  BEGIN
  begin
  break
  case
  class def defined 
  do else elsif END end ensure false for if in module 
  next nil not or redo rescue retry return self super 
  then true undef unless until when while yield
)
RUBY_RESERVED_KEYWORDS =
ARRAY_RUBY_KEYWORDS
Keywords =

Ruby::Keywords

ARRAY_RUBY_KEYWORDS
FBSETBG_COMMAND =
#

Roebe::FBSETBG_COMMAND

#
'fbsetbg -c '
CHECKMARK_COMPLETED =
#

CHECKMARK_COMPLETED

See here:

https://www.compart.com/en/unicode/U+2714

This is also called the “heavy check mark” (U+2714), aka ‘✔’.

#
"\342\234\224"
CHECKMARK_COMPLETED_THIN =
#

CHECKMARK_COMPLETED_THIN

See here:

https://www.compart.com/en/unicode/U+2713
#
"\342\234\223"
HOME_OF_THE_USER_CALLED_X =
#

Roebe::HOME_OF_THE_USER_CALLED_X

#
'/home/x/'
MASTER_BOOD_RECORD_SIZE =
#

MASTER_BOOD_RECORD_SIZE

This constant keeps track of the MBR Total Size.

This size is calculated like so:

446 + 64 + 2 = 512

These values are derived from:

446 bytes - Bootstrap size.
 64 bytes - Partition table size.
  2 bytes - Signature size.

On the www there is also the 446 commonly used with “dd”. You can use 446 bytes to overwrite or restore your /dev/XYZ MBR boot code only with the contents of $mbr.backup.file.

You can use 512 bytes to overwrite or restore your /dev/XYZ the full MBR (which contains both boot code and the drive’s partition table) with the contents of $mbr.backup.file.

#
512
LINUX_DIRECTORY_FOR_TTF_FONTS =
#

LINUX_DIRECTORY_FOR_TTF_FONTS

#
'/usr/share/fonts/TTF/'
FILE_MARK_THIS_DIRECTORY =
#

FILE_MARK_THIS_DIRECTORY

#
"#{project_base_dir?}yaml/mark_this_directory.yml"
DIRECTORY_CONTAINING_THE_NANO_RC_FILES =
#

DIRECTORY_CONTAINING_THE_NANO_RC_FILES

#
"#{PROJECT_BASE_DIRECTORY}nano/"
LOG_DIRECTORY =
'/Depot/Temp/roebe/'
HOME_DIRECTORY_OF_USER_X =
#

Roebe::HOME_DIRECTORY_OF_USER_X

This constant is only useful on my home system.

#
'/home/x/'
FILE_CD_ALIASES =

else simply hardcode it

"#{HOME_DIRECTORY_OF_USER_X}programming/ruby/src/"\
"rcfiles/lib/rcfiles/yaml/cd_aliases.yml"
FILE_ALIASES =

else simply hardcode it

"#{HOME_DIRECTORY_OF_USER_X}programming/ruby/src/"\
"rcfiles/lib/rcfiles/yaml/aliases.yml"
FILE_AUTOSTART_THESE_PROGRAMS =
#

FILE_AUTOSTART_THESE_PROGRAMS

On my home system, the following .yml file can be found here:

bl $RSRC/roebe/lib/roebe/yaml/autostart_these_programs.yml
#
"#{Roebe.project_base_dir?}yaml/autostart_these_programs.yml"
FILE_DIRECTORY_STRUCTURE =
#

Roebe::FILE_DIRECTORY_STRUCTURE

Use the method below - it is more robust in the long run, IMO.

#
"#{Roebe.project_base_dir?}yaml/directory_structure.yml"
ARRAY_INSTALL_THESE_GEM_PROJECTS =
#

Roebe::ARRAY_INSTALL_THESE_GEM_PROJECTS

Although the listing will be sorted via a .sort, it is better to keep the entries sorted at all times - this will make later manual additions simpler.

#
%w(
  ascii_countdown
  ascii_paradise
  autostart
  backup_paradise
  beautiful_url
  bioroebe
  case_parser
  chemistry_paradise
  class_docu_shower
  cliner
  collect_first_word_of_case_menu
  colours
  convert_global_env
  csv_paradise
  cyberweb
  dictionaries
  directory_paradise
  easycompile
  environment_information
  esystem
  extracter
  find_line_in_file
  ftp_paradise
  generate_rc_file
  generate_shell_completion
  gtk_paradise
  hardware_information
  hours_to_seconds
  html_tags
  image_paradise
  irc_paradise
  kaisers
  md5sum
  method_introspection
  mountpoints
  multimedia_paradise
  opn
  pdf_paradise
  percentage
  program_information
  rbt
  remove_file_suffix
  repackage
  roebe
  ruby_token_parser
  save_file
  show_rdoc_docu
  stat_file
  studium
  symlink
  tiss_project
  totarxz
  verbose_truth
  wget
  xorg_buffer
  tk_paradise
  fox_paradise
  economy_paradise
  libui_paradise
  open
  rcfiles
  universal_pipe_handler
  games_and_rpg_paradise
  swing_paradise
  universal_widgets
  emoji_paradise
).sort

Constants included from Encoding

Encoding::ENCODING_BIT, Encoding::ENCODING_ISO, Encoding::ENCODING_UTF, Encoding::ISO_ENCODING, Encoding::UNICODE, Encoding::USE_THIS_ENCODING

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.[](i = '') ⇒ Object

#

RequireEverything[]

Easier instantiation-method.

#


140
141
142
143
144
145
146
147
148
149
# File 'lib/roebe/classes/require_everything.rb', line 140

def self.[](i = '')
  case i
  when :be_quiet, :be_silent
    _ = ::Roebe::RequireEverything.new :do_not_run_yet
    _.set_be_quiet
    _.run
  else
    new
  end
end

.add_comment(i = 76) ⇒ Object

#

Roebe.add_comment

#


138
139
140
141
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 138

def self.add_comment(i = 76)
  i = ('=' * i.to_i)
  return i
end

.add_user_lightyObject

#

Roebe.add_user_lighty

#


99
100
101
# File 'lib/roebe/classes/add_user_lighty.rb', line 99

def self.add_user_lighty
  AddUserLighty.new
end

.all_unicode_nodesObject

#

Roebe.all_unicode_nodes

This method will return an Array of all unicode-note symbols - at the least those that may be useful.

#


804
805
806
807
808
809
810
811
812
813
814
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 804

def self.all_unicode_nodes
  [
    quarter_note,
    eighth_note,
    beamed_eighth_notes,
    beamed_sixteenth_notes,
    music_flat_sign,
    music_natural_sign,
    music_sharp_sign
  ]
end

.almost_equal_toObject

#

Roebe.almost_equal_to

See also: www.fileformat.info/info/unicode/char/2248/index.htm

The symbol will be: ≈

#


757
758
759
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 757

def self.almost_equal_to
  EmojiParadise.send(__method__)
end

.append_this_onto_that_file(what, into = 'foobar.md') ⇒ Object

#

Roebe.append_this_onto_that_file

This method can be used to append content onto a file.

#


63
64
65
66
67
68
# File 'lib/roebe/toplevel_methods/write_what_into.rb', line 63

def self.append_this_onto_that_file(
    what,
    into          = 'foobar.md'
  )
  ::Roebe::SaveFile.append_this_onto_that_file(what, into)
end

.append_this_program_to_the_autostart_array(i) ⇒ Object

#

Roebe.append_this_program_to_the_autostart_array

This method can be used to add a program to the applications that will be autostarted.

#


212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/roebe/commandline/misc.rb', line 212

def self.append_this_program_to_the_autostart_array(i)
  what = i.to_s.dup
  unless what.start_with? '- '
    what.prepend('- ')
  end
  unless what.start_with? "\n"
    what.prepend("\n")
  end
  into = FILE_AUTOSTART_THESE_PROGRAMS
  e 'Now appending `'+what.delete("\n")+'` into '+into+'.'
  append_what_into(what, into)
  if is_on_roebe?
    # ===================================================================== #
    # Hardcoded will do fine for now.
    # ===================================================================== #
    into = HOME_DIRECTORY_OF_USER_X+'DATA/PROGRAMMING_LANGUAGES/RUBY/src/roebe/lib/roebe/yaml/autostart_these_programs.yml'
    e 'Now appending `'+what.delete("\n")+'` into '+into+'.'
    append_what_into(what, into)
  end
end

.append_to_gem_install_command(i) ⇒ Object

#

Roebe.append_to_gem_install_command

#


301
302
303
# File 'lib/roebe/classes/update.rb', line 301

def self.append_to_gem_install_command(i)
  @gem_install_command << ' '+i
end

.are_these_two_strings_an_anagram?(string1, string2) ⇒ Boolean

#

Roebe.are_these_two_strings_an_anagram?

#

Returns:

  • (Boolean)


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/roebe/math/anagram.rb', line 14

def self.are_these_two_strings_an_anagram?(string1, string2)
  unless string1.size == string2.size
    return false # Early return since these strings can not be an anagram then.
  end
  string1 = string1.dup
  string2 = string2.dup
  string1.downcase!
  string2.downcase!
  copy_of_string2 = string2.dup
  # ======================================================================= #
  # We now here that both strings must have the same length.
  # ======================================================================= #
  string1.chars.each {|this_char|
    if copy_of_string2.include? this_char
      copy_of_string2[copy_of_string2.index(this_char)] = '' 
    end
  }
  if copy_of_string2.size == 0
    return true
  else
    return false
  end
end

.array_install_these_gem_projectsObject

#

Roebe.array_install_these_gem_projects

Toplevel helper-method to query all gem-projects that I may need on a new computer system; or to simply update my current gems.

#


97
98
99
# File 'lib/roebe/constants/array_install_these_gem_projects.rb', line 97

def self.array_install_these_gem_projects
  ARRAY_INSTALL_THESE_GEM_PROJECTS
end

.array_short_monthnamesObject

#

Roebe.array_short_monthnames

This method will return all months via short-name, such as ‘Sep’ for ‘September’ and so forth.

#


163
164
165
166
167
# File 'lib/roebe/time/time.rb', line 163

def self.array_short_monthnames
  Date::MONTHNAMES.compact.map {|entry|
    entry[0,3]
  } # => ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
end

.at(i = nil) ⇒ Object

#

Roebe.at

#


335
336
337
# File 'lib/roebe/classes/at.rb', line 335

def self.at(i = nil)
  Roebe::At.new(i)
end

.auto_rename_file_based_on_its_creation_date(i = ARGV) ⇒ Object

#

Roebe.auto_rename_file_based_on_its_creation_date

#


74
75
76
# File 'lib/roebe/classes/auto_rename_file_based_on_its_creation_date.rb', line 74

def self.auto_rename_file_based_on_its_creation_date(i = ARGV)
  Roebe::AutoRenameFileBasedOnItsCreationDate.new(i)
end

.auto_rename_file_based_on_time_today(i = ARGV) ⇒ Object

#

Roebe.auto_rename_file_based_on_time_today

#


68
69
70
# File 'lib/roebe/classes/auto_rename_file_based_on_time_today.rb', line 68

def self.auto_rename_file_based_on_time_today(i = ARGV)
  Roebe::AutoRenameFileBasedOnTimeToday.new(i)
end

.autodater(i = ARGV) ⇒ Object

#

Roebe.autodater

#


126
127
128
129
130
# File 'lib/roebe/classes/autodater.rb', line 126

def self.autodater(
    i = ARGV
  )
  Roebe::Autodater.new(i)
end

.autogenerate_fluxbox_filesObject

#

Roebe.autogeneraet_fluxbox_files

#


15
16
17
18
# File 'lib/roebe/classes/fluxbox/autogenerate_fluxbox_files.rb', line 15

def self.autogenerate_fluxbox_files
  Roebe.generate_fluxbox_keys_file
  Roebe.generate_fluxbox_apps_file { :be_quiet }
end

.autoprune(i = ARGV) ⇒ Object

#

Roebe.autoprune

This method can be used to auto-prune some ruby gems that need to be rebuilt.

A line given to this method may look like this:

"Ignoring glib2-3.3.0 because its extensions are not built. Try: gem pristine glib2 --version 3.3.0\n" +
#


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/roebe/toplevel_methods/autoprune.rb', line 20

def self.autoprune(i = ARGV)
  if i.is_a? Array
    i = i.join(' ').strip
  end
  if i.is_a?(String) and i.include?("\n")
    splitted = i.split("\n").map(&:strip)
    splitted.each {|line|
      if line.include? 'Try: '
        line = line.split('Try: ').last.strip
        esystem line
      end
    }
  end
pp i
end

.autosourceObject

#

Roebe.autosource

#


5628
5629
5630
# File 'lib/roebe/custom_methods/module.rb', line 5628

def self.autosource
  ::Roebe::CustomMethods.autosource
end

.available_classes(optional_input = nil) ⇒ Object

#

Roebe.available_classes

#


211
212
213
# File 'lib/roebe/classes/available_classes.rb', line 211

def self.available_classes(optional_input = nil)
  Roebe::AvailableClasses.new(optional_input)
end

.average_of_differences(array1 = %w( 34.9 44.4 33.6 40.1 41.5 40.3 32.6 39.3 29.3 40.5 31.4 ).map(&:to_f), array2 = %w( 38.2 38.5 40.0 38.2 37.4 37.8 40.3 36.7 38.3 40.4 38.7 ).map(&:to_f)) ⇒ Object

#

Roebe.average_of_differences

Given two input-arrays with values, we calculate the average of differences between these two.

#


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/roebe/math/average_of_differences.rb', line 17

def self.average_of_differences(
    array1 = %w(
      34.9 44.4 33.6 40.1 41.5 40.3 32.6 39.3 29.3 40.5 31.4
    ).map(&:to_f),
    array2 = %w(
      38.2 38.5 40.0 38.2 37.4 37.8 40.3 36.7 38.3 40.4 38.7
    ).map(&:to_f)
  )
  array_differences = []
  array1.each_with_index {|value1, index|
    value2 = array2[index]
    result = (value1 - value2).round(3)
    array_differences << result
    e result
  }
  # pp array_differences
  average_of_differences = array_differences.sum / array_differences.size
  return average_of_differences
end

.backup_master_boot_record(save_in_this_file = 'backup_mbr', use_this_as_input_device = '/dev/sda') ⇒ Object

#

Roebe.backup_master_boot_record

This method can be used to backup the master boot record (MBR) into a local file.

I typically keep a “backup” MBR on my home system. The code at the end of this .rb file does this for me.

#


50
51
52
53
54
55
56
57
58
59
# File 'lib/roebe/toplevel_methods/master_boot_record.rb', line 50

def self.backup_master_boot_record(
    save_in_this_file        = 'backup_mbr',
    use_this_as_input_device = '/dev/sda'
  )
  cmd_to_use = 'dd if='+use_this_as_input_device+
          ' of='+
          save_in_this_file+
          ' bs='+MASTER_BOOD_RECORD_SIZE.to_s+' count=1'
  esystem(cmd_to_use)
end

.base64(this_file = 'image.png') ⇒ Object

#

Roebe.base64

This method expects an existing file as input.

It will then return the output of applying Base64.encode64() to that file. This will allow us to use that String as the binary encoding for e. g. a .png file.

#


19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/roebe/toplevel_methods/base64.rb', line 19

def self.base64(
    this_file = 'image.png'
  )
  if this_file.is_a? Array
    this_file = this_file.first
  end
  require 'base64'
  result = ''.dup
  File.open(this_file, 'r') { |f|
    result << Base64.encode64(f.read)
  }
  result.delete("\n")
end

.batchObject

#

Roebe.batch (batch tag)

This is an ad-hoc method that can be adjusted whenever we have to perform a certain “batch” action.

#


364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'lib/roebe/toplevel_methods/misc.rb', line 364

def Roebe.batch
  all_files = Dir['*']
  all_files.select! {|this_file|
    this_file.end_with?('.doc')
  }
  all_files.each {|this_file|
    date_of_creation = Roebe.return_the_date_of_this_doc_file(this_file)
    # ===================================================================== #
    # Next do the rename action, but not for files that already begin
    # with a proper date-time.
    # ===================================================================== #
    unless File.basename(this_file) =~ /^\d{2}\.\d{2}\.\d{4}\._/
      new_filename = date_of_creation.to_s+'_'+File.basename(this_file)
      rename_this_file(
        this_file,
        new_filename
      )
    end
  }
end

.batch_rename_pdf_files_systematically(counter = 5) ⇒ Object

#

Roebe.batch_rename_pdf_files_systematically

This method will simply rename the .pdf files systematically, starting from “1” to “2” and so forth.

#


620
621
622
623
624
625
626
627
628
629
630
631
# File 'lib/roebe/toplevel_methods/misc.rb', line 620

def self.batch_rename_pdf_files_systematically(
    counter = 5
  )
  these_are_the_pdf_files = Dir['*'].select {|line|
    line.end_with? '.pdf'
  }.sort
  these_are_the_pdf_files.each {|this_pdf_file| counter += 1
    new_name = counter.to_s+'.pdf'
    e this_pdf_file.to_s+' -> '+new_name
    move_file(this_pdf_file, new_name)
  }
end

.beamed_eighth_noteObject

#

Roebe.beamed_eighth_note

#


111
112
113
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 111

def self.beamed_eighth_note
  EmojiParadise.send(__method__)
end

.beamed_eighth_notesObject

#

Roebe.beamed_eighth_notes

The symbol will be: ♫

#


830
831
832
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 830

def self.beamed_eighth_notes
  EmojiParadise.send(__method__)
end

.beamed_sixteenth_notesObject

#

Roebe.beamed_sixteenth_notes

The symbol will be: ♬

#


839
840
841
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 839

def self.beamed_sixteenth_notes
  EmojiParadise.send(__method__)
end

.beautify_systemObject

#

Roebe.beautify_system

This method will simply delegate towards RBT::BeautifySystem.

#


14
15
16
17
18
19
# File 'lib/roebe/toplevel_methods/beautify_system.rb', line 14

def self.beautify_system
  unless Object.const_defined? :RBT
    require 'rbt/utility_scripts/beautify_system.rb'
  end
  RBT::BeautifySystem.new
end

.binding?Boolean

#

Roebe.binding?

#

Returns:

  • (Boolean)


5659
5660
5661
# File 'lib/roebe/custom_methods/module.rb', line 5659

def self.binding?
  TOPLEVEL_BINDING
end

.binning(i, n_bins = 3) ⇒ Object

#

Roebe.binning

The first argument to this method should be an Arary.

#


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/roebe/math/binning.rb', line 23

def self.binning(i, n_bins = 3)
  array = Array.new(n_bins, [])
  # ======================================================================= #
  # Now we have created the array that we will return.
  # The next step is to create the proper subarrays for it. 
  # ======================================================================= #
  i.sort_by {|entry| entry.size }.each {|this_is_the_sequence|
    length_of_the_sequence = this_is_the_sequence.size
    # ===================================================================== #
    # We must next decide onto which Array we will push this sub-sequence.
    # ===================================================================== #
    add_to_the_array_at_this_position = ( length_of_the_sequence ) / n_bins

    if array[add_to_the_array_at_this_position].empty?
      array[add_to_the_array_at_this_position] = [this_is_the_sequence.dup]
    else
      array[add_to_the_array_at_this_position] << this_is_the_sequence.dup
    end
  }
  array = expand_this_array(array)
  return array
end

.black_chess_bishopObject

#

Roebe.black_chess_bishop

#


78
79
80
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 78

def self.black_chess_bishop # ♝
  EmojiParadise.black_chess_bishop
end

.black_chess_kingObject

#

Roebe.black_chess_king

#


57
58
59
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 57

def self.black_chess_king # ♚
  EmojiParadise.black_chess_king
end

.black_chess_knightObject

#

Roebe.black_chess_knight

#


99
100
101
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 99

def self.black_chess_knight # ♟
  EmojiParadise.black_chess_knight
end

.black_chess_pawnObject

#

Roebe.black_chess_pawn

#


85
86
87
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 85

def self.black_chess_pawn # ♟
  EmojiParadise.black_chess_pawn
end

.black_chess_queenObject

#

Roebe.black_chess_queen

#


64
65
66
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 64

def self.black_chess_queen # ♛
  EmojiParadise.black_chess_queen
end

.black_chess_rookObject

#

Roebe.black_chess_rook

#


71
72
73
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 71

def self.black_chess_rook # ♜
  EmojiParadise.black_chess_rook
end

.black_circleObject

#

Roebe.black_circle

The symbol will be: ●

#


746
747
748
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 746

def self.black_circle
  EmojiParadise.send(__method__)
end

.black_lozengeObject

#

Roebe.black_lozenge

#


157
158
159
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 157

def self.black_lozenge
  EmojiParadise.send(__method__)
end

.black_medium_diamondObject

#

Roebe.black_medium_diamond

#


150
151
152
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 150

def self.black_medium_diamond
  EmojiParadise.send(__method__)
end

.black_right_pointing_triangleObject

#

Roebe.black_right_pointing_triangle

#


104
105
106
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 104

def self.black_right_pointing_triangle
  EmojiParadise.send(__method__)
end

.black_rightwards_arrowObject

#

Roebe.black_rightwards_arrow

The symbol will be: ➡

See: www.compart.com/en/unicode/U+27A1

Invocation example:

puts Colours.crimson(Roebe.black_rightwards_arrow)
#


721
722
723
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 721

def self.black_rightwards_arrow
  EmojiParadise.send(__method__)
end

.black_shogi_pieceObject

#

Roebe.black_shogi_piece

#


185
186
187
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 185

def self.black_shogi_piece
  EmojiParadise.send(__method__)
end

.black_smiling_faceObject

#

Roebe.black_smiling_face

#


602
603
604
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 602

def self.black_smiling_face
  EmojiParadise.send(__method__)
end

.black_squareObject

#

Roebe.black_square

The symbol will be: ■

See: www.fileformat.info/info/unicode/char/25a0/index.htm

Invocation example:

puts Colours.crimson(Roebe.black_square_arrow)
#


737
738
739
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 737

def self.black_square
  EmojiParadise.send(__method__)
end

.blinking_cursorObject

#

Roebe.blinking_cursor

#


80
81
82
# File 'lib/roebe/toplevel_methods/blinking_cursor.rb', line 80

def self.blinking_cursor
  Roebe::BlinkingCursor.blink
end

.boku_opening_datesObject

#

Studium.boku_opening_dates

#


15
16
17
18
19
20
21
22
23
24
# File 'lib/roebe/toplevel_methods/boku_opening_times.rb', line 15

def self.boku_opening_dates
  e 'Öffnungszeiten'
  e
  e '  Montag:     von '+sandybrown('09:00')+'-'+sandybrown('12:00')+' Uhr'
  e '  Dienstag:   von '+sandybrown('09:00')+'-'+sandybrown('12:00')+' Uhr'
  e '  Mittwoch:   von '+sandybrown('14:00')+'-'+sandybrown('16:00')+' Uhr'
  e '  Donnerstag: von '+sandybrown('09:00')+'-'+sandybrown('12:00')+' Uhr'
  e '  Freitag:    von '+sandybrown('09:00')+'-'+sandybrown('12:00')+' Uhr'
  e
end

.box_drawings_heavy_down_and_horizontalObject

#

Roebe.box_drawings_heavy_down_and_horizontal

#


698
699
700
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 698

def self.box_drawings_heavy_down_and_horizontal
  EmojiParadise.send(__method__)
end

.box_drawings_heavy_down_and_leftObject

#

Roebe.box_drawings_heavy_down_and_left

#


684
685
686
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 684

def self.box_drawings_heavy_down_and_left
  EmojiParadise.send(__method__)
end

.box_drawings_heavy_down_and_rightObject

#

Roebe.box_drawings_heavy_down_and_right

This is the thick, top-left corner of a “commandline table”.

#


670
671
672
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 670

def self.box_drawings_heavy_down_and_right
  EmojiParadise.send(__method__)
end

.box_drawings_heavy_horizontalObject

#

Roebe.box_drawings_heavy_horizontal

This is a very useful building block for commandline applications, in that you can display a horizontal bar through it.

#


642
643
644
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 642

def self.box_drawings_heavy_horizontal
  EmojiParadise.send(__method__)
end

.box_drawings_heavy_up_and_horizontalObject

#

Roebe.box_drawings_heavy_up_and_horizontal

#


705
706
707
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 705

def self.box_drawings_heavy_up_and_horizontal
  EmojiParadise.send(__method__)
end

.box_drawings_heavy_up_and_leftObject

#

Roebe.box_drawings_heavy_up_and_left

#


691
692
693
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 691

def self.box_drawings_heavy_up_and_left
  EmojiParadise.send(__method__)
end

.box_drawings_heavy_up_and_rightObject

#

Roebe.box_drawings_heavy_up_and_right

#


677
678
679
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 677

def self.box_drawings_heavy_up_and_right
  EmojiParadise.send(__method__)
end

.box_drawings_heavy_verticalObject

#

Roebe.box_drawings_heavy_vertical

#


649
650
651
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 649

def self.box_drawings_heavy_vertical
  EmojiParadise.send(__method__)
end

.bring_up_this_wlan_device(use_this_device = 'wlan0') ⇒ Object

#

Roebe.bring_up_this_wlan_device

This method can be used to bring up a wlan-device, such as an USB stick.

wlan7: wpa_passphrase UPC1371700 >> /etc/wpa_supplicant.conf
#


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/roebe/toplevel_methods/wlan/bring_up_this_wlan_device.rb', line 20

def self.bring_up_this_wlan_device(
    use_this_device = 'wlan0'
  )
  if use_this_device.is_a? Array
    use_this_device = use_this_device.first
  end
  if use_this_device.nil?
    use_this_device = 'wlan0' # Use a default in this case.
  end
  _ = 'iw dev'
  esystem _
  _ = 'ip link show '+use_this_device
  esystem _
  _ = 'ip link set '+use_this_device+' up'
  esystem _
  _ = 'iw '+use_this_device+' link'
  esystem _
  _ = 'iw '+use_this_device+' scan'
  esystem _
  _ = 'wpa_supplicant -B -D wext -i '+use_this_device+' -c /etc/wpa_supplicant.conf'
  esystem _
  _ = 'iw '+use_this_device+' link'
  esystem _
  _ = 'dhclient '+use_this_device+''
  esystem _
end

.browser(use_this_url = ARGV, use_this_browser = BROWSER_TO_USE_BY_DEFAULT) ⇒ Object

#

Roebe.browser

The second argument specifies which browser is to be used, e. g. “palemoon” or another one. It is a String.

#


354
355
356
357
358
359
360
361
362
363
364
365
# File 'lib/roebe/browser/misc.rb', line 354

def self.browser(
    use_this_url     = ARGV,
    use_this_browser = BROWSER_TO_USE_BY_DEFAULT
  )
  if use_this_url.is_a? Array
    # ======================================================================= #
    # Trying this since as of 24.08.2018 - just convert it into a String.
    # ======================================================================= #
    use_this_url = use_this_url.join(' ').strip
  end
  ::Roebe::Browser.new(use_this_url)
end

.bugObject

#

Roebe.bug

#


581
582
583
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 581

def self.bug
  EmojiParadise.send(__method__)
end

.build_all_my_local_gemsObject

#

Roebe.build_all_my_local_gems

This method will build all my local gems. They will then be moved to a target location at /Depot/MyGems.

#


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/roebe/toplevel_methods/build_all_my_local_gems.rb', line 15

def self.build_all_my_local_gems
  require 'roebe/constants/array_install_these_gem_projects.rb'
  require 'roebe/classes/make_gem.rb'
  require 'roebe/constants/constants.rb'
  target_dir = '/Depot/MyGems/'
  mkdir(target_dir)
  array = self.class::ARRAY_INSTALL_THESE_GEM_PROJECTS
  # ======================================================================= #
  # One hack for now come next.
  # ======================================================================= #
  array.reject! {|entry| entry.include? 'pipe_handler' }
  array.each {|file|
    working_dir = RUBY_SRC+file+'/'
    cd working_dir
    MakeGem.new
    possible_gem_files = Dir[working_dir+'*.gem']
    unless possible_gem_files.empty?
      first = possible_gem_files.first
      move_file(first, target_dir, :be_verbose)
    end
  }
  return target_dir # Return it too - we can then use this in other scripts.
end

.bundle_exam_resultsObject

#

Roebe.bundle_exam_results

This will bundle together all my various exam results.

Invoke it like so:

rinvoke bundle_exam_results
#


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/roebe/toplevel_methods/bundle_exam_results.rb', line 23

def self.bundle_exam_results
  require 'pdf_paradise/merge_pdf_namespace'
  begin
    require 'pdf_paradise/merge_pdf/merge_pdf.rb'
  rescue LoadError; end
  store_here  = '/Depot/Temp/AllExams_generated_at_'+today?+'.pdf'
  merge_pdf   = MergePdf.new(:dont_run_yet)
  base_dir    = ::Studium.studium_at_home_dir?+'EXAMS_RESULT/'
  uni_wien    = Dir[base_dir+'UNI_WIEN/*Sammelzeugnis*.pdf'].first
  tu_wien     = Dir[base_dir+'TU_WIEN/*Sammelzeugnis*.pdf'].first
  meduni_wien = Dir[base_dir+'MEDUNI_WIEN/*Sammelzeugnis*.pdf'].first
  vetmed_wien = base_dir+'VETMED_UNI/Sammelzeugnis_Vetmed_2014.pdf'
  boku_wien   = Dir[base_dir+'BOKU_WIEN/*Sammelzeugnis*.pdf'].first
  e 'Now merging various .pdf files together (will store '\
    'at '+sfile(store_here)+').'
  merge_pdf << uni_wien
  merge_pdf << tu_wien
  merge_pdf << meduni_wien
  merge_pdf << vetmed_wien
  merge_pdf << boku_wien
  merge_pdf.store_at store_here
  merge_pdf.run
  merge_pdf.report
end

.c_debug?Boolean

#

Roebe.c_debug?

#

Returns:

  • (Boolean)


14
15
16
# File 'lib/roebe/toplevel_methods/c_debug.rb', line 14

def self.c_debug?
  e 'printf("file %s, line %d: wert: %ld\n", __FILE__, __LINE__, wert);'
end

.calculate_bmi(weight = 16.9, height = 105.4, round = 1) ⇒ Object

#

Roebe.calculate_bmi

This method will calculate the BMI, using the metric system.

The parameter weight should be given in kg; the height in n cm.

#


16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/roebe/toplevel_methods/calculate_bmi.rb', line 16

def self.calculate_bmi(
     weight =  16.9, # in kg
     height = 105.4, # in cm
     round  = 1      # round to n decimal places
   )
   if weight.is_a? Array
     weight = weight.first
   end
   result = (weight.to_f / (height.to_f * height.to_f)) * 10_000.0
   result = result.round(round) if round
   result
end

.calculate_hypotenuse(a, b) ⇒ Object

#

Roebe.calculate_hypotenuse

Pass a and b to calculate the hypotenuse of a triangle.

Usage examples:

Roebe.calculate_hypotenuse(3,5) # => 5.830951894845301
#


22
23
24
# File 'lib/roebe/toplevel_methods/calculate_hypotenuse.rb', line 22

def self.calculate_hypotenuse(a, b)
  return Math.sqrt((a.to_f ** 2) + ( b.to_f ** 2)) 
end

.calculate_the_distance_between_two_points(p1 = ARGV, p2 = nil) ⇒ Object

#

Roebe.calculate_the_distance_between_two_points

This method can calculate the distance between two points.

#


16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/roebe/math/calculate_the_distance_between_two_points.rb', line 16

def self.calculate_the_distance_between_two_points(p1 = ARGV, p2 = nil)
  if p1.is_a? Array and p2.nil?
    p2 = [ p1[3].to_f, p1[4].to_f, p1[5].to_f ]
    p1 = [ p1[0].to_f, p1[1].to_f, p1[2].to_f ]
    # ===================================================================== #
    # Squareoot of:
    #   (x2-x1)**2+(y2-y1)**2+(z2-z2)**2
    # ===================================================================== #
    a = (p2[0] - p1[0]) ** 2 # 0.7832250000000001
    b = (p2[1] - p1[1]) ** 2 # 1.4304159999999992
    c = (p2[2] - p1[2]) ** 2 # 0.013456000000000023
    return Math.sqrt(a+b+c)  # 1.4923461394730109
  end
end

.calculate_the_variance(*i) ⇒ Object

#

Roebe.calculate_the_variance

This method will calculate the variance of the given input array.

#


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/roebe/math/calculate_the_variance.rb', line 14

def self.calculate_the_variance(*i)
  i.flatten!
  i.compact!
  # ======================================================================= #
  # In german: der "Mittelwert":
  # ======================================================================= #
  arithmetic_mean = i.map(&:to_f).sum / i.size.to_f
  # ======================================================================= #
  # Next, we need to calculate the deviations.
  # ======================================================================= #
  array_deviations = i.map {|entry|
    entry.to_f - arithmetic_mean
  }
  # ======================================================================= #
  # Next, determine the squared differences from that number:
  # ======================================================================= #
  array_squared_deviations = array_deviations.map {|entry|
    entry ** 2
  }
  sum = array_squared_deviations.sum
  # ======================================================================= #
  # Next, the variance is that sum-number, divided by n-1 entries:
  # ======================================================================= #
  variance = sum / (i.size.to_f - 1)
  return variance 
end

.calendar(i = ARGV) ⇒ Object

#

Roebe.calendar

#


312
313
314
# File 'lib/roebe/classes/calendar.rb', line 312

def self.calendar(i = ARGV)
  Roebe::Calendar.new(i).print
end

.capitalize_this_file(i = nil) ⇒ Object

#

Roebe.capitalize_this_file

This method can be used to capitalize files in a given directory.

To test this method from the Roebe::Shell, try:

mkdir /Depot/yooo; cd /Depot/yooo; touch ack; capitalize *
#


187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'lib/roebe/toplevel_methods/files.rb', line 187

def self.capitalize_this_file(
    i = nil
  )
  if i
    i = Dir['*'].select {|entry| File.file?(entry) } if i.nil?
    if i.is_a? Array
      i.each {|the_file| capitalize(the_file)}
    else # Else, capitalize it.
      basename = File.basename(i)
      _ = basename[0,1].upcase + basename[1..-1]
      e "Now capitalizing #{sfile(i)} to #{sfile(_)}."
      rename_file(basename,_) # bl $DIA/base/file_actions.rb 
    end
  end
end

.cat(i = ARGV) ⇒ Object

#

Roebe.cat (cat tag)

This method will display the content of a file.

#


543
544
545
546
547
548
549
550
551
552
553
# File 'lib/roebe/toplevel_methods/misc.rb', line 543

def self.cat(i = ARGV)
  require 'cat/module'
  if i.is_a? Array
    if i.empty?
    else
      i.each {|entry| cat(entry) }
    end
  else
    Cat[i]
  end
end

.chained(i = ARGV) ⇒ Object

#

Roebe.chained

#


10
11
12
13
# File 'lib/roebe/toplevel_methods/chained.rb', line 10

def self.chained(i = ARGV)
  require 'rbt' unless Object.const_defined? :RBT
  RBT.batch_compile(i) # Delegate towards RBT here.
end

.chdir(i = :home_dir) ⇒ Object

#

Roebe.chdir (chdir tag, cd tag)

This method can be used to simply change directory on the local filesystem.

#


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/roebe/toplevel_methods/chdir.rb', line 17

def self.chdir(
    i = :home_dir
  )
  # ======================================================================= #
  # Perform some substitutions next.
  # ======================================================================= #
  case i
  # ======================================================================= #
  # === :home_dir
  # ======================================================================= #
  when :home_dir
    i = File.expand_path('~')
  # ======================================================================= #
  # === ~
  # ======================================================================= #
  when '~'
    i = File.expand_path(i)
  end
  if i.include? '$'
    i = convert_global_env(i)
  end
  if File.directory? i
    Dir.chdir(i) # cd into the directory in this case.
  end
end

.check_markObject

#

Roebe.check_mark

The symbol will be: ✓

URL: codepoints.net/U+2713?lang=en

#


794
795
796
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 794

def self.check_mark
  EmojiParadise.send(__method__)
end

.check_whether_an_internet_connection_is_availableObject

#

Roebe.check_whether_an_internet_connection_is_available

This method will return a Boolean value - whether an internet connection is available (true) or whether we are offline.

#


16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/roebe/toplevel_methods/check_whether_an_internet_connection_is_available.rb', line 16

def self.check_whether_an_internet_connection_is_available
  require 'resolv'
  resolver = Resolv::DNS.new
  begin
    # ===================================================================== #
    # The first domain name ever. Will probably not be removed, ever.
    # ===================================================================== #
    resolver.getaddress('symbolics.com')
    true
  rescue Resolv::ResolvError
    false
  end
end

.checkmark_completed_thin?Boolean

#

Roebe.checkmark_completed_thin?

#

Returns:

  • (Boolean)


51
52
53
# File 'lib/roebe/toplevel_methods/unicode/completed.rb', line 51

def self.checkmark_completed_thin?
  EmojiParadise.checkmark_completed_thin?
end

.cheering_megaphoneObject

#

Roebe.cheering_megaphone

This refers to the following symbol: „

#


911
912
913
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 911

def self.cheering_megaphone
  EmojiParadise.send(__method__)
end

.cliner(use_this_character = :default, how_often_to_use_that_token = :default, use_this_colour = :default) ⇒ Object

#

Roebe.cliner

The idea for this method is so that we do not depend on the gem called cliner.

Keep in mind that the input may be like this:

cliner('',grey?) {

Usage example:

Roebe.cliner('*')
#


29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/roebe/toplevel_methods/cliner.rb', line 29

def self.cliner(
    use_this_character          = :default,
    how_often_to_use_that_token = :default,
    use_this_colour             = :default
  )
  case use_this_character
  # ======================================================================= #
  # === :default
  #
  # Specify the default character here.
  # ======================================================================= #
  when :default
    use_this_character = '='
  end
  result = use_this_character * 80
  if use_this_colour
    case use_this_colour
    # ===================================================================== #
    # === :default
    # ===================================================================== #
    when :default
      use_this_colour = :slateblue
    end
    result = ::Colours.send(use_this_colour, result)
  end
  e result
end

.clockObject

#

Roebe.clock

#


110
111
112
# File 'lib/roebe/classes/clock.rb', line 110

def self.clock
  Roebe::Clock.new
end

.colourize_files_and_directories(i = ARGF) ⇒ Object

#

Roebe.colourize_files_and_directories

#


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/roebe/toplevel_methods/colourize_files_and_directories.rb', line 16

def self.colourize_files_and_directories(i = ARGF)
  if i.respond_to? :read
    i = i.read
  end
  if i.is_a? String
    i = i.split("\n")
  end
  i = [i].flatten.compact
  i.map! {|entry|
    if File.exist?(entry) and
      (File.file?(entry) or
       File.directory?(entry) or
       File.symlink?(entry))

      splitted = entry.split('/')
      subrange_joined = (
        splitted[0 .. -2].join('/')+'/'
      ).squeeze('/')

      ftype = File.ftype(entry)

      case ftype
      # =================================================================== #
      # === file
      # =================================================================== #
      when 'file'
        entry = ::Colours.sdir(subrange_joined)+
                ::Colours.sfile(splitted.last)
      # =================================================================== #
      # === directory
      # =================================================================== #
      when 'directory'
        entry = ::Colours.sdir(
          (entry+'/').squeeze('/')
        )
      # =================================================================== #
      # === link
      # =================================================================== #
      when 'link'
        entry = ::Colours.sdir(subrange_joined)+
                ::Colours.ssymlink(splitted.last)
      end
    end
    entry
  }
  i.each {|entry| puts entry }
end

.colourized_tokenitor1(n_times = 80) ⇒ Object

#

Roebe.colourized_tokenitor1

#


16
17
18
# File 'lib/roebe/toplevel_methods/colourized_tokenitor.rb', line 16

def self.colourized_tokenitor1(n_times = 80)
  e steelblue('=' * n_times)
end

.colourized_tokenitor2(n_times = 80) ⇒ Object

#

Roebe.colourized_tokenitor2

#


23
24
25
# File 'lib/roebe/toplevel_methods/colourized_tokenitor.rb', line 23

def self.colourized_tokenitor2(n_times = 80)
  e olivedrab('=' * n_times)
end

.colourized_tokenitor3(n_times = 80) ⇒ Object

#

Roebe.colourized_tokenitor3

#


30
31
32
# File 'lib/roebe/toplevel_methods/colourized_tokenitor.rb', line 30

def self.colourized_tokenitor3(n_times = 80)
  e mediumseagreen('=' * n_times)
end

.colourized_tokenitor4(n_times = 80) ⇒ Object

#

Roebe.colourized_tokenitor4

#


37
38
39
# File 'lib/roebe/toplevel_methods/colourized_tokenitor.rb', line 37

def self.colourized_tokenitor4(n_times = 80)
  e mediumpurple('=' * n_times)
end

.colourized_tokenitor5(n_times = 80) ⇒ Object

#

Roebe.colourized_tokenitor5

#


44
45
46
# File 'lib/roebe/toplevel_methods/colourized_tokenitor.rb', line 44

def self.colourized_tokenitor5(n_times = 80)
  e mediumorchid('=' * n_times)
end

.compile_as_appdir(i = Dir.pwd) ⇒ Object

#

Roebe.compile_as_appdir (appconf, appdir)

This method allows you to quickly compile into an Appdir-Like structure.

#


194
195
196
197
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 194

def self.compile_as_appdir(i = Dir.pwd)
  require 'easycompile'
  Easycompile::CompileAsAppdir.new(i, ARGV) # bl $RUBY_SRC/compile_into_appdir.rb
end

.completedObject

#

Roebe.completed

This returns a unicode “checkmark”. This is useful in the sense that you can use it to display that certain tasks on a todo-list have been completed.

See:

https://www.fileformat.info/info/unicode/char/2713/index.htm
#


34
35
36
# File 'lib/roebe/toplevel_methods/unicode/completed.rb', line 34

def self.completed
  EmojiParadise.completed
end

.controllerObject

#

Roebe.controller

This method is really only useful for my home system.

#


59
60
61
62
# File 'lib/roebe/toplevel_methods/is_on_roebe.rb', line 59

def self.controller
  require '/home/x/data/personal/controller/controller.rb'
  Roebe::Controller.start_sinatra_interface(ARGV)
end

.convert_global_env(i) ⇒ Object

#

Roebe.convert_global_env (global tag, ENV tag)

This method will convert a global $variable to its ENV value and return this value.

We do this by delegating towards class ConvertGlobalEnv.

#


17
18
19
20
21
22
23
24
25
26
27
# File 'lib/roebe/toplevel_methods/convert_global_env.rb', line 17

def self.convert_global_env(i)
  unless Object.const_defined? :ConvertGlobalEnv
    begin
      require 'convert_global_env'
    rescue LoadError; end
  end
  if Object.const_defined? :ConvertGlobalEnv
    i = ConvertGlobalEnv.convert(i)
  end
  i
end

.copy_bluefish_configuration_files(copy_from = Dir['/home/x/programming/ruby/src/roebe/lib/roebe/www/bluefish/*'], copy_to = ENV['HOME'].to_s+'/.bluefish/') ⇒ Object

#

Roebe.copy_bluefish_configuration_files

This method will copy my custom bluefish-related configuration files, if is_on_roebe? returns true (aka if we are on my home system).

Since as of

#


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/roebe/toplevel_methods/editor.rb', line 25

def self.copy_bluefish_configuration_files(
    copy_from = Dir['/home/x/programming/ruby/src/roebe/lib/roebe/www/bluefish/*'],
    copy_to   = ENV['HOME'].to_s+'/.bluefish/'
  )
  e
  e 'Now trying to copy the following files:'
  e
  copy_from.each {|entry|
    e sfile(entry)
  }
  e
  e 'Copying onto the following directory:            '+sdir(copy_to)
  if is_on_roebe?
    mkdir(copy_to) unless File.directory? copy_to
    copy_files(copy_from, copy_to) # <- in the file copy_file.rb
  end
end

.copy_file(file, where_to = return_pwd, be_verbose = true) ⇒ Object

#

Roebe.copy_file

Use this method to copy a file to another location.

The second argument specifies the target directory/path, that is, where you want to copy the file to.

The method must be somewhat complex, in that it shall be able to interprete usage cases such as the following:

copy_files(
  from: '/AUTOGENERATED/',
  to:   chroot_target
)
#


96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/roebe/toplevel_methods/files.rb', line 96

def self.copy_file(
    file,                    # ← Copy these files.
    where_to   = return_pwd, # ← Copy them to this position, defaulting to the current working directory.
    be_verbose = true
  )
  # ======================================================================= #
  # === Handle blocks first
  # ======================================================================= #
  if block_given?
    yielded = yield
    case yielded
    when :be_quiet
      be_verbose = false
    end
  end
  # ======================================================================= #
  # === Handle Array next
  # ======================================================================= #
  if file.is_a? Array
    file.each {|this_file|
      copy_file(this_file, where_to, be_verbose)
    }
  else
    # ===================================================================== #
    # === Handle Hashes next
    # ===================================================================== #
    if file.is_a? Hash
      if file.has_key? :to
        where_to = file.delete(:to)
      end
      if file.has_key? :from
        file = file.delete(:from)
        if File.directory?(file)
          file = Dir["#{file}*"]
        end
      end
      if file.empty?
        file = ''.dup
      end
    end
    if file.is_a? Array
      file.flatten.each {|entry|
        copy_file(entry, where_to, be_verbose)
      }
    else
      file = file.to_s.dup
      case where_to
      when '.'
        where_to = return_pwd
      end
      # ===================================================================== #
      # Make directory-targets cleaner.
      # ===================================================================== #
      if File.directory? where_to
        where_to << '/' unless where_to.end_with? '/'
      end
      if File.exist? file
        if be_verbose
          e "#{rev}Now copying `#{sfile(file)}#{rev}` "\
            "to `#{sfile(where_to)}#{rev}`."
        end
        FileUtils.cp(file, where_to)
      else
        e "#{rev}Can not copy, as the file at `#{file}#{rev}` does not exist."
      end
    end
  end
end

.copy_setup_file_to_pwdObject

#

Roebe.copy_setup_file_to_pwd

This method will copy the old setup.rb file to the pwd.

Note that Roebe.cpruby is an alias to this method.

#


22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/roebe/toplevel_methods/setup.rb', line 22

def self.copy_setup_file_to_pwd
  path_to_the_setup_rb_file = "#{PROJECT_BASE_DIRECTORY}setup/setup.rb"
  if block_given?
    yielded = yield
    case yielded
    when :be_verbose
      e 'Now copying the file '+sfile(path_to_the_setup_rb_file)
      e 'to the current working directory.'
    end
  end
  FileUtils.cp(
    path_to_the_setup_rb_file,'.'
  )
end

.copy_setup_rb_fileObject

#

Roebe.copy_setup_rb_file

This method will copy the setup.rb file to the current directory.

#


16
17
18
19
20
21
# File 'lib/roebe/toplevel_methods/copy_setup_rb_file.rb', line 16

def self.copy_setup_rb_file
  copy_file(
    '/home/x/DATA/PROGRAMMING_LANGUAGES/RUBY/src/roebe/lib/roebe/toplevel_methods/setup.rb',
    Dir.pwd
  )
end

.copy_the_linux_kernelObject

#

Roebe.copy_the_linux_kernel

This method will just copy relevant files onto /boot/, in particular bzImage and System.map.

#


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/roebe/toplevel_methods/copy_the_linux_kernel.rb', line 18

def self.copy_the_linux_kernel
  current_directory = Dir.pwd
  # ======================================================================= #
  # Determine which linux-version we are using.
  # ======================================================================= #
  linux_version = File.basename(current_directory)
  if linux_version.include? '-'
    linux_version = linux_version.split('-').last
  end
  target = '/boot/vmlinuz-'+linux_version.to_s
  cp('arch/x86_64/boot/bzImage', target)
  target_for_the_new_system_map_file = "/boot/System.map-#{linux_version}"
  e 'Coping System.map onto '+target_for_the_new_system_map_file+' next.'
  cp('System.map', target_for_the_new_system_map_file)
end

.cp_to_here(copy_what = ARGV) ⇒ Object

#

Roebe.cp_to_here

#


16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/roebe/toplevel_methods/cp_to_here.rb', line 16

def self.cp_to_here(
    copy_what = ARGV
  )
  if copy_what.is_a? Array
    copy_what.each {|entry| cp_to_here(entry) }
  else
    require 'rbt'
    _ = RBT::Compile.new(copy_what) { :do_not_run_yet }
    path = _.cookbook_dataset_program_path?
    e 'Using this path: '+steelblue(path)
    cp(path, '.')
  end
end

.cpp_header?Boolean

#

Roebe.cpp_header?

#

Returns:

  • (Boolean)


173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 173

def self.cpp_header?
  _ = ''.dup
  _ << '#include <iostream>

using namespace std; 

int main()
{
return 0;
} // g++ foo*.cpp
'
  e _
  set_xorg_buffer(_)
end

.crazy_make_modeObject

#

Roebe.crazy_make_mode

This method is possibly fairly useless to most people, but I needed it in order to chroot-compile a program, and automatically copy the correct .h files into the /usr/include/ hierarchy.

This mode depends on the gem called “rbt”.

#


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/roebe/toplevel_methods/crazy_make_mode.rb', line 21

def self.crazy_make_mode
  require 'rbt'
  # ======================================================================= #
  # We need the 2>&1 variant to grab only the errors.
  # ======================================================================= #
  result = `make 2>&1`.split(N)
  result.select! {|line|
    # ===================================================================== #
    # Select the correct line(s) next.
    # ===================================================================== #
    line.include?('fatal error:') and
    line.include?('No such file or directory')
  }
  if Object.const_defined? :RBT
    unless RBT.const_defined? :ConfigLogParser
      require 'rbt/utility_scripts/config_log_parser.rb'
    end
    regex_to_use = RBT::ConfigLogParser::REGEX_FOR_MISSING_HEADER_FILES
    first = result.first
    first =~ regex_to_use
    this_file_appears_to_be_missing = $1.to_s.dup
    unless this_file_appears_to_be_missing.empty?
      e 'This file appears to be missing:'
      e
      e "  #{swarn(this_file_appears_to_be_missing)}"
      e
      # =================================================================== #
      # Hardcoded path to the backup-include directory next. This will
      # contain the default .h files.
      # =================================================================== #
      backup_include_dir = '/BACKUP_INCLUDE_DIR/'
      if on_roebe? and File.directory? backup_include_dir
        e 'Coping this file next.'
        # ================================================================= #
        # In this situation, copy the file.
        # ================================================================= #
        from = backup_include_dir+this_file_appears_to_be_missing
        to   = "/usr/include/#{this_file_appears_to_be_missing}"
        copy_file(from, to)
      end
    end
  end
end

.crc32(i) ⇒ Object

#

Roebe.crc32

This method depends on zlib.

The input argument is assumed to be a String.

Invocation example:

Roebe.crc32('Hello world!') # => 461707669
#


435
436
437
438
# File 'lib/roebe/toplevel_methods/misc.rb', line 435

def self.crc32(i)
  require 'zlib' unless Object.const_defined?(:Zlib)
  return Zlib.crc32(i)
end

.create_desktop_file_for(this_program) ⇒ Object

#

Roebe.create_desktop_file_for

Easier top-level method to create a .desktop file.

#


228
229
230
# File 'lib/roebe/classes/create_desktop_file.rb', line 228

def self.create_desktop_file_for(this_program)
  Roebe::CreateDesktopFile.new(this_program)
end

.create_directoriesObject

#

Roebe.create_directories (idirs tag, generate_my_directories tag)

This method creates my default directories, for use in a HiveOS-like system (my directories).

Usage example (from bash shell):

create_dirs
#


411
412
413
414
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 411

def self.create_directories
  require_this_roebe_class 'create_my_directories'
  CreateMyDirectories.new
end

.create_directory(i, be_verbose = false) ⇒ Object

#

Roebe.create_directory

This method will try to create a directory (or several directories), by delegating onto FileUtils.mkdir_p().

#


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/roebe/toplevel_methods/create_directory.rb', line 18

def self.create_directory(
    i, be_verbose = false
  )
  case be_verbose
  when :be_verbose
    be_verbose = true
  end
  if i.is_a? Array
    i.each {|entry| create_directory(entry, be_verbose) }
  else
    if be_verbose and !File.directory?(i)
      e 'Creating the directory '+sdir(i)+' next.'
    end
    FileUtils.mkdir_p(i)
  end
end

.create_directory_layout(use_this_as_the_directory_structure = :use_the_roebe_project_in_order_to_infer_the_directory_structure) ⇒ Object

#

Roebe.create_directory_layout

Create my default directory layout scheme.

#


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/roebe/toplevel_methods/create_directory_layout.rb', line 20

def self.create_directory_layout(
    use_this_as_the_directory_structure =
      :use_the_roebe_project_in_order_to_infer_the_directory_structure
  )
  case use_this_as_the_directory_structure
  when :use_the_roebe_project_in_order_to_infer_the_directory_structure
    begin
      require 'yaml'
      this_file = Roebe.file_directory_structure
      use_this_as_the_directory_structure = YAML.load_file(this_file)
    rescue LoadError
      if is_on_roebe?
        # ================================================================= #
        # Hardcoded approach then:
        # ================================================================= #
        this_file = ::Roebe.file_directory_structure
        if File.exist? this_file
          use_this_as_the_directory_structure = YAML.load_file(this_file)
        else
          e "The file #{sfile(this_file)} does not exist."
        end
      else
        e 'The roebe project is not available. Consider installing it.'
        e
        e '  gem install roebe'
        e
      end
    end
  end
  unless use_this_as_the_directory_structure.is_a? Symbol
    create_directory(use_this_as_the_directory_structure, :be_verbose)
  end
end

.create_firefox_extension(i = ARGV) ⇒ Object

#

Roebe.create_firefox_extension

#


169
170
171
# File 'lib/roebe/classes/create_firefox_extension.rb', line 169

def self.create_firefox_extension(i = ARGV)
  ::Roebe::CreateFirefoxExtension.new(i)
end

.create_games_iso(i = '--default') ⇒ Object

#

Roebe.create_games_iso

#


299
300
301
# File 'lib/roebe/classes/create_iso_for_games.rb', line 299

def self.create_games_iso(i = '--default')
  ::Roebe::CreateIsoForGames.new(i)
end

.create_iso(i = DEFAULT_DIRECTORY, run_already = :default, &block) ⇒ Object

#

Roebe.create_iso

#


193
194
195
196
197
# File 'lib/roebe/classes/create_iso.rb', line 193

def self.create_iso(
    i = DEFAULT_DIRECTORY, run_already = :default, &block
  )
  ::Roebe::CreateISO.new(i, run_already, &block)
end

.create_lua_pc_fileObject

#

Roebe.create_lua_pc_file

#


5604
5605
5606
# File 'lib/roebe/custom_methods/module.rb', line 5604

def self.create_lua_pc_file
  ::Roebe::CustomMethods.create_lua_pc_file
end

.create_mad_pkgconfig_file(store_where = '/usr/lib/pkgconfig/mad.pc', use_this_prefix = '/usr') ⇒ Object

#

Roebe.create_mad_pkgconfig_file

The first argument denotes where this will be stored.

#


560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
# File 'lib/roebe/toplevel_methods/misc.rb', line 560

def self.create_mad_pkgconfig_file(
    store_where     = '/usr/lib/pkgconfig/mad.pc',
    use_this_prefix = '/usr'
  )
  store_what = 'prefix='+use_this_prefix+'
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: mad
Description: MPEG audio decoder
Requires:
Version: 0.15.1b
Libs: -L${libdir} -lmad
Cflags: -I${includedir}'
  write_what_into(store_what, store_where)
  e 'Storing into `'+sfile(store_where)+'`.'
end

.create_my_gems(i = ARGV) ⇒ Object

#

Roebe.create_my_gems

#


124
125
126
# File 'lib/roebe/classes/batch_generate_all_my_gems.rb', line 124

def self.create_my_gems(i = ARGV)
  Roebe::BatchGenerateAllMyGems.new(i)
end

.create_this_c_file(name_of_the_c_file = 'hello_world.c', file_content_as_string = '#include <stdio.h> int main() { /* This will print hello world, in C */ printf("Hello, World! \n"); return 0; } ') ⇒ Object

#

Roebe.create_this_c_file

#


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/roebe/toplevel_methods/create_this_c_file.rb', line 14

def self.create_this_c_file(
    name_of_the_c_file     = 'hello_world.c',
    file_content_as_string = '#include <stdio.h>

int main() {
/* This will print hello world, in C */
printf("Hello, World! \n");

return 0;
}
'
  )
  what = file_content_as_string
  into = name_of_the_c_file
  e "Generating the file `#{sfile(into)}` next."
  write_what_into(what, into)
end

.create_wpa_supplicant_build_file(into = 'wpa_supplicant/.config') ⇒ Object

#

Roebe.create_wpa_supplicant_build_file

#


237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# File 'lib/roebe/toplevel_methods/misc.rb', line 237

def self.create_wpa_supplicant_build_file(
    into = 'wpa_supplicant/.config'
  )
  what = "CONFIG_BACKEND=file
CONFIG_CTRL_IFACE=y
CONFIG_DEBUG_FILE=y
CONFIG_DEBUG_SYSLOG=y
CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
CONFIG_DRIVER_NL80211=y
CONFIG_DRIVER_WEXT=y
CONFIG_DRIVER_WIRED=y
CONFIG_EAP_GTC=y
CONFIG_EAP_LEAP=y
CONFIG_EAP_MD5=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_OTP=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_TLS=y
CONFIG_EAP_TTLS=y
CONFIG_IEEE8021X_EAPOL=y
CONFIG_IPV6=y
CONFIG_LIBNL32=y
CONFIG_PEERKEY=y
CONFIG_PKCS12=y
CONFIG_READLINE=y
CONFIG_SMARTCARD=y
CONFIG_WPS=y
CFLAGS += -I/usr/include/libnl3
"
  unless File.directory?(File.dirname(into))
    into = File.basename(into)
  end
  e "#{rev}Storing into `#{sfile(into)}`."
  write_what_into(what, into)
end

.create_zip(i) ⇒ Object

#

Roebe.create_zip

#


109
110
111
# File 'lib/roebe/classes/create_zip.rb', line 109

def self.create_zip(i)
  Roebe::CreateZip.new(i)
end

.current_stable_version_of_ruby(this_file = yaml_dir?+'current_ruby_versions.yml') ⇒ Object

#

Roebe.current_stable_version_of_ruby

#


276
277
278
279
280
# File 'lib/roebe/toplevel_methods/misc.rb', line 276

def self.current_stable_version_of_ruby(
    this_file = yaml_dir?+'current_ruby_versions.yml'
  )
  YAML.load_file(this_file)['current_stable_version_of_ruby']
end

.custom_shebang?Boolean

#

Roebe.custom_shebang?

#

Returns:

  • (Boolean)


583
584
585
# File 'lib/roebe/toplevel_methods/misc.rb', line 583

def self.custom_shebang?
  '#!/user/bioinf4/bin/ruby -w'
end

.cweb1Object

#

Roebe.cweb1

#


126
127
128
129
130
131
# File 'lib/roebe/toplevel_methods/misc.rb', line 126

def self.cweb1
  _webpage = Cyberweb::ImagesToHtml.new(
    ['--use-HTML-table','--table=2']
  )
  Open.in_browser('*.html')
end

.cweb2Object

#

Roebe.cweb2

#


136
137
138
139
140
141
# File 'lib/roebe/toplevel_methods/misc.rb', line 136

def self.cweb2
  _webpage = Cyberweb::ImagesToHtml.new(
    ['--use-HTML-table','--table=2','--use-no-size-value']
  )
  Open.in_browser('*.html')
end

.cweb3Object

#

Roebe.cweb3

#


146
147
148
149
150
151
# File 'lib/roebe/toplevel_methods/misc.rb', line 146

def self.cweb3
  _webpage = Cyberweb::ImagesToHtml.new(
    ['--use-HTML-table','--table=1','--use-no-size-value']
  )
  Open.in_browser('*.html')
end

.dark_shadeObject

#

Roebe.dark_shade

#


174
175
176
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 174

def self.dark_shade
  EmojiParadise.dark_shade
end

.date_sort_based_on_filename(array = [ %w( 22.05.2023-foobar1.mp4 22.03.2011-foobar2.mp4 )) ⇒ Object

#

Roebe.date_sort_based_on_filename

This method will sort an array of filenames, based on the date that these files have. By default we will top-sort the most recent file, so oldest files will be shown last.

So if we have “22.05.2023-foobar1.mp4” and “22.03.2011-foobar2.mp4” then this method will return a sorted Array where foobar1.mp4 will appear as first element, and foobar2.mp4 will appear as the last element.

This method was added in May 2023. The reason was that I noticed that in different of my gems I needed this functionality, so it made sense to put the code into one toplevel method that other projects could re-use, as-is.

Invocation examples:

Roebe.date_sort_based_on_filename(%w( 11.01.2021-foobar3.mp4 22.05.2023-foobar1.mp4 22.03.2011-foobar2.mp4 ))
Roebe.date_sort_based_on_filename(%w( 11.01.2021-foobar3.mp4 22.05.2023-foobar1.mp4 22.03.2011-foobar2.mp4 2000-foobar5.mp4 ))
#


48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/roebe/toplevel_methods/misc.rb', line 48

def self.date_sort_based_on_filename(
    array = [
      %w( 22.05.2023-foobar1.mp4 22.03.2011-foobar2.mp4 )
    ]
  )
  use_this_regex = /\d{2}\.\d{2}\.\d{4}/
  sorted_array = array.flatten.sort_by {|entry|
    use_this_copy_for_the_comparison = nil
    # ===================================================================== #
    # We need to keep in mind that not all entries are correct.
    # Some will only have the year, so we need to assume and
    # anticipate this. Example: "etwa_2000_Joe.jpg".
    # ===================================================================== #
    if entry =~ use_this_regex
    else
      # =================================================================== #
      # In this case we have to do something. The first assumption
      # we'll do is to query if we have only the year.
      # =================================================================== #
      if entry =~ /\d{4}/ # Ok, so this must be a year.
        entry = entry.dup if entry.frozen?
        use_this_copy_for_the_comparison = entry.sub(/(\d{4})/, '01.01.\1')
      end
    end
    if use_this_copy_for_the_comparison
      scanned_result = use_this_copy_for_the_comparison.scan(use_this_regex)
    else
      scanned_result = entry.scan(use_this_regex)
    end
    time = scanned_result.flatten.first
    time_parsed = ::Time.parse(time)
    time_parsed
  }.reverse
  return sorted_array
end

.decompose_this_unicode_symbol(i) ⇒ Object

#

Roebe.decompose_this_unicode_symbol

Usage example:

array = (2000 .. 3000).to_a; array.each {|entry| puts Roebe.decompose_this_unicode_symbol(entry) }
#


17
18
19
20
# File 'lib/roebe/toplevel_methods/unicode/decompose_this_unicode_symbol.rb', line 17

def self.decompose_this_unicode_symbol(i)
  value = i.to_s.to_i(16)
  [ value ].pack('U*')
end

.default_comment_lineObject

#

Roebe.default_comment_line

#


308
309
310
# File 'lib/roebe/toplevel_methods/misc.rb', line 308

def self.default_comment_line
  '# '+('='*78)+' #'
end

.default_file_read(i) ⇒ Object

#

Roebe.default_file_read

#


350
351
352
353
354
355
# File 'lib/roebe/toplevel_methods/files.rb', line 350

def self.default_file_read(i)
  return File.read(
    i,
    encoding: 'UTF-8'
  )
end

.determine_whether_colours_will_be_used_based_on_the_file_use_colours(use_this_file = FILE_USE_COLOURS) ⇒ Object

#

Roebe.determine_whether_colours_will_be_used_based_on_the_file_use_colours

The first argument to this method should be a .yml file.

#


64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/roebe/colours/colours.rb', line 64

def self.determine_whether_colours_will_be_used_based_on_the_file_use_colours(
    use_this_file = FILE_USE_COLOURS
  )
  if File.exist? use_this_file
    @use_colours = YAML.load_file(use_this_file)
    if @use_colours == true
      Roebe.try_to_require_the_colours_project
    end
  else
    @use_colours = false
  end
end

.dhcpcd(i = ARGV) ⇒ Object

#

Roebe.dhcpcd

#


220
221
222
# File 'lib/roebe/classes/dhcpcd/dhcpcd.rb', line 220

def self.dhcpcd(i = ARGV)
  Dhcpcd.new(i)
end

.directory_roebe_yaml_pdf?Boolean

#

Roebe.directory_roebe_yaml_pdf?

#

Returns:

  • (Boolean)


31
32
33
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 31

def self.directory_roebe_yaml_pdf?
  DIRECTORY_ROEBE_YAML_PDF
end

.disable(*i) ⇒ Object

#

disable (disable tag)

#


14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/roebe/toplevel_methods/disable.rb', line 14

def self.disable(*i)
  if i.is_a? Array
    i = i.join(' ').strip
  end
  case i.to_s # We need a String past this point.
  # ======================================================================= #
  # === disable colours
  # ======================================================================= #
  when /^colours?$/i
    disable_colours { :be_verbose }
  end
end

.disable_coloursObject

#

Roebe.disable_colours

#


47
48
49
# File 'lib/roebe/colours/colours.rb', line 47

def self.disable_colours
  @use_colours = false
end

.display_mbrObject

#

Roebe.display_mbr

#


15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/roebe/toplevel_methods/display_mbr.rb', line 15

def self.display_mbr
  e "#{rev}Displaying the content of this computer's MBR next:"
  cliner
  result = File.open('/dev/sda') {|f| f.read(512) } # <- This is a String.
  pp result
  if result.include? 'LILO'
    e
    e "#{rev}This MBR uses LILO (the Linux Loader) as its bootloader."
    e
  end
  cliner
  return result
end

.display_unicode_snowmanObject

#

Roebe.display_unicode_snowman

For commandline display, this could work:

roebe --snowman
#


23
24
25
# File 'lib/roebe/toplevel_methods/unicode/display_unicode_snowman.rb', line 23

def self.display_unicode_snowman
  e return_unicode_snowman
end

.do_compile_this_java_file_statically(work_on_these_files) ⇒ Object

#

Roebe.do_compile_this_java_file_statically

This method can be used to compile a .java file or an array of .java files into native executables, if GraalVM is installed as well as native-image is available.

This presently (in the year 2022) only works on Linux; it remains to be seen if - and when - this will be supported on windows.

#


24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/roebe/commandline/misc.rb', line 24

def self.do_compile_this_java_file_statically(
    work_on_these_files
  )
  require 'roebe/classes/run/run.rb'
  work_on_these_files = [work_on_these_files].flatten.compact
  work_on_these_files.each {|work_on_this_file|
    cd File.dirname(work_on_this_file)
    e rev+'Next delegating towards class '+
      steelblue('Roebe::Run')+'.'
    Roebe::Run.new([
      File.basename(work_on_this_file),
      '--static-image'
    ])
    raw_filename = File.basename(work_on_this_file).
                   downcase.delete_suffix(
                     File.extname(work_on_this_file)
                   )
    e 'Next relocating the file towards `'+
      sfile(log_dir?+raw_filename)+'`.'
    move_file(raw_filename, log_dir?)
  }
end

.do_use_unicode_environmentObject

#

Roebe.do_use_unicode_environment

#


36
37
38
# File 'lib/roebe/toplevel_methods/env.rb', line 36

def self.do_use_unicode_environment
  @env['LC_ALL'] = ENV['LC_ALL'] = 'en_US.utf8'
end

.does_this_program_exist?(i = nil) ⇒ Boolean

#

Roebe.does_this_program_exist?

The argument to this method should be the name of the program, such as “htop” or “zlib”.

#

Returns:

  • (Boolean)


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/roebe/toplevel_methods/does_this_program_exist.rb', line 20

def self.does_this_program_exist?(
    i = nil
  )
  i = i.first if i.is_a? Array
  if i
    file_location = nil
    return_value  = false
    path = path?
    if path
      splitted_path = path.split(':')
      splitted_path.each {|entry|
        # =================================================================== #
        # If the file exists, we will assume that the program exists.
        # =================================================================== #
        location = rds(entry.to_s+'/'+i.to_s)
        if File.exist? location
          return_value = true
          file_location = location
          return [return_value, file_location] # Return here then at once, an Array.
        end
      } unless i.to_s.empty?
    else
      e 'No PATH variable seems to exist.'
    end
  end
  return false # This is the default return value.
end

.does_this_terminal_support_unicode?Boolean

#

Roebe.does_this_terminal_support_unicode?

#

Returns:

  • (Boolean)


12
13
14
15
16
17
18
19
20
21
# File 'lib/roebe/toplevel_methods/does_this_terminal_support_unicode.rb', line 12

def self.does_this_terminal_support_unicode?
  entries = ENV.values_at("LC_ALL","LC_CTYPE","LANG").compact
  first_entry_downcased = entries.first.downcase

  if first_entry_downcased.include?(("UTF-8").downcase.delete('-'))
    e "△ \\o/ Yes this terminal supports UTF-8 \\o/ △"
  else
    raise "Terminal can't handle UTF-8"
  end
end

.dosbox_config(i = ARGV) ⇒ Object

#

Roebe.dosbox_config

rinvoke dosbox_config

#


142
143
144
# File 'lib/roebe/dosbox/generate_dosbox_config.rb', line 142

def self.dosbox_config(i = ARGV)
  ::Roebe::GenerateDosboxConfig.new(i)
end

.double_low_quotation_markObject

#

Roebe.double_low_quotation_mark

This refers to the following symbol: „

#


902
903
904
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 902

def self.double_low_quotation_mark
  EmojiParadise.send(__method__)
end

.downcase_all_entries_in_the_current_directory(entries = ARGV) ⇒ Object

#

Roebe.downcase_all_entries_in_the_current_directory

This method will simply downcase every entry in the current directory.

A shorter alias exists to this method, called ‘Roebe.downcase_all_entries`.

#


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/roebe/toplevel_methods/downcase_all_entries_in_the_current_directory.rb', line 21

def self.downcase_all_entries_in_the_current_directory(
    entries = ARGV
  )
  entries = [entries].flatten.compact
  # ======================================================================= #
  # Populate the Array if the user did not input anything:
  # ======================================================================= #
  entries = Dir['*'] if entries.empty?
  entries.flatten!
  entries.each {|entry|
    to = File.basename(entry.downcase)
    unless File.exist? to
      e "#{rev}Downcasing from `#{sfile(entry)}` to `#{sfile(to)}`."
      FileUtils.mv(entry, to)
    end
  }
end

.downcase_extension(i = ARGV) ⇒ Object

#

Roebe.downcase_extension

#


123
124
125
# File 'lib/roebe/classes/downcase_extension.rb', line 123

def self.downcase_extension(i = ARGV)
  DowncaseExtension.new(i)
end

.download_autogenerated_rcfilesObject

#

Roebe.download_autogenerated_rcfiles

To invoke this method, try:

roebe --download-autogenerated
#


241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/roebe/commandline/misc.rb', line 241

def self.download_autogenerated_rcfiles
  remote_base_dir = 'http://shevy.bplaced.net/AUTOGENERATED/'
  %w(
    aliases_rc
    cd_aliases_rc
    programs_aliases_rc
    ps1_rc
    roeberia_settings_rc
    ls_colours_rc
  ).each {|remote_url| remote_url = remote_base_dir+remote_url
    e "Now downloading #{sfancy(remote_url)}"
    esystem "wget #{remote_url}"
  }
end

.download_certdataObject

#

Roebe.download_certdata

This method can be used to download the certdata.txt file from the BLFS project.

#


17
18
19
20
21
# File 'lib/roebe/toplevel_methods/download_certdata.rb', line 17

def self.download_certdata
  remote_url = 'http://anduin.linuxfromscratch.org/BLFS/other/certdata.txt'
  _ = "wget #{remote_url}"
  esystem _
end

.download_emojis(i = :default) ⇒ Object

#

Roebe.download_emojis

This method will download emojis, defaulting to the URL www.unicode.org/Public/emoji/4.0/.

Do note that the dataset obtained from there, via open-uri, will be filtered for only .txt files - everything else will be ignored.

#


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/roebe/toplevel_methods/download_emojis.rb', line 21

def self.download_emojis(i = :default)
  if i.is_a? Array
    i = i.first
  end
  case i
  when :default, nil
    # ===================================================================== #
    # This is the default URL.
    # ===================================================================== #
    i = 'http://www.unicode.org/Public/emoji/4.0/'
  end
  require 'open-uri'
  raw_dataset = open(i).read
  use_this_regex = /<a href=".+">(.+)<\/a>/ # See: https://rubular.com/r/mdUeXe4VzmGBZS
  scanned = raw_dataset.scan(use_this_regex).flatten
  scanned.map! {|entry| "#{i}#{entry}" }
  scanned.select! {|entry| entry.end_with? '.txt' }
  e 'Proceeding to download '+scanned.size.to_s+' files next:'
  scanned.each {|entry|
    esystem 'wget '+entry
  }
end

.download_unicode_dataset(use_this_url = 'https://www.unicode.org/Public/UNIDATA/') ⇒ Object

#

Roebe.download_unicode_dataset

This method will download the Unicode dataset from www.unicode.org.

#


17
18
19
20
21
22
23
24
25
26
27
# File 'lib/roebe/toplevel_methods/unicode/download_unicode_dataset.rb', line 17

def self.download_unicode_dataset(
    use_this_url = 'https://www.unicode.org/Public/UNIDATA/'
  )
  x = Roebe.return_all_remote_entries_from_this_url(use_this_url)
  e x
  x.each {|remote_url|
    unless remote_url.end_with?('/') or remote_url.include?('index.html')
      system 'wget '+remote_url
    end
  }
end

.downwards_arrowObject

#

Roebe.downwards_arrow

The symbol will be: ↓

See: en.wikipedia.org/wiki/Arrow_%28symbol%29#Arrows_in_Unicode

Invocation example:

puts Colours.crimson(Roebe.up_arrow)
#


1063
1064
1065
1066
1067
1068
1069
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1063

def self.downwards_arrow
  result = "\u{2193}"
  if is_on_roebe?
    set_xorg_buffer(result.strip)
  end
  result
end

.draw_line(i = 5) ⇒ Object

#

Roebe.draw_line

#


10
11
12
13
14
15
16
# File 'lib/roebe/math/draw_line.rb', line 10

def self.draw_line(i = 5)
  _ = ''.dup
  i.times {|entry|
    _ << (' '*entry)+"*\n"
  }
  puts _
end

.draw_triangle(i = 5) ⇒ Object

#

Roebe.draw_triangle

#


10
11
12
13
14
15
16
17
# File 'lib/roebe/math/draw_triangle.rb', line 10

def self.draw_triangle(i = 5)
  _ = ''.dup
  i.times {|n_iteration| n_iteration += 1
    _ << (' '* (i - n_iteration)).to_s+
         ('*' * n_iteration).to_s+"\n"
  }
  puts _
end

.e(i = '', make_newline = true) ⇒ Object

#

Roebe.e

#


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/roebe/toplevel_methods/e.rb', line 12

def self.e(
    i            = '',
    make_newline = true
  )
  case make_newline
  when :do_not_make_a_newline
    make_newline = false
  end
  if i.is_a? Array
    i = i.join(' ')
  end
  if make_newline
    i = "#{i}\n"
  end
  print i
end

.ecomment(i) ⇒ Object

#

Roebe.ecomment

This method can be used to colourize strings that include a ‘#’ character.

To test this, try:

Roebe.ecomment 'hello # world!'
#


121
122
123
124
125
126
127
128
# File 'lib/roebe/colours/colours.rb', line 121

def self.ecomment(i)
  if i.include? '#'
    splitted = i.split '#'
    e sfancy(splitted.first)+
      Colours::GREY+'#'+
      splitted.last+rev
  end
end

.edir(i = '') ⇒ Object

#

Roebe.edir

#


217
218
219
# File 'lib/roebe/colours/colours.rb', line 217

def self.edir(i = '')
  e sdir(i)
end

.editor?Boolean

#

Roebe.editor?

#

Returns:

  • (Boolean)


28
29
30
# File 'lib/roebe/constants/misc.rb', line 28

def self.editor?
  MAIN_EDITOR_TO_USE
end

.efancy(i = '') ⇒ Object

#

Roebe.efancy

#


192
193
194
# File 'lib/roebe/colours/colours.rb', line 192

def self.efancy(i = '')
  e ::Roebe.sfancy(i)
end

.eighth_noteObject

#

Roebe.eighth_note

The symbol for this musical note will be: ♪

#


875
876
877
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 875

def self.eighth_note
  EmojiParadise.send(__method__)
end

.email(i = ARGV) ⇒ Object

#

Roebe.email

#


878
879
880
# File 'lib/roebe/classes/email.rb', line 878

def self.email(i = ARGV)
  ::Roebe::Email.new(i)
end

.email?Boolean

#

Roebe.email?

#

Returns:

  • (Boolean)


15
16
17
# File 'lib/roebe/toplevel_methods/email.rb', line 15

def self.email?
  '[email protected]'
end

.embeddable_interfaceObject

#

Roebe.embeddable_interface

#


48
49
50
51
52
# File 'lib/roebe/www/embeddable_interface.rb', line 48

def self.embeddable_interface
  object = Object.new
  object.extend(::Roebe::EmbeddableInterface)
  return object
end

.empty?(i = ARGF) ⇒ Boolean

#

Roebe.empty?

#

Returns:

  • (Boolean)


73
74
75
# File 'lib/roebe/classes/empty.rb', line 73

def self.empty?(i = ARGF)
  Roebe::Empty.new(i)
end

.enable(*i) ⇒ Object

#

enable (enable tag)

#


14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/roebe/toplevel_methods/enable.rb', line 14

def self.enable(*i)
  if i.is_a? Array
    i = i.join(' ').strip
  end
  case i.to_s # We need a String past this point.
  # ======================================================================= #
  # === enable colours
  # ======================================================================= #
  when /^colours?$/i
    enable_colours { :be_verbose }
  end
end

.enable_coloursObject

#

Roebe.enable_colours

#


54
55
56
57
# File 'lib/roebe/colours/colours.rb', line 54

def self.enable_colours
  @use_colours = true
  Roebe.try_to_require_the_colours_project
end

.encoding?Boolean

#

Roebe.encoding?

#

Returns:

  • (Boolean)


61
62
63
# File 'lib/roebe/encoding/encoding.rb', line 61

def self.encoding?
  Encoding::USE_THIS_ENCODING
end

.encoding_isoObject

#

Roebe.encoding_iso

Query-method towards the ISO encoding, specifically the ISO-8859-1 encoding.

#


71
72
73
# File 'lib/roebe/encoding/encoding.rb', line 71

def self.encoding_iso
  Encoding::ENCODING_ISO
end

.encoding_utf8Object

#

Roebe.encoding_utf8

Query-method towards the UTF-8 encoding.

#


80
81
82
# File 'lib/roebe/encoding/encoding.rb', line 80

def self.encoding_utf8
  Encoding::ENCODING_UTF
end

.ensure_main_encoding(i, use_this_encoding = encoding? ) ⇒ Object

#

Roebe.ensure_main_encoding

This method will ensure that the given input has the proper encoding.

It is usually used on Strings, but as can be seen in the code below, it can also be applied on Arrays and Hashes.

#


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/roebe/encoding/encoding.rb', line 92

def self.ensure_main_encoding(
    i,
    use_this_encoding = encoding?
  )
  if i.is_a? String
    i = i.force_encoding(use_this_encoding)
  elsif i.is_a? Array
    i.map! {|entry| entry.force_encoding(use_this_encoding) }
  elsif i.is_a? Hash
    new_hash = {}
    i.each_pair {|key, value|
      if key.is_a? String
        key = key.dup if key.frozen?
        key = key.force_encoding(use_this_encoding)
      end
      new_hash[key] = value
    }
    i = new_hash # And assign it here.
  end
end

.enter_chroot(which_variant = :depot_chroot, chroot_target = '/Depot/Chroot/', use_this_path_for_env = '/usr/bin/env') ⇒ Object

#

Roebe.enter_chroot

This method can be used to enter a chroot environment.

I am not sure whether this is possible from ruby - but at the least the shell-syntax can be shown on the commandline, which is one use case for this method here.

#


43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/roebe/toplevel_methods/chroot.rb', line 43

def self.enter_chroot(
    which_variant         = :depot_chroot, # :lfs_first_stage,
    chroot_target         = '/Depot/Chroot/', # ENV['LFS'],
    use_this_path_for_env = '/usr/bin/env' # '/home/Programs/Coreutils/Current/bin/'
  )
  if which_variant.is_a? Array
    which_variant = which_variant.first
  end
  if which_variant.nil?
    which_variant = :default # Assume a default value in this case.
  end
  if File.directory?(chroot_target) and
     Dir.empty?(chroot_target) and
     is_on_roebe?
    # ===================================================================== #
    # Overrule the target in this case.
    # ===================================================================== #
    chroot_target = '/Depot/Chroot/'
  elsif which_variant and
        which_variant.is_a?(String) and
        File.directory?(which_variant)
    chroot_target = which_variant
    which_variant = :local_chroot
  end
  # ======================================================================= #
  # === Determine which path to bash is to be used next
  #
  # path_to_bash = '/tools/bin/bash'
  # ======================================================================= #
  path_to_bash          = '/usr/bin/bash'
  # ======================================================================= #
  # use_this_path_for_env = '/tools/bin/env'
  # ======================================================================= #
  case which_variant # case tag
  # ======================================================================= #
  # === local_chroot
  # ======================================================================= #
  when :local_chroot,
       :local,'local',':local',
       :depot_chroot,':depot_chroot','depot_chroot',
       :default
    if is_on_roebe?
      # =================================================================== #
      # Also create these entry-points for my home system.
      # =================================================================== #
      make_nodes_and_mount_dev_entries(chroot_target)
    end
    _ = <<-EOF

chroot "#{chroot_target}" #{use_this_path_for_env} -i HOME=/root TERM="$TERM" PS1='$(pwd)' PATH=/usr/bin:/bin:/sbin:/usr/sbin:/tools/bin #{path_to_bash} --login +h

EOF
  # ======================================================================= #
  # === toolchain
  # ======================================================================= #
  when :toolchain,'toolchain',':toolchain'
    chroot_target = '/home/Programs/Toolchain/'
    use_this_path_for_env = '/bin/env'
    path_to_bash          = '/bin/bash'
    _ = <<-EOF

chroot "#{chroot_target}" #{use_this_path_for_env} -i HOME=/root TERM="$TERM" PS1='$(pwd)' PATH=/usr/bin:/bin:/sbin:/usr/sbin:/tools/bin #{path_to_bash} --login +h

EOF
  # ======================================================================= #
  # === enterchroot --usb1
  # ======================================================================= #
  when /^-?-?usb1$/i
    _ = <<-EOF

chroot "#{ENV['MOUNT_USB1']}" #{use_this_path_for_env} -i HOME=/root TERM="$TERM" PS1='$(pwd)' PATH=/usr/bin:/bin:/sbin:/usr/sbin:/tools/bin #{path_to_bash} --login +h

EOF
  # ======================================================================= #
  # === :lfs_first_stage
  # ======================================================================= #
  when :lfs_first_stage
    _ = <<-EOF

chroot "$LFS" /tools/bin/env -i HOME=/root TERM="$TERM" PS1='$(pwd)' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin /tools/bin/bash --login +h

EOF
  end
  if _
    _ = _.dup if _.frozen?
    _.strip!
    cmd = _.strip.delete("\n").strip
    # ===================================================================== #
    # Next we will enter the chroot-target, but before we do so, we check
    # if we are on roebe, and if /AUTOGENERATED/ exists. If it does
    # not exist, but a directory called /AUTOGENERATED/ does exist
    # on the home system, then this will be copied first. That way I
    # can re-use my aliases quickly on the chroot-target.
    # ===================================================================== #
    target_for_autogenerated = "#{chroot_target}AUTOGENERATED/"
    if is_on_roebe? and
       File.directory?('/AUTOGENERATED/') and
      !File.directory?(target_for_autogenerated)
      e
      e "#{rev}No directory exists at #{sdir(target_for_autogenerated)}."
      e "Generating it, then copying the content from #{sdir('/AUTOGENERATED/')}"
      e 'as this is useful for my home system(s).'
      e
      mkdir(target_for_autogenerated)
      copy_files(
        from: '/AUTOGENERATED/',
        to:   "#{chroot_target}AUTOGENERATED/"
      )
    end
    e
    e "#{rev}Next entering the chroot target at #{steelblue(chroot_target)}."
    e
    esystem cmd
    e
  else
    e 'Something went wrong. The command would have been:'
    e
    e sfancy("  #{_}")
    e
  end
end

.env?Boolean

#

Roebe.env?

#

Returns:

  • (Boolean)


20
21
22
# File 'lib/roebe/toplevel_methods/env.rb', line 20

def self.env?
  @env
end

.eparse(i) ⇒ Object

#

Roebe.eparse

#


117
118
119
# File 'lib/roebe/commandline/help.rb', line 117

def self.eparse(i)
  ::Colours.eparse(i)
end

.error_line?Boolean

#

Roebe.error_line?

#

Returns:

  • (Boolean)


130
131
132
# File 'lib/roebe/constants/misc.rb', line 130

def self.error_line?
  '2>&1'
end

.esystem(i) ⇒ Object

#

Roebe.esystem

This method will simply combine e (aka puts) with a call to system().

That way we can run a verbose system command on the target computer.

#


17
18
19
20
# File 'lib/roebe/toplevel_methods/esystem.rb', line 17

def self.esystem(i)
  e i
  system i
end

.expand_this_array(array) ⇒ Object

#

Roebe.expand_this_array

#


10
11
12
13
14
15
16
# File 'lib/roebe/math/binning.rb', line 10

def self.expand_this_array(array)
  array.map {|inner_entry| # ["A", "QR"]
    inner_entry.map {|most_inner_entry|
      [most_inner_entry.size, most_inner_entry]
    }
  }
end

.extract_gem_file(this_gem_file) ⇒ Object

#

Roebe.extract_gem_file

The first path should be the location to a ruby .gem file. This is a mandatory argument, so it must always be supplied.

#


175
176
177
# File 'lib/roebe/classes/extract_gem_file.rb', line 175

def self.extract_gem_file(this_gem_file)
  Roebe::ExtractGemFile.new(this_gem_file)
end

.extract_this_file(i, to = Dir.pwd) ⇒ Object

#

Roebe.extract_this_file

#


44
45
46
47
48
49
50
51
# File 'lib/roebe/toplevel_methods/extract.rb', line 44

def self.extract_this_file(i, to = Dir.pwd)
  begin
    require 'extracter'
  rescue LoadError; end
  Extracter.extract_what_to(
    File.basename(i), to
  )
end

.extract_what_to(what, to = return_pwd, optional_use_this_colour = nil) ⇒ Object

#

Roebe.extract_what_to

This method will perform the actual extract-action on an archive. Since as of June 2012 we will use class Extracter for this task.

#


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/roebe/toplevel_methods/extract.rb', line 20

def self.extract_what_to(
    what,
    to                       = return_pwd,
    optional_use_this_colour = nil # <- Use this to control the colour.
  )
  begin
    require 'extracter'
  rescue LoadError; end
  begin
    require 'extracter/extracter.rb'
  rescue LoadError; end
  e "Now extracting #{sfile(what.to_s)}."
  _ = ::Extracter.new(what, to, :dont_run_yet) # Pass control of this to class Extracter here.
  # _.extract_to = to
  if optional_use_this_colour
    _.set_colour_for_directories(optional_use_this_colour)
  end
  _.run
  return _.extracted_to?
end

.face_with_tears_of_joyObject

#

Roebe.face_with_tears_of_joy

puts Colours.crimson(Roebe.face_with_tears_of_joy)

#


143
144
145
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 143

def self.face_with_tears_of_joy
  EmojiParadise.send(__method__)
end

.face_without_mouthObject

#

Roebe.face_without_mouth

An emoji.

Usage example:

puts Colours.gold(Roebe.face_without_mouth*40)
#


595
596
597
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 595

def self.face_without_mouth
  EmojiParadise.send(__method__)
end

.fast_fibonacci(i) ⇒ Object

#

Roebe.fast_fibonacci

This implementation is significantly faster than the traditional fibonacci. It is also aliased via Roebe.fibonacci().

You can visit the following homepage for an explanation of how this aogirthm works:

https://www.nayuki.io/page/fast-fibonacci-algorithms
#


77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/roebe/toplevel_methods/fibonacci.rb', line 77

def self.fast_fibonacci(i)
  if i.is_a? Array
    # ===================================================================== #
    # We only work with the first element of an Array in this case.
    # ===================================================================== #
    i = i.first
  end
  i = i.to_i if i.is_a? String
  if i <= 0
    e 'Please provide a number larger than 0.'
  else
    fast_fibonacci_implementation(i)[0]
  end
end

.fast_fibonacci_implementation(i) ⇒ Object

#

Roebe.fast_fibonacci_implementation

This is the “internal” implementation.

An Array will be returned.

#


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/roebe/toplevel_methods/fibonacci.rb', line 16

def self.fast_fibonacci_implementation(i)
  i = i.to_i # We need a Number.
  if i == 0
    [0, 1]
  else
    a, b = fast_fibonacci_implementation(i / 2)
    c = a * (b * 2 - a)
    d = a * a + b * b
    if i % 2 == 0
      [c, d]
    else
      [d, c + d]
    end
  end
end

.feedback_base_dirObject

#

Roebe.feedback_base_dir

This method will feedback some generic-template that can be used to create some ruby file.

#


93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 93

def self.feedback_base_dir
  unless Object.const_defined? :XorgBuffer
    require 'xorg_buffer/module'
  end
  project_name = File.basename(Dir.pwd)
  if project_name.include? '-'
    project_name = project_name.split('-').first
  end
  result = ''
  result << "  BASE_DIR = File.absolute_path(File.dirname(__FILE__)+'/..')+'/'"+N
  result << "  YAML_DIRECTORY = YAML_DIR = BASE_DIR+'yaml/'"+N
  result << '    or'+N
  result << '  PROJECT_BASE_DIRECTORY = Pathname(__FILE__).dirname.realpath.to_s'+N
  result << '    or'+N
  result << "  File.expand_path('..', __FILE__) # In the project base directory."+N
  result << '    or'+N
  result << "  PROJECT_BASE_DIRECTORY = RbConfig::CONFIG['sitelibdir']+'/name_of_project/'"+N
  result << '    or'+N
  result << ''+N
  module_string = ''
  module_string << 'module '+project_name.to_camelcase+
                   " # require '"+project_name.downcase+"/project.rb'"+N
  module_string << ''+N
  module_string << '  # '+add_comment(73)+' #'+N
  module_string << '  # === PROJECT_BASE_DIRECTORY'+N
  module_string << '  # '+add_comment(73)+' #'+N
  module_string << "  PROJECT_BASE_DIRECTORY = RbConfig::CONFIG['sitelibdir']+'/"+project_name+"/'"+N
  module_string << ''+N
  module_string << '  # '+add_comment(73)+' #'+N
  module_string << '  # === '+project_name.to_camelcase+'.project_base_dir?'+N
  module_string << '  # '+add_comment(73)+' #'+N
  module_string << '  def self.project_base_dir?'+N
  module_string << '    PROJECT_BASE_DIRECTORY'+N
  module_string << '  end'+N
  module_string << ''+N
  module_string << 'end'+N
  module_string << '  # Store the above into a file called '+sfancy('project_base_directory.rb')+N
  XorgBuffer.set_buffer(module_string)
  result << module_string
  e result
end

.file_binary_to_hexadecimalObject

#

Roebe.file_binary_to_hexadecimal

#


148
149
150
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 148

def self.file_binary_to_hexadecimal
  "#{project_yaml_directory?}binary_to_hexadecimal/binary_to_hexadecimal.csv"
end

.file_binäre_einheitenObject

#

Roebe.file_binäre_einheiten

#


155
156
157
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 155

def self.file_binäre_einheiten
  "#{project_yaml_directory?}binäre_einheiten/binäre_einheiten.yml"
end

.file_contactsObject

#

Roebe.file_contacts

#


63
64
65
# File 'lib/roebe/constants/roebe.rb', line 63

def self.file_contacts
  FILE_CONTACTS_YAML
end

.file_directory_structureObject

#

Roebe.file_directory_structure

#


122
123
124
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 122

def self.file_directory_structure
  "#{Roebe.project_base_dir?}yaml/directory_structure.yml"
end

.file_does_not_exist(i) ⇒ Object

#

Roebe.file_does_not_exist

Consistently use this method here, or one of the aliases to it, when a file does not exist.

That way, we gain a simple and unified way to report missing files.

#


211
212
213
# File 'lib/roebe/toplevel_methods/files.rb', line 211

def self.file_does_not_exist(i)
  e "#{swarn('No file called')} #{sfile(i)} #{swarn('could be found.')}"
end

.file_holidaysObject

#

Roebe.file_holidays

#


129
130
131
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 129

def self.file_holidays
  "#{Roebe.project_base_dir?}yaml/holidays/holidays.yml"
end

.file_kernelObject

#

Roebe.file_kernel

This method will yield a string (a path) such as:

/usr/lib/ruby/site_ruby/3.0.0/roebe/yaml/kernel/kernel.yml
#


141
142
143
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 141

def self.file_kernel
  "#{project_yaml_directory?}kernel/kernel.yml"
end

.file_networkObject

#

Roebe.file_network

#


100
101
102
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 100

def self.file_network
  "/home/x/data/personal/yaml/network/network.yml"
end

.file_pdf1?Boolean

#

Roebe.file_pdf1?

#

Returns:

  • (Boolean)


60
61
62
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 60

def self.file_pdf1?
  "#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf1.yml"
end

.file_pdf2?Boolean

#

Roebe.file_pdf2?

#

Returns:

  • (Boolean)


67
68
69
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 67

def self.file_pdf2?
  "#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf2.yml"
end

.file_pdf3?Boolean

#

Roebe.file_pdf3?

#

Returns:

  • (Boolean)


74
75
76
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 74

def self.file_pdf3?
  "#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf3.yml"
end

.file_pdf4?Boolean

#

Roebe.file_pdf4?

#

Returns:

  • (Boolean)


81
82
83
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 81

def self.file_pdf4?
  "#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf4.yml"
end

.file_pdf5?Boolean

#

Roebe.file_pdf5?

#

Returns:

  • (Boolean)


88
89
90
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 88

def self.file_pdf5?
  "#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf5.yml"
end

.file_pdf6?Boolean

#

Roebe.file_pdf6?

#

Returns:

  • (Boolean)


95
96
97
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 95

def self.file_pdf6?
  "#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf6.yml"
end

.file_pdf7?Boolean

#

Roebe.file_pdf7?

#

Returns:

  • (Boolean)


102
103
104
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 102

def self.file_pdf7?
  "#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf7.yml"
end

.file_pdf8?Boolean

#

Roebe.file_pdf8?

#

Returns:

  • (Boolean)


109
110
111
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 109

def self.file_pdf8?
  "#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf8.yml"
end

.file_pdf9?Boolean

#

Roebe.file_pdf9?

#

Returns:

  • (Boolean)


116
117
118
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 116

def self.file_pdf9?
  "#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf9.yml"
end

.file_roeberia_settingsObject

#

Roebe.file_roeberia_settings

#


70
71
72
# File 'lib/roebe/constants/roebe.rb', line 70

def self.file_roeberia_settings
  "#{ROEBE_PERSONAL_DIRECTORY}yaml/roeberia_settings.yml"
end

.file_these_pdf_files_were_openedObject

#

Roebe.file_these_pdf_files_were_opened

#


107
108
109
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 107

def self.file_these_pdf_files_were_opened
  "#{log_directory?}these_pdf_files_were_opened.yml"
end

.find_duplicate_entries_in_alias_file(i) ⇒ Object

#

Roebe.find_duplicate_entries_in_alias_file

#


183
184
185
# File 'lib/roebe/classes/find_duplicate_entries_in_alias_file.rb', line 183

def self.find_duplicate_entries_in_alias_file(i)
  ::Roebe::FindDuplicateEntriesInAliasFile.new(i)
end

.find_expanded_alias(i = ARGV) ⇒ Object

#

Roebe.find_expanded_alias

The first argument should be the alias that we are searching for.

#


251
252
253
# File 'lib/roebe/classes/find_expanded_alias.rb', line 251

def self.find_expanded_alias(i = ARGV)
  Roebe::FindExpandedAlias.new(i, :be_quiet).points_at?
end

.firefox(this_remote_url = ARGV) ⇒ Object

#

Roebe.firefox

#


39
40
41
# File 'lib/roebe/browser/firefox.rb', line 39

def self.firefox(this_remote_url = ARGV)
  Roebe::Firefox.new(this_remote_url)
end

.fix_iptables6Object

#

Roebe.fix_iptables6

#


336
337
338
339
340
341
342
343
344
# File 'lib/roebe/toplevel_methods/misc.rb', line 336

def self.fix_iptables6
  esystem 'ip6tables --policy INPUT   ACCEPT;'
  esystem 'ip6tables --policy OUTPUT  ACCEPT;'
  esystem 'ip6tables --policy FORWARD ACCEPT;'
  # start fresh
  esystem 'ip6tables -Z; # zero counters'
  esystem 'ip6tables -F; # flush (delete) rules'
  esystem 'ip6tables -X; # delete all extra chains'
end

.foto_searcher(i = ARGV) ⇒ Object

#

Roebe.foto_searcher

#


343
344
345
# File 'lib/roebe/classes/foto_searcher.rb', line 343

def self.foto_searcher(i = ARGV)
  Roebe::FotoSearcher.new(i)
end

.fragments(i = nil) ⇒ Object

#

Roebe.fragments

#


133
134
135
# File 'lib/roebe/classes/fragment_maker.rb', line 133

def self.fragments(i = nil)
  Roebe::FragmentMaker.new(i)
end

.full_blockObject

#

Roebe.full_block

#


97
98
99
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 97

def self.full_block
  EmojiParadise.full_block
end

.geas_itObject

#

Roebe.geas_it

#


347
348
349
350
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 347

def self.geas_it
  require 'lpc'
  Lpc::Geas::Forum.run_in_loop
end

.geas_it2Object

#

Roebe.geas_it2

#


315
316
317
318
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 315

def self.geas_it2
  require '/home/x/data/rpg/MUDS/GEAS/geas_forum.rb'
  Lpc::GeasForum.run_in_loop :background
end

.gem_install(use_this_command_to_install_the_gem = ::Roebe.gem_install_command, also_output_the_cmd = true) ⇒ Object

#

Roebe.gem_install

Use this method if you wish to install a ruby .gem archive.

#


327
328
329
330
331
332
333
334
335
336
337
# File 'lib/roebe/classes/update.rb', line 327

def self.gem_install(
    use_this_command_to_install_the_gem = ::Roebe.gem_install_command,
    also_output_the_cmd                 = true
  )
  if Dir['*.gem'].size > 0
    cmd = use_this_command_to_install_the_gem+' *.gem'
    cmd.squeeze!(' ')
    puts cmd if also_output_the_cmd
    system cmd
  end
end

.gem_install_commandObject

#

Roebe.gem_install_command

#


294
295
296
# File 'lib/roebe/classes/update.rb', line 294

def self.gem_install_command
  @gem_install_command
end

.generate_aliases(i = :for_windows) ⇒ Object

#

Roebe.generate_aliases

Usage example:

Roebe.generate_aliases(:linux)
#


184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# File 'lib/roebe/toplevel_methods/misc.rb', line 184

def self.generate_aliases(
    i = :for_windows
  )
  case i
  # ======================================================================= #
  # === :for_windows
  #
  # This is currently assumed to mean that the user wants to
  # autogenerate a doskey-file. It is also the default
  # action.
  # ======================================================================= #
  when :for_windows,
       :windows,
       :default
    require 'roebe/classes/doskey_generator.rb'
    Roebe::DoskeyGenerator.new
  # ======================================================================= #
  # === :for_linux
  #
  # This will simply use Rcfiles.
  # ======================================================================= #
  when :for_linux,
       :linux
    require 'rcfiles'
    Rcfiles.run
  end
end

.generate_aliases_for_windowsObject

#

Roebe.generate_aliases_for_windows

#


215
216
217
# File 'lib/roebe/toplevel_methods/misc.rb', line 215

def self.generate_aliases_for_windows
  ::Roebe.generate_aliases(:for_windows)
end

.generate_alsa_conf(i = ARGV) ⇒ Object

#

Roebe.generate_alsa_conf

#


125
126
127
# File 'lib/roebe/classes/generate_alsa_conf.rb', line 125

def self.generate_alsa_conf(i = ARGV)
  Roebe::GenerateAlsaConf.new(i)
end

.generate_fluxbox_apps_file(&block) ⇒ Object

#

Roebe.generate_fluxbox_apps_file

#


147
148
149
# File 'lib/roebe/classes/fluxbox/generate_fluxbox_apps_file.rb', line 147

def self.generate_fluxbox_apps_file(&block)
  Roebe::GenerateFluxboxAppsFile.new(&block)
end

.generate_fluxbox_keys_and_apps_fileObject

#

Roebe.generate_fluxbox_keys_and_apps_file

#


740
741
742
743
# File 'lib/roebe/commandline/menu.rb', line 740

def self.generate_fluxbox_keys_and_apps_file
  generate_fluxbox_keys_file
  generate_fluxbox_apps_file
end

.generate_fluxbox_keys_fileObject

#

Roebe.generate_fluxbox_keys_file

#


102
103
104
# File 'lib/roebe/classes/fluxbox/generate_fluxbox_keys_file.rb', line 102

def self.generate_fluxbox_keys_file
  Roebe::GenerateFluxboxKeysFile.new
end

.generate_ginger_the_cat_html_page(from_this_page = 'http://localhost/programming/ruby/src/roebe/lib/roebe/www/ginger_der_bandit/ginger_der_bandit.cgi') ⇒ Object

#

Roebe.generate_ginger_the_cat_html_page

This method will create a local webpage for “Ginger the cat”.

Usage example:

Roebe.generate_ginger_the_cat_html_page
#


747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
# File 'lib/roebe/toplevel_methods/misc.rb', line 747

def self.generate_ginger_the_cat_html_page(
    from_this_page =
      'http://localhost/programming/ruby/src/roebe/lib/roebe/www/ginger_der_bandit/ginger_der_bandit.cgi'
  )
  require 'open-uri'
  what = URI.open(from_this_page).read
  into = 'ginger_the_cat.html'
  e ::Colours.rev+'Storing into the file `'+sfile(into)+'`.'
  write_what_into(what, into)
  if is_on_roebe? and File.exist?(into)
    begin
      require 'open'
      Open.in_browser(into)
    rescue LoadError; end
  end
end

.generate_html_table_for_individuelles_curriculumObject

#

Roebe.generate_html_table_for_individuelles_curriculum

“Generate” the HTML Table for the “individuelles Curriculum”.

#


212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 212

def self.generate_html_table_for_individuelles_curriculum
  _file_with_thelectures = '/DATEI_MIT_DEN_EINZELNEN_LEHRVERANSTALTUNGEN.md'
  dataset = File.read(_file_with_thelectures)
  splitted = dataset.split("---\n")
  _ = ''
  splitted.each_with_index {|inner_dataset, index|
    index += 8
    _inner_split = inner_dataset.split("\n")
    _lv_name   = inner_split[0]
    _lva_typ   = inner_split[1]
    _n_ects    = inner_split[2]
    _n_semesterwochenstunden = inner_split[3]
    _university = inner_split[4]
    _ << '<tr>'+N
    _ << '<td class="bold">'+index.to_s+'</td>'+N
    _ << '<td>'+lv_nummer.to_s+'</td>'+N
    _ << '<td>'+N
    _ << '<a href="https://online.boku.ac.at/BOKUonline/wblv.wbShowLvDetail?pStpSpNr=274548">'+N
  }
end

.generate_konsole_css_file(save_into_this_file = 'konsole.css', use_this_colour = :skyblue) ⇒ Object

#

Roebe.generate_konsole_css_file

The second argument specifies which colour is to be used for the active tab.

To invoke this method from the commandline, do:

roebe --generate-konsole-css-file

Then you can load this into KDE konsole. Go to:

Settings -> Configure Konsole -> TabBar
Specify the path to this css file, then activate the checkbox
and click on "Apply".

Most html-colours appear to work - at the least skyblue and others.

#


32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/roebe/toplevel_methods/generate_konsole_css_file.rb', line 32

def self.generate_konsole_css_file(
    save_into_this_file = 'konsole.css',
    use_this_colour     = :skyblue
  )
  into = save_into_this_file
  # ======================================================================= #
  # === QTabBar property
  # ======================================================================= #
  what = "
QTabBar::tab {

font-size: 12px;

/* Minimum width for every tab */
min-width: 62px;

}

QTabBar::tab:selected {

background: #{use_this_colour.to_s};

color: black;

/* If bold font is useful, then uncomment the next line */
/* font: bold; */

/* Show a cute little bottom-border onto the selected tab */
/* border-top:    1px solid orchid; */
/* border-bottom: 1px solid orchid; */

}"
  e "#{rev}Now storing into the file `#{sfile(into)}`."
  write_what_into(what, into)
  # ======================================================================= #
  # The next line is a hack - only for my home case. It has been disabled
  # on 03.06.2019; I will probably not re-enable it, but I will keep it
  # for now - let's see.
  # ======================================================================= #
  if is_on_roebe? and Dir.pwd.include?('root') and
     false
    write_what_into(what, 'konsole2.css')
    e "#{rev}Now storing into the file `#{sfile('konsole2.css')}#{rev}`."
  end
end

.generate_lighttpd_configurationObject

#

Roebe.generate_lighttpd_configuration

This method can be used to generate the lighttpd-specific configuration file.

#


190
191
192
# File 'lib/roebe/classes/handle_lighttpd.rb', line 190

def self.generate_lighttpd_configuration
  Roebe::HandleLightppd.new.generate_lighttpd_configuration
end

.generate_liloconfigObject

#

Roebe.generate_liloconfig

#


181
182
183
184
# File 'lib/roebe/commandline/misc.rb', line 181

def self.generate_liloconfig
  require 'roebe/classes/lilo_config_generator.rb'
  Roebe::LiloConfigGenerator.new
end

.generate_localesObject

#

RBT.generate_locales

#


84
85
86
# File 'lib/roebe/classes/generate_locales.rb', line 84

def self.generate_locales
  Roebe::GenerateLocales.new
end

.generate_ls_colorsObject

#

Roebe.generate_ls_colors

#


79
80
81
# File 'lib/roebe/classes/generate_ls_colors.rb', line 79

def self.generate_ls_colors
  Roebe::GenerateLsColors.new
end

.generate_nano_configObject

#

Roebe.generate_nano_config

#


163
164
165
# File 'lib/roebe/classes/nano_config.rb', line 163

def self.generate_nano_config
  GenerateNanoConfig.new
end

.generate_protocolsObject

#

Roebe.generate_protocols

#


245
246
247
# File 'lib/roebe/classes/generate_protocols.rb', line 245

def self.generate_protocols
  Roebe::GenerateProtocols.new
end

.generate_the_cfdg_filesObject

#

Roebe.generate_the_cfdg_files

This method will ultimately delegate towards ImageParadise, for the batch-generation of the various .cfdg files.

This also means that the ImageParadise gem has to have been installed onto the target computer system at hand.

#


136
137
138
139
140
141
# File 'lib/roebe/commandline/misc.rb', line 136

def self.generate_the_cfdg_files
  require 'image_paradise'
  Dir['/home/x/DATA/images/cfdg/*.cfdg'].each {|this_cfdg_file|
    ImageParadise::ConfreeGenerator.new(this_cfdg_file) { :do_not_open_via_the_browser }
  }
end

.generate_the_file_alsa_confObject

#

Roebe.generate_the_file_alsa_conf

This method will ultimately yield the file “alsa.conf”, which can usually be found at /etc/alsa.conf.

#


225
226
227
228
229
230
231
232
# File 'lib/roebe/toplevel_methods/misc.rb', line 225

def self.generate_the_file_alsa_conf
  require 'roebe/classes/generate_alsa_conf.rb'
  result = Roebe.generate_alsa_conf.into?
  if is_on_roebe?
    e 'Moving this file to '+sdir('/etc/')+' next.'
    move_file(result, '/etc/'+File.basename(result))
  end
end

.generate_xauthority_file(i = ARGV) ⇒ Object

#

Roebe.generate_xauthority_file

#


111
112
113
# File 'lib/roebe/classes/generate_xauthority_file.rb', line 111

def self.generate_xauthority_file(i = ARGV)
  Roebe::GenerateXauthorityFile.new(i)
end

.generate_xorg_conf(i = ARGV) ⇒ Object

#

Roebe.generate_xorg_conf

#


748
749
750
# File 'lib/roebe/classes/generate_xorg_conf/generate_xorg_conf.rb', line 748

def self.generate_xorg_conf(i = ARGV)
  Roebe::GenerateXorgConf.new(i)
end

.get_file_content(i) ⇒ Object

#

Roebe.get_file_content

This method gets the content of a file.

#


24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/roebe/toplevel_methods/files.rb', line 24

def self.get_file_content(i)
  if i.is_a? Array
    i.each {|entry| get_file_content(entry) }
  else
    if i.is_a? Symbol # Assume that we want to use BeautifulUrl here.
      i = sanitize_url(i).to_s
    end
    if i.to_s.include? '$'
      i = convert_global_env(i)
    end
    # ===================================================================== #
    # Sanitize the input, by eliminating all "localhost" strings.
    # ===================================================================== #
    if env?['MY_DATA'] && i.is_a?(String)
      i = replace_localhost_with_data(i)
    end
    # ===================================================================== #
    # Handle special files via a menu next.
    # ===================================================================== #
    case i # Sanitize this.
    # ===================================================================== #
    # === FSTAB
    # ===================================================================== #
    when 'FSTAB'
      i = '/etc/fstab' # Hardcoded pah here.
    end unless File.exist? i
    # ===================================================================== #
    # Handle the case when the input is a directory.
    # ===================================================================== #
    if File.directory? i
      e 'Can not read a directory.'
      e "#{swarn('Sorry, ')}#{col(i)}"\
        "#{swarn(' is a directory. Can not read its content.')}"
      return nil
    else
      # =================================================================== #
      # We must first check whether the file exists or whether it does not.
      # =================================================================== #
      if File.exist? i
        file_content = readlines(i)
        # ================================================================= #
        # Enable padding via @padding.
        # ================================================================= #
        file_content.map! {|content|
          "#{padding?}#{content}"
        } if file_content # This check to prevent nil-action related errors.
        return file_content
      else
        no_file_could_be_found_at(i)
        return nil
      end
    end
  end
end

.get_instance_variables(from_this_object = self) ⇒ Object

#

Roebe.get_instance_variables

Obtain all instance variables via this method. Consistently use this method when wishing to request all instance variables.

This method will return an Array.

#


20
21
22
23
24
# File 'lib/roebe/toplevel_methods/variables.rb', line 20

def self.get_instance_variables(
    from_this_object = self
  )
  return from_this_object.instance_variables
end

.git_coloursObject

#

Roebe.git_colours

#


307
308
309
310
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 307

def self.git_colours
  _ = "git config --global alias.lg \"log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit\""
  esystem _
end

.gold(i = '', use_colours = @use_colours) ⇒ Object

#

Roebe.gold

#


272
273
274
275
276
277
278
# File 'lib/roebe/colours/colours.rb', line 272

def self.gold(
    i           = '',
    use_colours = @use_colours
  )
  return COLOURS.gold(i) if use_colours
  return i
end

.google_for(i = ARGV) ⇒ Object

#

Roebe.google_for

#


59
60
61
# File 'lib/roebe/classes/do_a_google_search.rb', line 59

def self.google_for(i = ARGV)
  Roebe::DoAGoogleSearch.new(i)
end

.google_url_cleaner(this_url) ⇒ Object

#

Roebe.google_url_cleaner

Usage example:

puts Roebe.google_url_cleaner("https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CDIQFjAA&url=http%3A%2F%2Fwww.fda.gov%2Fohrms%2Fdockets%2Fac%2F05%2Fslides%2F2005-4144s1_05_Mendelson-HF-NHD%2520Pane.ppt&ei=NOFBUYKHBM-64APKnYGQAw&usg=AFQjCNGka328-0Jym7wOYtJ8pdgGJjLv6Q&sig2=Iq2vS_O3AfCioprk-j_q2w")
#


139
140
141
# File 'lib/roebe/classes/google_url_cleaner.rb', line 139

def self.google_url_cleaner(this_url)
  Roebe::GoogleUrlCleaner.new(this_url) { :be_silent }.result?
end

.grab_colourObject

#

Roebe.grab_colour

Grab a colour by using grabc.

You can invoke this method via ‘grabc’.

#


21
22
23
24
25
26
27
28
29
# File 'lib/roebe/toplevel_methods/grab_colour.rb', line 21

def self.grab_colour
  sleep 1.5 # a small delay
  _ = "#{@env['MY_CPP']}/src/grabc/grabc"
  if File.exist? _
    esystem _
  else
    ewarn "#{_} does not exist."
  end
end

.gzip_this_file(i = ARGV) ⇒ Object

#

Roebe.gzip_this_file

#


78
79
80
# File 'lib/roebe/classes/gzip_this_file.rb', line 78

def self.gzip_this_file(i = ARGV)
  Roebe::GzipThisFile.new(i)
end

.halloween(available_where = ENV['CARTOONS']) ⇒ Object

#

Roebe.halloween

#


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/roebe/toplevel_methods/halloween.rb', line 15

def self.halloween(
    available_where = ENV['CARTOONS']
  )
  require 'multimedia_paradise'
  if available_where.frozen?
    available_where = available_where.dup
  end
  unless available_where.end_with? '/'
    available_where << '/'
  end
  require 'mountpoints'

  mplayer_command = 'mplayer'
  # mplayer_command = 'mpv -vo x11 --video-unscaled'
  mplayer_command = 'mplayer -vo x11 -zoom'

  if available_where
  else # Default here.
    mountpoints = Mountpoints[] # Scan our mountpoints.
    usb_entry = mountpoints.first # We will use the first entry.
    # available_where = ENV[usb_entry]
    available_where = usb_entry.to_s+'Videos/Cartoons/'
  end
  e "Checking through the directory `#{sdir(available_where)}`."
  _ARRAY_HORROR_SIMPSONS = [
    'Simpsons-16/Simpsons_16x01_Treehouse_of_Horror_XV.mp4',
    'Simpsons-03/S03x07.mp4',
    'Simpsons-04/Treehouse_of_Horror_III.mp4',
    'Simpsons-05/Treehouse_of_Horror_IV.mp4',
    'Simpsons-06/Treehouse_of_Horror_V.mp4',
    'Simpsons-07/S07x06.mp4',
    'Simpsons-08/Treehouse_of_Horror_VII.m4v',
    'Simpsons-09/Treehouse_Of_Horror_VIII.m4v',
    'Simpsons-11/VTS_01_1.VOB',
    'Simpsons-12/Simpsons_12x01_Tree_House_of_Horror_XI.avi',
    'Simpsons-13/Simpsons_13x01_Treehouse_of_Horror_XII.mp4',
    'Simpsons-14/The_Simpsons_[14x01]_Treehouse_of_Horror_XIII.avi',
    'Simpsons-19/simpsons_19x05treehouseofhorrorxviii.avi',
    'Simpsons-20/S20E04_Treehouse_of_Horror_XIX.avi' 
  ] #.shuffle
  n_files_do_not_exist = 0
  shuffled = _ARRAY_HORROR_SIMPSONS.map {|entry| entry.gsub(/ /,"\ ") }

  shuffled.each { |f|
    # ===================================================================== #
    # We need to obtain the designated path next:
    # ===================================================================== #
    _ = available_where+f
    if File.exist? _
      puts '='*80
      puts Colours.sfile(_)
      puts '='*80
      system mplayer_command+' "'+_+'"'
    else
      n_files_do_not_exist += 1
      e 'Can not play file '+sfile(_)+' as it does not exist.'
    end
  }
  if n_files_do_not_exist == shuffled.size
    _ = '/home/x/video/'
    if Dir.exist? _
      e 'We will try to play from '+sdir(_)+' then.'
      play_simpsons(_+'Cartoons/')
    end
    exit
  end  
end

.has_german_umlaut?(i) ⇒ Boolean

#

Roebe.has_german_umlaut?

Whether the input-String has a german umlaut or not.

Invocation example:

Roebe.has_german_umlaut? 'abcödef' # => true
Roebe.has_german_umlaut? 'abcdef'  # => false
#

Returns:

  • (Boolean)


659
660
661
# File 'lib/roebe/toplevel_methods/misc.rb', line 659

def self.has_german_umlaut?(i)
  !!(i =~ /[öäüÖÄÜß]/)
end

.has_openssl_support?Boolean

#

Roebe.has_openssl_support?

#

Returns:

  • (Boolean)


186
187
188
189
190
191
192
193
194
# File 'lib/roebe/classes/test_openssl.rb', line 186

def self.has_openssl_support?
  begin
    require 'openssl'
    e 'We just required openssl - it works! \o/'
  rescue LoadError
    e "Nope, sorry - openssl is not available in this ruby "\
      "version (#{RUBY_VERSION})."
  end
end

.hash_birthday_notifications(i = ARGV) ⇒ Object

#

Roebe.hash_birthday_notifications

#


276
277
278
279
280
281
282
283
284
# File 'lib/roebe/classes/birthday_notifications.rb', line 276

def self.hash_birthday_notifications(i = ARGV)
  _ = Roebe::BirthdayNotifications.new(i) {{
    n_days_in_advance: 300,
    be_quiet: true
  }}
  _.run
  _.append_the_current_year_to_the_main_hash
  _.hash_birthday_candidates?
end

.heart_spacer(n_times = 40) ⇒ Object

#

Roebe.heart_spacer

This makes a “heart spacer” line, that is, a line with the unicode heart symbol, separated by ‘ ’.

The method supports colours. Example:

Roebe.heart_spacer { :lightgreen }
#


246
247
248
249
250
251
252
253
254
255
256
257
258
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 246

def self.heart_spacer(
    n_times = 40
  )
  result = ("#{return_unicode_heart} " * n_times).strip
  if block_given?
    yielded = yield
    if use_colours? and yielded.is_a?(Symbol) and
       Colours.is_a_html_colour?(yielded)
      result = Colours.send(yielded, result)
    end
  end
  result
end

.hello_world(pad_the_string = true) ⇒ Object

#

Roebe.hello_world

#


16
17
18
19
20
21
22
# File 'lib/roebe/toplevel_methods/hello_world.rb', line 16

def self.hello_world(pad_the_string = true)
  i = 'Hello world!'
  if pad_the_string
    i = "\n   #{i}   \n"
  end
  e steelblue(i)
end

.heredocs?Boolean

#

Roebe.heredocs? (eof tag)

This makes an EOF, which may be convenient for you to then copy-paste.

#

Returns:

  • (Boolean)


16
17
18
19
20
21
22
23
24
25
26
# File 'lib/roebe/toplevel_methods/heredocs.rb', line 16

def self.heredocs?
  e 'result = <<-EOF'
  e
  e '  This is a heredoc.'
  e
  e '  It provides a nice syntax'
  e '  for multiline strings'
  e
  e 'EOF'
  e 'return result'
end

.hexdigest(i) ⇒ Object

#

Roebe.hexdigest

This method requires an input-argument.

#


317
318
319
320
321
322
323
# File 'lib/roebe/toplevel_methods/misc.rb', line 317

def self.hexdigest(i)
  result = ''.dup
  i.each_byte {|entry|
    result << sprintf('%02x', entry)
  }
  return result
end

.hh_mm_ss(i = ::Time.now) ⇒ Object

#

Roebe.hh_mm_ss

This will display the current time in hours:minutes:seconds.

There is also an alias for this, called ss_mm_hh, but that variant is wrong as name. Still, since my brain isn’t the best, I will retain that “wrong” alias as well.

#


79
80
81
82
83
84
85
86
87
88
89
# File 'lib/roebe/toplevel_methods/time.rb', line 79

def self.hh_mm_ss(
    i = ::Time.now
  )
  if i.is_a? ::Time
    return "#{i.hour.to_s.rjust(2,'0')}:"\
           "#{i.min.to_s.rjust(2,'0')}:"\
           "#{i.sec.to_s.rjust(2, '0')}"
  else
    e 'Debugging: '+i.class.to_s
  end
end

.holidayObject

#

Roebe.holiday

#


91
92
93
# File 'lib/roebe/classes/holiday.rb', line 91

def self.holiday
  Roebe::Holiday.new
end

.horizontal_double_barObject

#

Roebe.horizontal_double_bar

#


36
37
38
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 36

def self.horizontal_double_bar
  EmojiParadise.horizontal_double_bar
end

.host_os?Boolean

#

Roebe.host_os?

Return the host-operating system via this method.

#

Returns:

  • (Boolean)


733
734
735
# File 'lib/roebe/toplevel_methods/misc.rb', line 733

def self.host_os?
  ::RbConfig::CONFIG['host_os']
end

.hot_beverageObject

#

Roebe.hot_beverage

#


171
172
173
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 171

def self.hot_beverage
  EmojiParadise.send(__method__)
end

.hypotenuse(a = 3, b = 5) ⇒ Object

#

Roebe.hypotenuse

Note that this method will return a Float, so you may have to convert this to an Integer (or just round it), if this is needed.

Usage example:

Roebe.hypotenuse(945, 891)
#


690
691
692
693
694
695
696
697
698
699
700
# File 'lib/roebe/toplevel_methods/misc.rb', line 690

def self.hypotenuse(
    a = 3, b = 5
  )
  if a and a.is_a?(String) and File.file?(a)
    _ = File.read(a).strip
    splitted = _.split(' ')
    a = splitted.first
    b = splitted.last
  end
  (a.to_f ** 2) + (b.to_f ** 2)
end

.identical(string1, string2) ⇒ Object

#

Roebe.identical

#


164
165
166
# File 'lib/roebe/classes/identical.rb', line 164

def self.identical(string1, string2)
  Roebe::Identical.new(string1, string2)
end

.important_pdf_files?Boolean

#

Roebe.important_pdf_files?

#

Returns:

  • (Boolean)


24
25
26
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 24

def self.important_pdf_files?
  @important_pdf_files
end

.increase_volume(of_this_file = ARGV) ⇒ Object

#

Roebe.increase_volume

#


12
13
14
15
16
17
# File 'lib/roebe/toplevel_methods/increase_volume.rb', line 12

def self.increase_volume(
    of_this_file = ARGV
  )
  require 'multimedia_paradise'
  MultimediaParadise.increase_volume(of_this_file)
end

.infinityObject

#

Roebe.infinity

#


574
575
576
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 574

def self.infinity # ∞
  EmojiParadise.send(__method__)
end

.install_all_registered_fontsObject

#

Roebe.install_all_registered_fonts

Available fonts are:

- hack, cascadia, jet-brains-mono.
#


529
530
531
532
533
534
535
536
# File 'lib/roebe/toplevel_methods/misc.rb', line 529

def self.install_all_registered_fonts
  require 'roebe/toplevel_methods/install_the_cascadia_font.rb'
  install_the_cascadia_font
  require 'roebe/toplevel_methods/install_the_hack_font.rb'
  install_the_hack_font
  require 'roebe/toplevel_methods/install_the_jet_brains_mono_font.rb'
  install_the_jet_brains_mono_font
end

.install_and_update_rcfilesObject

#

Roebe.install_and_update_rcfiles

Invoke this via:

install_and_update_rcfiles
#


19
20
21
22
23
24
# File 'lib/roebe/toplevel_methods/install_and_update_rcfiles.rb', line 19

def self.install_and_update_rcfiles
  cd '$RSRC/rcfiles/'
  r2
  require 'rcfiles' unless Object.const_defined? :Rcfiles
  Rcfiles[]
end

.install_go(url = 'https://dl.google.com/go/go1.12.linux-amd64.tar.gz') ⇒ Object

#

Roebe.install_go

This method can be used to “install” go - at the least download it.

#


639
640
641
642
643
644
645
646
# File 'lib/roebe/toplevel_methods/misc.rb', line 639

def self.install_go(
    url = 'https://dl.google.com/go/go1.12.linux-amd64.tar.gz'
  ) 
  e 'Next downloading Go from '+url
  wget(url)
  e 'Next trying to extract it:'
  extract_this_file(url)
end

.install_in_ruby_gem_manner(optional_copy_the_gem_to_this_location = nil) ⇒ Object

#

Roebe.install_in_ruby_gem_manner

This is similar to the r2 alias.

#


344
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/roebe/classes/update.rb', line 344

def self.install_in_ruby_gem_manner(
    optional_copy_the_gem_to_this_location = nil
  )
  make_gem
  gem_install
  if optional_copy_the_gem_to_this_location and
    !optional_copy_the_gem_to_this_location.is_a?(Symbol)
    this_gem = Dir['*.gem'].first
    copy(this_gem, optional_copy_the_gem_to_this_location)
  end
  remove_old_gem
end

.install_in_ruby_setup_manner(use_this_binary = 'ruby') ⇒ Object

#

Roebe.install_in_ruby_setup_manner

This is similar to the r2 alias.

#


362
363
364
365
366
367
368
369
370
# File 'lib/roebe/classes/update.rb', line 362

def self.install_in_ruby_setup_manner(use_this_binary = 'ruby')
  cpruby
  system use_this_binary+' setup.rb config'
  system use_this_binary+' setup.rb setup'
  system use_this_binary+' setup.rb install'
  remove_file 'setup.rb'
  remove_file 'InstalledFiles'
  remove_file '.config'
end

.install_linux_kernel_api_headers(target = '/home/x/SRC/linux/linux-5.1.7.tar.xz') ⇒ Object

#

Roebe.install_linux_kernel_api_headers

This method can be used to install the linux kernel API headers.

It presently uses a hardcoded path by default. Otherwise, pass in the path to the linux tarball release (local path).

#


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/roebe/toplevel_methods/install_linux_kernel_api_headers.rb', line 21

def self.install_linux_kernel_api_headers(
    target = '/home/x/SRC/linux/linux-5.1.7.tar.xz'
  )
  e
  e 'Now installing the Linux Kernel API Headers:'
  e
  to = '/Depot/Temp/'
  require 'extracter'
  Extracter.what_to(target, to)
  cd to+File.basename(target).sub(/\.tar\.xz$/,'')
  # ======================================================================= #
  # Run mrproper next:
  # ======================================================================= #
  esystem 'make mrproper'
  esystem 'make INSTALL_HDR_PATH=dest headers_install'
  if false
    # ===================================================================== #
    # The next step is optional - will have to revisit what this is
    # doing.
    # ===================================================================== #
    esystem 'find dest/include \( -name .install -o -name ..install.cmd \) -delete'
    esystem 'cp -rv dest/include/* /usr/include'
  end
end

.install_my_gemsObject

#

Roebe.install_my_gems

Easier convenience method to batch-install all my gems.

#


92
93
94
# File 'lib/roebe/classes/install_my_gems.rb', line 92

def self.install_my_gems
  ::Roebe::InstallMyGems.new
end

.install_nss(use_this_version = '3.44') ⇒ Object

#

Roebe.install_nss

This install-script can be used to install NSS. It may be moved into RBT at some later point - not sure yet.

Direct path on my home system:

/home/x/DATA/PROGRAMMING_LANGUAGES/RUBY/src/roebe/lib/roebe/toplevel_methods/install_nss.rb
#


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/roebe/toplevel_methods/install_nss.rb', line 23

def self.install_nss(
    use_this_version = '3.44'
  )
  cd 'nss'
  esystem '

    make -j1 BUILD_OPT=1                 
    NSPR_INCLUDE_DIR=/usr/include/nspr  
    USE_SYSTEM_ZLIB=1                   
    ZLIB_LIBS=-lz                       
    NSS_ENABLE_WERROR=0                 
    $([ $(uname -m) = x86_64 ] && echo USE_64=1) \
    $([ -f /usr/include/sqlite3.h ] && echo NSS_USE_SYSTEM_SQLITE=1)

  '.delete("\n").squeeze(' ')
  cd '../dist'
  esystem 'install -v -m755 Linux*/lib/*.so              /Programs/Nss/'+use_this_version+'/lib'
  esystem 'install -v -m644 Linux*/lib/{*.chk,libcrmf.a} /Programs/Nss/'+use_this_version+'/lib'
  esystem 'install -v -m755 -d                           /Programs/Nss/'+use_this_version+'/include/nss'
  esystem 'cp -v -RL {public,private}/nss/*              /Programs/Nss/'+use_this_version+'/include/nss'
  esystem 'chmod -v 644                                  /Programs/Nss/'+use_this_version+'/include/nss/*'
  esystem 'install -v -m755 Linux*/bin/{certutil,nss-config,pk12util} /Programs/Nss/'+use_this_version+'/bin'
  esystem 'install -v -m644 Linux*/lib/pkgconfig/nss.pc  /Programs/Nss/'+use_this_version+'/pkgconfig'
end

.install_openssl_certifications(i = ARGV) ⇒ Object

#

Roebe.install_openssl_certifications

#


230
231
232
# File 'lib/roebe/classes/install_openssl_certificates.rb', line 230

def self.install_openssl_certifications(i = ARGV)
  Roebe::InstallOpensslCertificates.new(i)
end

.install_roebe_addonsObject

#

Roebe.install_roebe_addons

This method here will install some of my addons, from a remote website.

This helps me setup a “workstation” on a linux environment that happens to have ruby. It MUST also work when openssl is not available - using “gem install name” is not an option because this depends on openssl itself.

We will use a very naive approach here - we will simply install from shevegen.square7.ch, where the respective gems are assumed to reside. For this to work, the remote URLs obviously must have the specific gem.

We could just use the main array right? Hmm. Anything against this?

#


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/roebe/toplevel_methods/install_roebe_addons.rb', line 30

def self.install_roebe_addons
  begin
    require 'ftp_paradise' unless Object.const_defined? :FtpParadise
  rescue LoadError; end
  remote_base_url = 'http://shevegen.square7.ch/rubygems/' # This is the base directory.
  self::ARRAY_INSTALL_THESE_GEM_PROJECTS.each {|program|
    remote_url_of_the_program = remote_base_url+program+'/'
    remote_url_of_the_program_time_sorted = remote_url_of_the_program+'?C=M;O=D' 
    remote_url = remote_url_of_the_program+program+'-0.0.0.gem'
    # ===================================================================== #
    # The above is hardcoded. Now we will try to not have hardcoded
    # entries, but instead scan for a file-listing. This can be done
    # via open-uri.
    # ===================================================================== #
    dataset = open(remote_url_of_the_program_time_sorted).read
    # ===================================================================== #
    # Next, look or entries such as:
    #
    #   '<a href="add_inline_css-0.0.3.gem">add_inline_css-0.0.3.gem</a>'
    #
    # ===================================================================== #
    use_this_regex = /<a href="(.+).gem">/
    scanned_results = dataset.scan(use_this_regex).flatten
    first_result = scanned_results.first
    remote_url = remote_url_of_the_program+first_result+'.gem'
    e 'Now installing `'+simp(program)+'` from this remote '\
      'url: `'+simp(remote_url)+'`.'
    wget(remote_url) # Wget the gem.
    this_cmd = 'gem install ./'+first_result+'.gem'
    e this_cmd
    system this_cmd
  }
end

.install_ruby_project(i) ⇒ Object

#

Roebe.install_ruby_project

#


172
173
174
# File 'lib/roebe/classes/install_ruby_project.rb', line 172

def self.install_ruby_project(i)
  ::Roebe::InstallRubyProject.new(i)
end

.install_rustObject

#

Roebe.install_rust

#


13
14
15
16
17
18
19
20
# File 'lib/roebe/toplevel_methods/install_rust.rb', line 13

def self.install_rust
  _ = 'curl https://sh.rustup.rs --insecure -sSf | sh'
  e 'Installing rust next:'
  e
  e "  #{_}"
  e
  system _
end

.install_the_cascadia_font(target = LINUX_DIRECTORY_FOR_TTF_FONTS, url = url_to_the_cascadia_font? ) ⇒ Object

#

Roebe.install_the_cascadia_font

#


39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/roebe/toplevel_methods/install_the_cascadia_font.rb', line 39

def self.install_the_cascadia_font(
    target = LINUX_DIRECTORY_FOR_TTF_FONTS, # ← This defaults to '/usr/share/fonts/TTF/'.
    url    = url_to_the_cascadia_font?
  )
  if is_on_roebe?
    cd target
    e 'Downloading into the directory '+target+' next.'
  end
  url_to_the_cascadia_font?.each {|remote_url|
    e "Downloading from #{sfile(remote_url)} next:"
    wget(remote_url)
  }
  e 'Updating the local fonts listing next ...'
  esystem 'fc-cache -f -v'
end

.install_the_hack_font(target = :home_directory, url = url_to_the_hack_font?(:zip_file)) ⇒ Object

#

Roebe.install_the_hack_font

#


38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/roebe/toplevel_methods/install_the_hack_font.rb', line 38

def self.install_the_hack_font(
    target = :home_directory,
    url    = url_to_the_hack_font?(:zip_file)
  )
  case target
  when :linux, :default
    target = LINUX_DIRECTORY_FOR_TTF_FONTS
  # ======================================================================= #
  # This entry point essentially refers to ~/.fonts.
  # ======================================================================= #
  when :home, :home_directory
    target = rds("#{ENV['HOME']}/.fonts")
  end
  e "Downloading from #{sfile(url)} next:"
  wget(url)
  extract_this_file(url)
  Dir['ttf/*'].each {|this_file|
    e "Now copying `#{sfile(this_file)}` to #{target}."
    mkdir(target) unless File.directory? target
    copy_file(this_file, target)
  }
  esystem 'fc-cache -f -v'
  if is_on_roebe? and File.directory? 'ttf'
    remove_directory 'ttf'
  end
end

.install_the_jet_brains_mono_font(target = LINUX_DIRECTORY_FOR_TTF_FONTS, url = url_to_the_jet_brains_font?(:zip_file)) ⇒ Object

#

Roebe.install_the_jet_brains_mono_font

#


33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/roebe/toplevel_methods/install_the_jet_brains_mono_font.rb', line 33

def self.install_the_jet_brains_mono_font(
    target = LINUX_DIRECTORY_FOR_TTF_FONTS,
    url    = url_to_the_jet_brains_font?(:zip_file)
  )
  e "Downloading from #{sfile(url)} next:"
  wget(url)
  extract_this_file(url)
  Dir['*.ttf'].each {|this_file|
    e "Now copying `#{sfile(this_file)}` to #{target}."
    mkdir(target) unless File.directory? target
    copy_file(this_file, target)
  }
  esystem 'fc-cache -f -v'
  if is_on_roebe? and File.directory? 'ttf'
    remove_directory 'ttf'
  end
end

.install_this_font(i = :default, font_directory = LINUX_DIRECTORY_FOR_TTF_FONTS) ⇒ Object

#

Roebe.install_this_font

This method can be used to install a font on Linux.

#


35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/roebe/toplevel_methods/install_this_font.rb', line 35

def self.install_this_font(
    i              = :default,
    font_directory = LINUX_DIRECTORY_FOR_TTF_FONTS
  )
  if i.is_a? Array
    i = i.first
  end
  # ======================================================================= #
  # First, handle symbols.
  # ======================================================================= #
  case i.to_sym # case tag
  # ======================================================================= #
  # === :envy
  # ======================================================================= #
  when :envy, # Install the envy-font.
       :default
    i = return_url_to_the_envy_font
  # ======================================================================= #
  # === :blackchancery
  # ======================================================================= #
  when :blackchancery
    i = return_url_to_the_blackchancery_font
  end
  unless File.exist? File.basename(i)
    e "Downloading from #{sfile(i)} next:"
    wget(i)
  end
  extract_this_file(File.basename(i))
  files = Dir.glob('**/**.ttf', File::FNM_CASEFOLD)
  files.each {|this_file|
    e "Now copying `#{sfile(this_file)}` to #{font_directory}."
    mkdir(font_directory) unless File.directory? font_directory
    copy_file(this_file, font_directory)
  }
  esystem 'fc-cache -f -v'
  if is_on_roebe? and File.directory? 'ttf'
    remove_directory 'ttf'
  end
end

.install_this_locale(i) ⇒ Object

#

Roebe.install_this_locale

#


14
15
16
17
18
19
20
21
22
23
24
# File 'lib/roebe/toplevel_methods/install_this_locale.rb', line 14

def self.install_this_locale(i)
  if i.is_a? Array
    i.each {|entry|
      install_this_locale(entry)
    }
  else
    esystem 'locale-gen '+i
    esystem 'dpkg-reconfigure locales'
    esystem 'update-locale'
  end
end

.install_usb_ids(use_this_remote_url = 'http://www.linux-usb.org/usb.ids') ⇒ Object

#

Roebe.install_usb_ids

This method will download the usb.ids file, and optionally move it to the proper location if we are on a Roebe-system.

See here for more documentation:

http://www.linuxfromscratch.org/blfs/view/cvs/general/usbutils.html

To invoke this from the commandline:

roebe --install-usb-ids
#


158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/roebe/commandline/misc.rb', line 158

def self.install_usb_ids(
    use_this_remote_url = 'http://www.linux-usb.org/usb.ids'
  )
  target_dir = '/usr/share/hwdata/'
  e
  esystem "wget #{use_this_remote_url}"
  e
  if File.exist? File.basename(use_this_remote_url)
    e 'This could be moved into the directory `'+target_dir+'`.'
    if is_on_roebe?
      e 'In fact, we will do so anyway next.'
      mv(File.basename(use_this_remote_url), target_dir)
      if File.exist?(target_dir+File.basename(use_this_remote_url)) and
        !File.exist?(File.basename(use_this_remote_url))
        e 'Success!'
      end
    end
  end
end

.install_vivaldiObject

#

Roebe.install_vivaldi

This method shall attempt to install vivaldi on my home system.

The method is currently (January 2020) incomplete, though.

#


16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/roebe/toplevel_methods/install_vivaldi.rb', line 16

def self.install_vivaldi
  target_dir = '/home/x/src/vivaldi/'
  first = Dir[target_dir+'*'].first
  if File.exist? first
    require 'rbt'
    require 'program_information'
    e 'Installing '+sfancy(first)+' next.'
    RBT.rcp(File.basename(first))
    program_version = ProgramInformation.return_version(first)
    RBT.copy_file(first, RBT.programs_dir?+'Vivaldi/'+program_version)
  end
end

.instance_variable_get(i) ⇒ Object

#

Roebe.instance_variable_get

This just simplifies getting an instance variable.

#


14
15
16
# File 'lib/roebe/toplevel_methods/instance_variable_get.rb', line 14

def self.instance_variable_get(i)
  ::Roebe.instance_variable_get(i.delete('@'))
end

.interactive_file_creatorObject

#

Roebe.interactive_file_creator

#


223
224
225
# File 'lib/roebe/classes/interactive_file_creator.rb', line 223

def self.interactive_file_creator
  ::Roebe::InteractiveFileCreator.new
end

.invoke_xorg_bufferObject

#

self.invoke_xorg_buffer

This method will invoke whatever we have in the xorg-buffer at that time.

#


80
81
82
# File 'lib/roebe/classes/ipaste.rb', line 80

def self.invoke_xorg_buffer
  Roebe::IPaste.new
end

.is_a_html_colour?(i) ⇒ Boolean

#

Roebe.is_a_html_colour?

#

Returns:

  • (Boolean)


244
245
246
# File 'lib/roebe/colours/colours.rb', line 244

def self.is_a_html_colour?(i)
  COLOURS.is_a_html_colour?(i.delete('-'))
end

.is_audio_file?(i) ⇒ Boolean

#

Roebe.is_audio_file?

Simplified assumption as to whether the given input-file (first argument to this method) is an audio file or whether it is not.

Usage examples:

Roebe.is_audio_file?("/home/x/video/Realvids/223_Conan_the_Barbarian.avi")
Roebe.is_audio_file?("/home/x/songs/YoungMC_BustAMove.mp3")
#

Returns:

  • (Boolean)


23
24
25
26
27
28
29
# File 'lib/roebe/toplevel_methods/multimedia.rb', line 23

def self.is_audio_file?(i)
  if i.is_a? Array
    i = i.join(' ' ).strip
  end
  file_type = File.extname(i).delete('.')
  %w( ogg mp3 flac ).include?(file_type) ? true : false
end

.is_image_file?(i) ⇒ Boolean

#

Roebe.is_image_file?

Returns true if this is a valid image, otherwise false.

The constant VALID_IMAGES is defined in the file constants/constants.rb.

#

Returns:

  • (Boolean)


19
20
21
22
23
24
25
26
# File 'lib/roebe/toplevel_methods/images.rb', line 19

def self.is_image_file?(i)
  _ = false
  extension_name = File.extname(i).delete('.').downcase
  _ = true if ::Roebe::VALID_IMAGES.map {|entry|
    entry.delete('.').downcase
  }.include? extension_name
  _
end

.is_not_on_roebeObject

#

Roebe.is_not_on_roebe

#


37
38
39
# File 'lib/roebe/toplevel_methods/is_on_roebe.rb', line 37

def self.is_not_on_roebe
  @is_on_roebe = false
end

.is_on_roebeObject

#

Roebe.is_on_roebe

Setter method to enable @is_on_roebe.

#


30
31
32
# File 'lib/roebe/toplevel_methods/is_on_roebe.rb', line 30

def self.is_on_roebe
  @is_on_roebe = true
end

.is_on_roebe?Boolean

#

Roebe.is_on_roebe?

Query method over the @is_on_roebe variable.

This method can be used to determine whether I am on my own system or whether I am not.

#

Returns:

  • (Boolean)


49
50
51
# File 'lib/roebe/toplevel_methods/is_on_roebe.rb', line 49

def self.is_on_roebe?
  @is_on_roebe
end

.is_on_windows?Boolean

#

Roebe.is_on_windows?

#

Returns:

  • (Boolean)


12
13
14
15
16
17
18
19
20
# File 'lib/roebe/toplevel_methods/windows.rb', line 12

def self.is_on_windows?
  case RUBY_PLATFORM
  when /win/,
       /mingw/
    true
  else
    false
  end
end

.is_prime?(i) ⇒ Boolean

#

Roebe.is_prime?

#

Returns:

  • (Boolean)


12
13
14
15
16
# File 'lib/roebe/toplevel_methods/prime_numbers.rb', line 12

def self.is_prime?(i)
  i = i.join(' ').strip.to_i if i.is_a? Array
  return false if i < 2
  (2 .. i/2).none? {|entry| i % entry == 0}
end

.is_this_port_open?(port = 4568, outfile = '/dev/null') ⇒ Boolean

#

Roebe.is_this_port_open?

This method makes use of “lsof”.

Note that this only works on Linux, not on Windows.

#

Returns:

  • (Boolean)


17
18
19
20
21
22
23
24
25
26
# File 'lib/roebe/toplevel_methods/open_ports.rb', line 17

def self.is_this_port_open?(
    port    = 4568,
    outfile = '/dev/null'
  )
  result = false
  if File.exist? outfile
    result = !system("lsof -i:#{port}", out: outfile)
  end
  return result
end

.is_video_file?(i) ⇒ Boolean

#

Roebe.is_video_file?

Simplified assumption as to whether the given input-file (first argument to this method) is a video file or whether it is not.

Usage example:

Roebe.is_video_file?("Realvids/276_DragonsForever.avi")
#

Returns:

  • (Boolean)


42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/roebe/toplevel_methods/multimedia.rb', line 42

def self.is_video_file?(i)
  if i.is_a? Array
    i = i.join(' ' ).strip
  end
  return %w(
    ogm
    avi
    mpg
    wmv
    mp4
    vob
    flv
    mov
    mkv
  ).any? {|f| i.downcase.include? f }
end

.java_header(output_result = true) ⇒ Object

#

Roebe.java_header

This method will display a common shebang-header for Java.

This can also be invoked via:

Roebe.java_header
result = Roebe.java_header(false)
#


104
105
106
# File 'lib/roebe/classes/java_header.rb', line 104

def self.java_header(output_result = true)
  Roebe::JavaHeader.new
end

.jp2a(use_this_image = random_image) ⇒ Object

#

Roebe.jp2a

shows a jp2a image using jp2a. (ASCII TAG, ry jp2a

How to use this method:

Roebe.jp2a
Roebe.jp2a image_location
Roebe.jp2a ENV['IMG'].to_s+'/PC/LINUX/RAPTENIX/APTENIX_HANDWRITING_LOGO.png'
Roebe.jp2a '/ACK.png'
#

Or easier:

rdraw ascii
#


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/roebe/toplevel_methods/jp2a.rb', line 28

def self.jp2a(
    use_this_image = random_image
  )
  if use_this_image.is_a? Array
    use_this_image.each {|entry| jp2a(entry) }
  else
    my_image = use_this_image
    the_cmd = "convert #{my_image} jpg:- | jp2a -"
    e the_cmd
    system the_cmd
    e 'The image above was: '
    e
    e "  #{my_image}"
    e
  end
end

.kde_konsole_command(i = 'ls') ⇒ Object

#

Roebe.kde_konsole_command

This method will send a command to a KDE konsole tab.

#


86
87
88
# File 'lib/roebe/classes/kde/kde_konsole_send_command.rb', line 86

def self.kde_konsole_command(i = 'ls')
  KdeKonsoleSendCommand.new(i)
end

.keywords?Boolean

#

Roebe.keywords?

Method to return all keyword that ruby has.

#

Returns:

  • (Boolean)


32
33
34
# File 'lib/roebe/toplevel_methods/keywords.rb', line 32

def self.keywords?
  ARRAY_RUBY_KEYWORDS.sort
end

.kill_dhcpcd(i = ARGV) ⇒ Object

#

Roebe.kill_dhcpcd

#


66
67
68
# File 'lib/roebe/classes/dhcpcd/kill_dhcpcd.rb', line 66

def self.kill_dhcpcd(i = ARGV)
  KillDhcpcd.new(i)
end

.kill_firefoxObject

#

Roebe.kill_firefox

Module-method to kill firefox.

#


118
119
120
# File 'lib/roebe/classes/kill_firefox.rb', line 118

def self.kill_firefox
  ::Roebe::KillFirefox.new
end

.kill_palemoonObject

#

Roebe.kill_palemoon

Toplevel-method to kill palemoon.

#


124
125
126
# File 'lib/roebe/classes/kill_palemoon.rb', line 124

def self.kill_palemoon
  ::Roebe::KillPalemoon.new
end

.left_five_eights_blockObject

#

Roebe.left_five_eights_block

#


118
119
120
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 118

def self.left_five_eights_block
  EmojiParadise.left_five_eights_block
end

.left_half_blockObject

#

Roebe.left_half_block

#


125
126
127
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 125

def self.left_half_block
  EmojiParadise.left_half_block
end

.left_one_eight_blockObject

#

Roebe.left_one_eight_block

#


146
147
148
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 146

def self.left_one_eight_block
  EmojiParadise.left_one_eight_block
end

.left_one_quarter_blockObject

#

Roebe.left_one_quarter_block

#


139
140
141
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 139

def self.left_one_quarter_block
  EmojiParadise.left_one_quarter_block
end

.left_pointing_indexObject

#

Roebe.left_pointing_index

This refers to the following symbol: ☚

#


893
894
895
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 893

def self.left_pointing_index
  EmojiParadise.send(__method__)
end

.left_seven_eights_blockObject

#

Roebe.left_seven_eights_block

#


104
105
106
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 104

def self.left_seven_eights_block
  EmojiParadise.left_seven_eights_block
end

.left_three_eights_blockObject

#

Roebe.left_three_eights_block

#


132
133
134
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 132

def self.left_three_eights_block
  EmojiParadise.left_three_eights_block
end

.left_three_quarters_blockObject

#

Roebe.left_three_quarters_block

#


111
112
113
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 111

def self.left_three_quarters_block
  EmojiParadise.left_three_quarters_block
end

.leftwards_arrowObject

#

Roebe.leftwards_arrow

The symbol will be: ←

See: www.fileformat.info/info/unicode/char/2190/index.htm

Invocation example:

puts Colours.crimson(Roebe.leftwards_arrow)
#


963
964
965
966
967
968
969
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 963

def self.leftwards_arrow
  result = "\u{2190}"
  if is_on_roebe?
    set_xorg_buffer(result.strip)
  end
  result
end

.libui1Object

#

Roebe.libui1

#


5635
5636
5637
5638
# File 'lib/roebe/custom_methods/module.rb', line 5635

def self.libui1
  require 'roebe/gui/libui/shell/shell.rb'
  Roebe::GUI::LibUI::Shell.new
end

.libui2Object

#

Roebe.libui2

#


5643
5644
5645
5646
# File 'lib/roebe/custom_methods/module.rb', line 5643

def self.libui2
  require 'roebe/gui/libui/show_aliases/show_aliases.rb'
  Roebe::GUI::LibUI::ShowAliases.new
end

.libui3Object

#

Roebe.libui3

#


5651
5652
5653
5654
# File 'lib/roebe/custom_methods/module.rb', line 5651

def self.libui3
  require 'roebe/gui/libui/interactive_caesar_cipher/interactive_caesar_cipher.rb'
  Roebe::GUI::LibUI::InteractiveCaesarCipher.new
end

.light_shadeObject

#

Roebe.light_shade

#


160
161
162
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 160

def self.light_shade
  EmojiParadise.light_shade
end

.link?(optional_id = ARGV) ⇒ Boolean

#

Open the link to the Universität Wien Vorlesung/Übung. This is currently going to the old online.univie.ac.at URL.

There also exists a newer entry via ufind.univie.ac.at

An example for the latter can be seen here:

https://ufind.univie.ac.at/de/course.html?lv=813013&semester=2003W

More examples:

http://online.univie.ac.at/vlvz?&lvnr=300332&semester=S2016
https://ufind.univie.ac.at/de/course.html?lv=300332&semester=2016S
#

Returns:

  • (Boolean)


377
378
379
380
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 377

def self.link?(optional_id = ARGV)
  require 'studium/utility_scripts/link.rb'
  Studium::Link.new(optional_id)
end

.load_custom_ruby_files(array = ARRAY_INSTALL_THESE_GEM_PROJECTS) ⇒ Object

#

Roebe.load_custom_ruby_files

#


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/roebe/toplevel_methods/load_custom_ruby_files.rb', line 20

def self.load_custom_ruby_files(
    array = ARRAY_INSTALL_THESE_GEM_PROJECTS
  )
  array.each {|this_project|
    # ===================================================================== #
    # Now require this project.
    # ===================================================================== #
    e 'Now trying to require `'+sfancy(this_project)+'` in a failsafe manner.'
    begin
      require this_project
    rescue Exception => error
      pp error
    end
  }
end

.load_wirbleObject

#

Roebe.load_wirble

Enable wirble colour support for IRB next.

#


168
169
170
171
172
173
174
# File 'lib/roebe/toplevel_methods/misc.rb', line 168

def self.load_wirble
  begin
    require 'wirble'
    Wirble.init
    Wirble.colorize
  rescue LoadError; end
end

.load_yaml(input_file) ⇒ Object

#

Roebe.load_yaml

Symbols will delegate to sanitize_url.rb

#


14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/roebe/toplevel_methods/load_yaml.rb', line 14

def self.load_yaml(input_file)
  if input_file.is_a? Symbol # Symbols are treated specially.
    require 'roebe/requires/failsafe_require_of_beautiful_url.rb'
    _ = BeautifulUrl::BeautifulUrl.new(input_file)
    _.replace_localhost
    input_file = _.url?
  end
  unless File.exist? input_file
    raise "But no file at `#{input_file}` exists."
  end
  return YAML.load_file(input_file.strip)
end

.local_fotos_jsObject

#

Roebe.local_fotos_js

#


5666
5667
5668
# File 'lib/roebe/custom_methods/module.rb', line 5666

def self.local_fotos_js
  Roebe::CustomMethods.create_array_available_local_images
end

.log10(i) ⇒ Object

#

Roebe.log10

#


46
47
48
# File 'lib/roebe/math/log10.rb', line 46

def self.log10(i)
  Roebe::Log10.new(i)
end

.log_directory?Boolean

#

Roebe.log_directory?

This method will return the path to a directory where module Roebe may put log files and similar files into.

#

Returns:

  • (Boolean)


48
49
50
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 48

def self.log_directory?
  LOG_DIRECTORY
end

.low_lineObject

#

Roebe.low_line

#


21
22
23
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 21

def self.low_line
  EmojiParadise.low_line
end

.lower_alphaObject

#

Roebe.lower_alpha

This is α.

#


1076
1077
1078
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1076

def self.lower_alpha
  EmojiParadise.send(__method__)
end

.lower_fiveObject

#

Roebe.lower_five

This is ₅, also known as subscript 5.

#


1085
1086
1087
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1085

def self.lower_five
  EmojiParadise.send(__method__)
end

.lower_five_eighths_blockObject

#

Roebe.lower_five_eighths_block

#


76
77
78
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 76

def self.lower_five_eighths_block
  EmojiParadise.lower_five_eighths_block
end

.lower_half_blockObject

#

Roebe.lower_half_block

#


69
70
71
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 69

def self.lower_half_block
  EmojiParadise.lower_half_block
end

.lower_oneObject

#

Roebe.lower_one

#


1101
1102
1103
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1101

def self.lower_one
  EmojiParadise.send(__method__)
end

.lower_one_eighth_blockObject

#

Roebe.lower_one_eighth_block

#


28
29
30
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 28

def self.lower_one_eighth_block
  EmojiParadise.lower_one_eighth_block
end

.lower_one_quarter_blockObject

#

Roebe.lower_one_quarter_block

#


55
56
57
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 55

def self.lower_one_quarter_block
  EmojiParadise.lower_one_quarter_block
end

.lower_seven_eighths_blockObject

#

Roebe.lower_seven_eighths_block

#


90
91
92
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 90

def self.lower_seven_eighths_block
  EmojiParadise.lower_seven_eighths_block
end

.lower_sixObject

#

Roebe.lower_six

This is ₆, also known as subscript 6.

#


1094
1095
1096
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1094

def self.lower_six
  EmojiParadise.send(__method__)
end

.lower_three_eighths_blockObject

#

Roebe.lower_three_eighths_block

#


62
63
64
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 62

def self.lower_three_eighths_block
  EmojiParadise.lower_three_eighths_block
end

.lower_three_quarters_blockObject

#

Roebe.lower_three_quarters_block

#


83
84
85
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 83

def self.lower_three_quarters_block
  EmojiParadise.lower_three_quarters_block
end

.make_gemObject

#

Roebe.make_gem

#


316
317
318
319
320
# File 'lib/roebe/classes/update.rb', line 316

def self.make_gem
  if Dir['*.gemspec'].size > 0
    system 'gem build *.gemspec'
  end
end

.make_nodes_and_mount_dev_entries(mount_at_this_target) ⇒ Object

#

Roebe.make_nodes_and_mount_dev_entries

This method is to make the chroot more linux-like, as-is.

#


22
23
24
25
26
27
28
29
30
31
32
# File 'lib/roebe/toplevel_methods/chroot.rb', line 22

def self.make_nodes_and_mount_dev_entries(
    mount_at_this_target
  )
  esystem "mknod -m 600 #{mount_at_this_target}/dev/console c 5 1"
  esystem "mknod -m 666 #{mount_at_this_target}/dev/null c 1 3"
  esystem "mount -v --bind /dev #{mount_at_this_target}/dev"
  esystem "mount -vt devpts devpts #{mount_at_this_target}/dev/pts -o gid=5,mode=620"
  esystem "mount -vt proc proc #{mount_at_this_target}/proc"
  esystem "mount -vt sysfs sysfs #{mount_at_this_target}/sys"
  esystem "mount -vt tmpfs tmpfs #{mount_at_this_target}/run"
end

.mama?Boolean

#

Roebe.mama?

#

Returns:

  • (Boolean)


15
16
17
18
19
20
21
22
23
# File 'lib/roebe/toplevel_methods/mama.rb', line 15

def self.mama?
  target_file = '/home/x/data/personal/yaml/roeberia_settings.yml'
  if File.exist? target_file
    return YAML.load_file(target_file)['INGRID_EMAIL']
  else
    e 'No file exists at '+target_file
  end
  return nil
end

.map_input_to_unicode_symbol(i = :snowman) ⇒ Object

#

Roebe.map_input_to_unicode_symbol

Usage examples:

Roebe.map_input_to_unicode_symbol(:checkmark_thin)
Roebe.to_unicode_symbol(:checkmark_thin)
Roebe.to_unicode_symbol(:email)
#


32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/roebe/toplevel_methods/unicode/map_input_to_unicode_symbol.rb', line 32

def self.map_input_to_unicode_symbol(
    i = :snowman
  )
  i = i.first if i.is_a? Array
  i = ":#{i}" if i.is_a? Symbol
  i = i.to_s.dup
  # ======================================================================= #
  # Past this point all entries will be pseudo-symbols.
  # ======================================================================= #
  case i # case tag, unicode tag, utf tag
  # ======================================================================= #
  # === rti :email
  # ======================================================================= #
  when ':email'
    i = ''
  # ======================================================================= #
  # === rti :white_knight
  # ======================================================================= #
  when ':white_knight'
    i = Roebe.white_knight
  # ======================================================================= #
  # === rti :black_knight
  # ======================================================================= #
  when ':black_knight'
    i = Roebe.black_knight
  # ======================================================================= #
  # === rti :checkmark_completed_thin
  # ======================================================================= #
  when ':checkmark_completed_thick',
       ':checkmark_thick',
       ':completed_thick',
       ':thick',
       ':checkmark'
    i = Roebe.thick_checkmark
  # ======================================================================= #
  # === rti :checkmark_completed_thin
  # ======================================================================= #
  when ':checkmark_completed_thin',
       ':checkmark_thin',
       ':completed_thin',
       ':thin'
    i = Roebe.checkmark_completed_thin?
  # ======================================================================= #
  # === rti :snowman
  # ======================================================================= #
  when ':snowman',':unicode_snowman'
    i = Roebe.return_unicode_snowman
  # ======================================================================= #
  # === rti :black_sun_with_rays
  # ======================================================================= #
  when ':black_sun_with_rays'
    i = Roebe.return_unicode_black_sun_with_rays
  # ======================================================================= #
  # === rti :sun
  # ======================================================================= #
  when ':sun'
    i = Roebe.return_unicode_sun
  # ======================================================================= #
  # === rti :white_telephone
  # ======================================================================= #
  when ':white_telephone'
    i = Roebe.return_unicode_white_telephone
  # ======================================================================= #
  # === rti :black_telephone
  # ======================================================================= #
  when ':black_telephone'
    i = Roebe.return_unicode_black_telephone
  # ======================================================================= #
  # === rti :opposition
  # ======================================================================= #
  when ':opposition'
    i = Roebe.return_unicode_opposition
  # ======================================================================= #
  # === rti :conjunction
  # ======================================================================= #
  when ':conjunction'
    i = Roebe.return_unicode_conjunction
  # ======================================================================= #
  # === rti :descending_node
  # ======================================================================= #
  when ':descending_node'
    i = Roebe.return_unicode_descending_node
  # ======================================================================= #
  # === rti :ascending_node
  # ======================================================================= #
  when ':ascending_node'
    i = Roebe.return_unicode_ascending_node
  # ======================================================================= #
  # === rti :thunderstorm
  # ======================================================================= #
  when ':thunderstorm'
    i = Roebe.return_unicode_thunderstorm
  # ======================================================================= #
  # === rti :lightning
  # ======================================================================= #
  when ':lightning'
    i = Roebe.return_unicode_lightning
  # ======================================================================= #
  # === rti :high_voltage_sign
  # ======================================================================= #
  when ':high_voltage_sign'
    i = Roebe.return_unicode_high_voltage_sign
  # ======================================================================= #
  # === rti :tv
  # ======================================================================= #
  when ':tv',':television'
    i = Roebe.return_unicode_television
  # ======================================================================= #
  # === rti :yin_yang
  # ======================================================================= #
  when ':yin_yang',':yang_yin',':ying_yan'
    i = Roebe.return_unicode_yin_yang
  # ======================================================================= #
  # === rti :white_star
  # ======================================================================= #
  when ':white_star'
    i = Roebe.return_unicode_white_star
  # ======================================================================= #
  # === rti :black_star
  # ======================================================================= #
  when ':black_star'
    i = Roebe.return_unicode_black_star
  # ======================================================================= #
  # === rti :comet
  # ======================================================================= #
  when ':comet'
    i = Roebe.return_unicode_comet
  # ======================================================================= #
  # === rti :umbrella
  # ======================================================================= #
  when ':umbrella'
    i = Roebe.return_unicode_umbrella
  # ======================================================================= #
  # === rti :cloud
  # ======================================================================= #
  when ':cloud'
    i = Roebe.return_unicode_cloud
  # ======================================================================= #
  # === rti :keyboard
  # ======================================================================= #
  when ':keyboard'
    i = Roebe.return_unicode_keyboard
  # ======================================================================= #
  # === rti :king
  # ======================================================================= #
  when ':king'
    i = Roebe.return_unicode_king
  # ======================================================================= #
  # === rti :phone
  # ======================================================================= #
  when ':phone'
    i = Roebe.return_unicode_phone
  # ======================================================================= #
  # === rti :dog_face
  # ======================================================================= #
  when ':dog_face'
    i = Roebe.return_unicode_dog_face
  # ======================================================================= #
  # === rti :dog
  # ======================================================================= #
  when ':dog'
    i = Roebe.return_unicode_dog
  # ======================================================================= #
  # === rti :cat_face_with_wry_smile
  # ======================================================================= #
  when ':cat_face_with_wry_smile',':cat_smiling',':smiling_cat'
    i = Roebe.return_cat_face_with_wry_smile
  # ======================================================================= #
  # === rti :poo
  # ======================================================================= #
  when ':poo',':pile_of_poo'
    i = Roebe.return_pile_of_poo
  # ======================================================================= #
  # === rti :cat_face
  # ======================================================================= #
  when ':cat_face'
    i = Roebe.return_unicode_cat_face
  # ======================================================================= #
  # === rti :cat
  # ======================================================================= #
  when ':cat'
    i = Roebe.return_unicode_cat
  else
    # ===================================================================== #
    # First check if the input consists of only numbers or three numbers
    # and then an upcased character.
    # ===================================================================== #
    if (i =~ /^\d+$/) or (i =~ /^\d+[A-Za-z]{1}$/)
#        "\u#{i}".encode('utf-8') # This line fails, unfortunately.
    else
      e "Not found the input `#{i}`."
    end
  end
  return i
end

.median(i) ⇒ Object

#

Roebe.median

This calculates the median of some numbers.

#


721
722
723
724
725
726
# File 'lib/roebe/toplevel_methods/misc.rb', line 721

def self.median(i)
  if i.is_a? Array
    i = i.sort
  end
  return i[(i.size/2)]
end

.medium_black_circleObject

#

Roebe.medium_black_circle

#


555
556
557
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 555

def self.medium_black_circle
  EmojiParadise.send(__method__)
end

.medium_shadeObject

#

Roebe.medium_shade

#


167
168
169
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 167

def self.medium_shade
  EmojiParadise.medium_shade
end

.medium_small_white_circleObject

#

Roebe.medium_small_white_circle

Usage example:

puts Colours.violet(Roebe.medium_small_white_circle)
#


567
568
569
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 567

def self.medium_small_white_circle
  EmojiParadise.send(__method__)
end

.medium_white_circleObject

#

Roebe.medium_white_circle

#


548
549
550
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 548

def self.medium_white_circle
  EmojiParadise.send(__method__)
end

.mediumorchid(i = '') ⇒ Object

#

Roebe.mediumorchid

#


349
350
351
352
# File 'lib/roebe/colours/colours.rb', line 349

def self.mediumorchid(i = '')
  return COLOURS.mediumorchid(i) if @use_colours
  return i
end

.mediumpurple(i = '') ⇒ Object

#

Roebe.mediumpurple

#


341
342
343
344
# File 'lib/roebe/colours/colours.rb', line 341

def self.mediumpurple(i = '')
  return COLOURS.mediumpurple(i) if @use_colours
  return i
end
#

Roebe.menu (menu tag)

#


53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
# File 'lib/roebe/commandline/menu.rb', line 53

def self.menu(i)
  if i.is_a? Array
    i.each {|entry| menu(entry) }
  else
    case i # (case tag)
    # ===================================================================== #
    # === roebe alsa.conf
    #
    # This entry point is used to quickly generate a new alsa.conf
    # file, for Audio on Linux.
    # ===================================================================== #
    when /^-?-?alsa\.?conf$/i,
         /^-?-?alsa$/i,
         /^-?-?audio$/i,
         /^-?-?auconf$/i,
         /^-?-?asound$/i
      generate_the_file_alsa_conf
    # ===================================================================== #
    # === roebe --use-this-pdf-viewer=evince
    # === roebe --pdfviewer=okular
    # === roebe --set-pdf-viewer=okular
    # ===================================================================== #
    when /^-?-?use-?this-?pdf-?viewer=(.+)$/,
         /^-?-?pdfviewer=(.+)$/,
         /^-?-?set-?pdf-?viewer=(.+)$/
      update_the_main_pdf_viewer_file_with_this_program($1)
    # ===================================================================== #
    # === roebe --use-firefox
    #
    # This entry point can be used to designate firefox as the main
    # browser in use.
    # ===================================================================== #
    when /^-?-?use(-|_)?firefox$/i
      require 'open'
      ::Open.permanently_use_this_browser(:firfox)
    # ===================================================================== #
    # === roebe --graalvm1
    # ===================================================================== #
    when /^-?-?graalvm(\d+)$/i
      cd log_dir? # Enter a safe directory first.
      index = ($1.to_i - 1)
      # =================================================================== #
      # Always keep the entries listed alphabetically.
      # =================================================================== #
      target_dir = "#{project_base_dir?}java_roebe/"
      array_all_java_files = Dir[target_dir+'*.java'].sort
      if array_all_java_files.empty?
        e "#{rev}No java files could be found at `#{sdir(target_dir)}`."
      else
        if index > array_all_java_files.size
          index = array_all_java_files.size - 1
        end
        work_on_this_file = array_all_java_files[index]
        do_compile_this_java_file_statically(work_on_this_file)
      end
    # ===================================================================== #
    # === roebe --caesar-gtk4
    # ===================================================================== #
    when /^-?-?caesar(-|_)?gtk4$/i,
         /^-?-?cipher(-|_)?gtk4$/i,
         /^-?-?gtk4(-|_)?cipher$/i # === roebe gtk4-cipher
      require 'roebe/gui/gtk4/interactive_caesar_cipher/interactive_caesar_cipher.rb'
      Roebe::GUI::Gtk::InteractiveCaesarCipher.run
    # ===================================================================== #
    # === roebe --caesar-gtk3
    # ===================================================================== #
    when /^-?-?caesar(-|_)?gtk3?$/i,
         /^-?-?cipher(-|_)?gtk3?$/i
      # The old variant was as follows:
      #   require 'roebe/gui/unified_widgets/interactive_caesar_cipher/interactive_caesar_cipher.rb'
      #   Roebe::GUI::InteractiveCaesarCipher.new('gtk3')
      require 'roebe/gui/gtk3/interactive_caesar_cipher/interactive_caesar_cipher.rb'
      Roebe::GUI::Gtk::InteractiveCaesarCipher.run
    # ===================================================================== #
    # === roebe --autostart?
    # ===================================================================== #
    when /^-?-?autostart\??$/i
      e "#{rev}The default auto-start directory for this user is at:"
      e
      e sfancy("  #{Dir.home}/.config/autostart/")
      e
    # ===================================================================== #
    # === roebe --libui-shell
    # ===================================================================== #
    when /^-?-?libui(_|-| )?shell$/i,
         /^-?-?shell(_|-| )?libui$/i,
         /^-?-?libui1$/i # roebe --libui1
      Roebe.start_the_libui_shell
    # ===================================================================== #
    # === roebe --caesar-libui
    # ===================================================================== #
    when /^-?-?caesar(-|_)?libui$/i,
         /^-?-?caesar$/i,
         /^-?-?cipher$/i, # === roebe --cipher
         /^-?-?cypher$/i, # === roebe --cypher
         /^-?-?libui2$/i
      # require 'roebe/gui/unified_widgets/interactive_caesar_cipher/interactive_caesar_cipher.rb'
      # Roebe::GUI::InteractiveCaesarCipher.new('libui')
      require 'roebe/gui/libui/interactive_caesar_cipher/interactive_caesar_cipher.rb'
      Roebe::GUI::LibUI::InteractiveCaesarCipher.new
    # ===================================================================== #
    # === roebe --ms-controller
    # ===================================================================== #
    when /^-?-?ms(_|-| )?controller$/i,
         /^-?-?controller$/i,
         /^-?-?ingrid$/i,
         /^-?-?libui$/i,
         /^-?-?libui3$/i
      require 'roebe/gui/libui/microsoft_controller/microsoft_controller.rb'
      Roebe::GUI::LibUI::MicrosoftController.new
    # ===================================================================== #
    # === roebe --jcipher
    # ===================================================================== #
    when /^-?-?jcipher$/,
         /^-?-?jruby1$/
      require 'roebe/gui/jruby/interactive_caesar_cipher/interactive_caesar_cipher.rb'
      Roebe::GUI::Jruby::InteractiveCaesarCipher.new
    # ===================================================================== #
    # === roebe --set-firefox-location=/Programs/Firefox/firefox-52/firefox
    #
    # Some aliases exist to this, such as:
    #
    #   roebe --set-browser=firefox
    #   roebe --set-browser=palemoon
    #   roebe --set-browser-location=palemoon
    #
    # ===================================================================== #
    when /^-?-?set(-|_| )?firefox(-|_| )?location=(.+)/,
         /^-?-?set(-|_| )?browser(-|_| )?location=(.+)/,
         /^-?-?firefox(_|-| )?location=(.+)/,
         /^-?-?use(-|_| )?browser=(.+)/i,
         /^-?-?set(-|_| )?browser=(.+)/i
      require 'roebe/browser/firefox.rb'
      store_here = $2.to_s.dup
      store_here = $3.to_s.dup if $3
      Roebe.store_new_location_to_the_browser_binary(store_here)
    # ===================================================================== #
    # === roebe --njoy
    # ===================================================================== #
    when /^-?-?njoy$/i
      require 'cyberweb/utility_scripts/images_to_html/images_to_html.rb'
      Cyberweb::ImagesToHtml.new(:njoy)
    # ===================================================================== #
    # === roebe --allgraal
    #
    # This entry-point can be used to batch-compile all .java files that
    # are part of the roebe gem. This is somewhat experimental as of
    # February 2022.
    # ===================================================================== #
    when /^-?-?all(_|-| )?graal$/i
      array_all_java_files = Dir[project_base_dir?+'java/*.java'].sort
      e
      e 'Next batch-compiling all .java files in the java/ subdirectory'
      e 'of this gem.'
      e
      e 'This will take a while, though ... please be patient.'
      do_compile_this_java_file_statically(array_all_java_files)
      e 'All done batch-compiling all .java files in this gem! \o/'
      e
    # ===================================================================== #
    # === roebe --purge=""
    #
    # This defaults to the ruby-gtk3 bindings. They will be "purged",
    # aka re-installed cleanly.
    # ===================================================================== #
    when /^-?-?purge=(.+)$/i,   # roebe --purge=""
         /^-?-?pristine=(.+)$/i # roebe --pristine=""
      require 'roebe/classes/pristine_gems.rb'
      ::Roebe::PristineGems.new($1.to_s.dup)
    # ===================================================================== #
    # === roebe --install-addons
    # ===================================================================== #
    when /-?-?install(_|-| )?addons/
      require 'roebe/toplevel_methods/install_roebe_addons.rb'
      install_roebe_addons
    # ===================================================================== #
    # === roebe --bootstrap-bluefish
    #
    # Copy my configuration for the bluefish-editor.
    # ===================================================================== #
    when /^-?-?bootstrap(-|_| )?bluefish$/,
         /^-?-?copy(-|_| )?bluefish$/, # === roebe --copy-bluefish
         /^-?-?copy(-|_| )?bluefish(-|_| )?configuration(-|_| )?files$/,
         /^-?-?bluefish$/
      e 'Now copying the bluefish / greenfish configuration files.'
      Roebe.copy_bluefish_configuration_files
    # ===================================================================== #
    # === roebe --generate-konsole-css
    # ===================================================================== #
    when /^-?-?generate(-|_)?konsole(-|_)?css$/i,
         /^-?-?generate(-|_)?konsole(-|_)?css(-|_)?file$/i,
         /^-?-?konsole(-|_|.)?css$/i,
         /^-?-?konsole$/i,
         /^-?-?generate(-|_|.)?css$/i,
         /^-?-?css$/i
      require 'roebe/toplevel_methods/generate_konsole_css_file.rb'
      Roebe.generate_konsole_css_file
    # ===================================================================== #
    # === roebe --sinatra
    #
    # This entry point allows us to start the sinatra-interface for
    # the roebe project.
    # ===================================================================== #
    when /^-?-?sinatra$/i,
         /^-?-?sinatra(-|_)?documentation$/i,
         /^-?-?serve(-|_)?documentation$/i,
         /^-?-?documentation$/i
      if is_on_roebe?
        rename_kde_konsole('sinatra-documentation')
      end
      require 'roebe/documentation/app.rb'
      Roebe.start_sinatra
    # ===================================================================== #
    # === roebe --check-for-duplicates
    # ===================================================================== #
    when /^-?-?check(-|_)?for(-|_)?duplicates$/i,
         /^-?-?duplicates$/i
      require 'roebe/classes/find_duplicate_entries_in_alias_file.rb'
      Roebe::FindDuplicateEntriesInAliasFile.new(ARGV)
    # ===================================================================== #
    # === roebe --gtk-shell
    #
    # This defaults to the ruby-gtk3 bindings.
    # ===================================================================== #
    when /^-?-?gtk(-|_| )?shell$/i,
         /^-?-?shell$/i # roebe --shell
      require 'roebe/gui/gtk3/shell/shell.rb'
      ::Roebe::GUI::Gtk::Shell.run
    # ===================================================================== #
    # === roebe --wlan-interface-gtk3
    # ===================================================================== #
    when /^--wlan(-|_| )?interface(-|_| )?gtk3$/i
      require 'roebe/gui/gtk3/wlan_interface/wlan_interface.rb'
      ::Roebe::GUI::Gtk::WlanInterface.run
    # ===================================================================== #
    # === roebe --compare-strings=string1,string2
    # ===================================================================== #
    when /^-?-?compare(-|_| )?strings=(.+),(.+)/i
      require 'roebe/classes/identical.rb'
      e Roebe::Identical.new($2.to_s.dup, $3.to_s.dup) { :be_quiet }.result?.to_s
    # ===================================================================== #
    # === roebe --ssl
    # ===================================================================== #
    when /^-?-?ssl$/
      require 'roebe/classes/install_openssl_certificates.rb'
      install_openssl_certifications
    # ===================================================================== #
    # === roebe --webrick
    # ===================================================================== #
    when /^-?-?webrick$/,
         /^-?-?start(-|_)?webrick$/,
         /^-?-?www$/
      require 'roebe/toplevel_methods/webrick.rb'
      start_webrick
    # ===================================================================== #
    # === roebe --random-songs
    #
    # This entry point exists mostly so that we can use mpv to
    # loop over my songs directory. This ad-hoc change allows
    # us to make use of audio on windows via mpv in a convenient
    # manner.
    # ===================================================================== #
    when /^-?-?random(-|_)?songs$/,
         /^-?-?random$/,
         /^-?-?songs$/,
         /^-?-?audio$/
      play_random_songs
    # ===================================================================== #
    # === roebe --zip=/home/x/songs/
    # ===================================================================== #
    when /^-?-?zip=(.+)$/ # === $1
      require 'roebe/toplevel_methods/rubyzip.rb'
      ::Roebe.zip_on_windows($1.to_s.dup)
    # ===================================================================== #
    # === roebe --capitals
    # ===================================================================== #
    when /^-?-?capitals$/i
      require 'roebe/gui/gtk/world_capitals/run.rb'
      ::Roebe::WorldCapitals.run
    # ===================================================================== #
    # === roebe --user-install
    # ===================================================================== #
    when /^-?-?user(-|_)?install$/
      user_install_all_registered_gems
    # ===================================================================== #
    # === roebe --cfdg
    # ===================================================================== #
    when /^-?-?cfdg$/
      generate_the_cfdg_files
    # ===================================================================== #
    # === roebe --fluxbox
    # ===================================================================== #
    when /^-?-?fluxbox$/
      generate_fluxbox_keys_and_apps_file
    # ===================================================================== #
    # === roebe --chello?
    # ===================================================================== #
    when /-?-?chello\??$/i
      show_information_related_to_chello
    # ===================================================================== #
    # === roebe --extract-gem=/home/x/src/coderay/coderay-1.1.1.gem
    #
    # Another example:
    #
    #   roebe --extract-gem=opn-1.0.53.gem
    #
    # ===================================================================== #
    when /-?-?extract(-|_)?gem=(.+)/
      target = $2.to_s.dup
      try_to_extract_this_gem(target)
    # ===================================================================== #
    # === roebe --make-gems
    #
    # This entry point allows me to create all my gems.
    # ===================================================================== #
    when /^-?-?make(-|_)?gems$/i
      require 'roebe/classes/batch_generate_all_my_gems.rb'
      create_my_gems
    # ===================================================================== #
    # === roebe --install-libreoffice
    # ===================================================================== #
    when /^-?-?install(-|_)?libreoffice$/i,
         /^-?-?libreoffice$/i
      Roebe::InstallLibreoffice.new
    # ===================================================================== #
    # === roebe --fonts
    # ===================================================================== #
    when /^-?-?fonts$/i,             # === roebe --fonts
         /^-?-?install(-|_)?fonts$/i # === roebe --install-fonts
      install_all_registered_fonts
    # ===================================================================== #
    # === roebe --pdf-viewer?
    # ===================================================================== #
    when /^-?-?pdf(-|_)?viewer\??$/i # === roebe --pdf-viewer?
      require 'pdf_paradise'
      PdfParadise.report_which_pdf_viewer_is_in_use
    # ===================================================================== #
    # === roebe --install-the-cascadia-font
    # ===================================================================== #
    when /^-?-?install(-|_)?the(-|_)?cascadia(-|_)?font$/i, # === roebe --install-the-cascadia-font
         /^-?-?install(-|_)?cascadia(-|_)?font$/i,          # === roebe --install-cascadia-font
         /^-?-?install(-|_)?cascadia$/i,                    # === roebe --install-cascadia
         /^-?-?cascadia$/i                                 # === roebe --cascadia
      require 'roebe/toplevel_methods/install_the_cascadia_font.rb'
      install_the_cascadia_font
    # ===================================================================== #
    # === roebe --install-the-hack-font
    # ===================================================================== #
    when /^-?-?install(-|_)?the(-|_)?hack(-|_)?font$/i, # === roebe --install-the-hack-font
         /^-?-?install(-|_)?hack(-|_)?font$/i,          # === roebe --install-hack-font
         /^-?-?install(-|_)?hack$/i,                    # === roebe --install-hack
         /^-?-?install(-|_)?font$/i,                    # === roebe --install-font
         /^-?-?hack$/i                                  # === roebe --hack
      require 'roebe/toplevel_methods/install_the_hack_font.rb'
      install_the_hack_font
    # ===================================================================== #
    # === roebe --usb.ids
    #
    # This entry point allows us to install the usb.ids file.
    # ===================================================================== #
    when /^-?-?usb\.?ids$/i, # === roebe --usb.ids
         /^-?-?install(-|_)?usb(-|_)?ids$/i
      require 'roebe/commandline/misc.rb'
      install_usb_ids
    # ===================================================================== #
    # === roebe --generate_liloconfig
    # ===================================================================== #
    when /^-?-?generate(-|_)?liloconfig$/i,
         /^-?-?lilo$/i
      generate_liloconfig
    # ===================================================================== #
    # === roebe --create-mad-pkgconfig-file
    # ===================================================================== #
    when /^-?-?create(-|_)?mad(-|_)?pkgconfig(-|_)?file$/i
      create_mad_pkgconfig_file
    # ===================================================================== #
    # === roebe --chroot
    # ===================================================================== #
    when /^-?-?chroot$/i,
         /^-?-?enter(-|_)?chroot$/i
      require 'roebe/toplevel_methods/chroot.rb'
      Roebe.enter_chroot
    # ===================================================================== #
    # === roebe --use-atril
    # ===================================================================== #
    when /^-?-?use(-|_| )?atril$/,
         /^-?-?atril$/
      update_the_main_pdf_viewer_file_with_this_program(:atril)
    # ===================================================================== #
    # === roebe --use-evince
    # ===================================================================== #
    when /^-?-?use(-|_| )?evince$/,
         /^-?-?evince$/
      update_the_main_pdf_viewer_file_with_this_program(:evince)
    # ===================================================================== #
    # === roebe --browser.yml
    # ===================================================================== #
    when /^-?-?browser\.?yml$/
      e sfile(FILE_TO_BROWSER)
    # ===================================================================== #
    # === roebe --download-emoji
    # ===================================================================== #
    when /^-?-?download(-|_)?emoji$/i
      Roebe.download_emojis
    # ===================================================================== #
    # === roebe --log-dir
    # ===================================================================== #
    when /^-?-?log(-|_)?dir$/i
      e Roebe.log_dir?
    # ===================================================================== #
    # === roebe --word-frequencies=/WORDS.md
    # ===================================================================== #
    when /^-?-?word(-|_)?frequencies=(.+)$/ # === $2
      hash = Roebe.word_frequencies(
        $2.to_s.dup
      )
      hash.each_pair {|a,b|
        e a+' '+b.to_s
      }
    # ===================================================================== #
    # === roebe --return-even-numbered-lines-from-this-file=/TEST.md
    # ===================================================================== #
    when /^-?-?return(-|_)?even(-|_)?numbered(-|_)?lines(-|_)?from(-|_)?this(-|_)?file=(.+)$/ # === $7
      e Roebe.return_even_numbered_lines_from_this_file(
        $7.to_s.dup
      ).join
    # ===================================================================== #
    # === roebe --nanoconfig
    # ===================================================================== #
    when /^-?-?nanoconfig$/i,
        /^-?-?nano$/i,
         /^-?-?enable(-|_)?nano$/i,
         /^-?-?generate(-|_)?nanorc$/i, # === roebe --generate-nanorc
         /^-?-?nanorc$/i                # === roebe --nanorc
      Roebe.generate_nano_config
    # ===================================================================== #
    # === roebe --show-nanoconfig
    # ===================================================================== #
    when /^-?-?show(-|_)?nano(-|_)?config$/
      Roebe.show_nano_config
    # ===================================================================== #
    # === roebe --snowman
    # ===================================================================== #
    when /^-?-?snowman$/
      Roebe.show_unicode_snowman
    # ===================================================================== #
    # === roebe --cpruby
    #
    # This entry point will copy setup.rb into the current working
    # directory.
    # ===================================================================== #
    when /^-?-?cpruby$/,
         /^-?-?copy(-|_)?setup(-|_)?rb(-|_)?file$/,
         /^-?-?copy(-|_)?setup(-|_)?file(-|_)?to(-|_)?pwd$/,
         /^-?-?copy(-|_)?setup$/, # === roebe --copy-setup
         /^-?-?cp(-|_)?setup$/
      Roebe.copy_setup_file_to_pwd { :be_verbose }
    # ===================================================================== #
    # === roebe --populate-this-directory-with-rcfiles=/AUTOGENERATED
    # ===================================================================== #
    when /^-?-?populate(-|_)?this(-|_)?directory(-|_)?with(-|_)?rcfiles=(.+)$/i # === $5
      _ = $5.to_s.dup
      Roebe.populate_this_directory_with_rcfiles(_)
      exit
    # ===================================================================== #
    # === roebe --wlan-gui
    # ===================================================================== #
    when /^-?-?wlan(-|_)?gui$/i
      require 'roebe/classes/wlan/gui/wlan_interface.rb'
      Roebe::GUI::Gtk::WlanInterface.start_gui_application
    # ===================================================================== #
    # === roebe --base64=VOGEL.png > VOGEL.png.md
    #
    # This entry point is for quickly dumping an image file into its
    # corresponding string representation.
    # ===================================================================== #
    when /^-?-?base64=(.+)$/i
      require 'roebe/toplevel_methods/base64.rb'
      input = $1.to_s.dup
      result = Roebe.base64(input)
      e result
    # ===================================================================== #
    # === roebe --download-autogenerated
    #
    # This allows us to batch-download the default RC-files from my home
    # system. The functionality requires a working internet connection,
    # naturally.
    # ===================================================================== #
    when /^-?-?download(-|_| )?autogenerated$/
      Roebe.download_autogenerated_rcfiles
    # ===================================================================== #
    # === roebe --create-dos-iso
    # ===================================================================== #
    when /^-?-?create(-|_)?dos(-|_)?iso$/i
      Roebe.create_dos_iso
    # ===================================================================== #
    # === roebe --show-games
    # ===================================================================== #
    when /^-?-?show(-|_)?games$/i
      Roebe.show_games
    # ===================================================================== #
    # === roebe --simpsons
    # ===================================================================== #
    when /^-?-?simpsons$/i
      require 'multimedia_paradise/video/mplayer_wrapper.rb'
      MultimediaParadise.play_simpsons
    # ===================================================================== #
    # === roebe --save-pdf
    # ===================================================================== #
    when /^-?-?save(-|_)?pdf$/i
      require 'pdf_paradise'
      PdfParadise.save_open_pdf_files
    # ===================================================================== #
    # === roebe --last-pdf
    # ===================================================================== #
    when /^-?-?last(-|_)?pdf$/i,
         /^-?-?pdfs?\??$/i
      show_the_last_opened_pdf_files
    # ===================================================================== #
    # === roebe --use-okular
    # ===================================================================== #
    when /^-?-?use(-|_| )?okular$/,
         /^-?-?okular$/
      update_the_main_pdf_viewer_file_with_this_program(:okular)
    # ===================================================================== #
    # === roebe --version
    # ===================================================================== #
    when /^-?-?version$/
      e sfancy(VERSION)
    # ===================================================================== #
    # === roebe --update-roebe
    # ===================================================================== #
    when /^-?-?update(-|_)?roebe$/
      Roebe.update_roebe
    # ===================================================================== #
    # === roebe --browser-location?
    # ===================================================================== #
    when /^-?-?browser(-|_)?location\??$/i, # === roebe --browser-location?
         /^-?-?firefox(-|_)?location\??$/i, # === roebe --firefox-location?
         /^-?-?browser\??$/i # === roebe --browser
      Roebe.report_the_location_of_the_default_browser
    # ===================================================================== #
    # === roebe --radio-stations
    # ===================================================================== #
    when /^-?-?radio(-|_| )?stations\??$/i
      MultimediaParadise.show_internet_radio_URLs
    # ===================================================================== #
    # === roebe --display-radio-stations
    # ===================================================================== #
    when /^-?-?radio\??$/i,
         /^-?-?display(-|_| )?radio(-|_| )?stations$/i
      MultimediaParadise.display_radio_stations
    # ===================================================================== #
    # === roebe --download-certdata
    # ===================================================================== #
    when /^-?-?download(-|_| )?certdata$/i,
         /^-?-?certdata$/i,
         /^-?-?certdata\.?txt$/i
      Roebe.download_certdata                  
    # ===================================================================== #
    # === roebe --downcase-all-entries
    # ===================================================================== #
    when /^-?-?downcase(-|_| )?all(-|_| )?entries$/i
      require 'roebe/toplevel_methods/downcase_all_entries_in_the_current_directory.rb'
      Roebe.downcase_all_entries
    # ===================================================================== #
    # === roebe --show-directories
    # ===================================================================== #
    when /^-?-?show(-|_| )?directories$/
      pp Dir['*'].select {|entry| File.directory? entry }
    # ===================================================================== #
    # === roebe --update-pciids
    # ===================================================================== #
    when /^-?-?update(-|_| )?pciids$/i
      Roebe.update_pciids
    # ===================================================================== #
    # === roebe --download-certificates
    # ===================================================================== #
    when /^-?-?download(-|_| )?certificates$/i,
         /^-?-?download(-|_| )?certificate$/i,
         /^-?-?download(-|_| )?certification$/i
      Roebe.download_certificates
    # ===================================================================== #
    # === roebe --generate-fluxbox-keys-file
    # ===================================================================== #
    when /^-?-?generate(-|_| )?fluxbox(-|_| )?keys(-|_| )?file$/i,
         /^-?-?fluxbox(-|_| )?keys$/i, # roebe --fluxbox-keys
         /^-?-?fluxbox(-|_| )?config$/i
      Roebe.generate_fluxbox_keys_file
    # ===================================================================== #
    # === roebe --generate-fluxbox-apps-file
    # ===================================================================== #
    when /^-?-?generate(-|_| )?fluxbox(-|_| )?apps(-|_| )?file$/,
         /^-?-?fluxbox(-|_| )?apps$/
      Roebe.generate_fluxbox_apps_file
    # ===================================================================== #
    # === roebe --wlan
    # ===================================================================== #
    when /^-?-?wlan(-|_)?scanning$/i,
         /^-?-?wlan(-|_)?scan/i,
         /^-?-?wlan$/i
      Roebe.scan_for_wlan_spots
    # ===================================================================== #
    # === roebe --append-to-autostart=thunderbird
    #     roebe --append-to-autostart=palemoon
    # ===================================================================== #
    when /^-?-?append(-|_)?to(-|_)?autostart=(.+)$/i
      append_this_program_to_the_autostart_array($3)
    # ===================================================================== #
    # === roebe --interactive
    # ===================================================================== #
    when /^-?-?interactive$/i,
         /^-?-?interactive(-|_)?file(-|_)?creator$/i
      require 'roebe/classes/interactive_file_creator.rb'
      Roebe.interactive_file_creator
    # ===================================================================== #
    # === roebe --tales-from-the-crypt
    # ===================================================================== #
    when /^-?-?tales(-|_)?from(-|_)?the(-|_)?crypt$/i
      require 'roebe/classes/tales_from_the_crypt.rb'
      Roebe.tales_from_the_crypt
    # ===================================================================== #
    # === roebe --install-my-gems
    # ===================================================================== #
    when /^-?-?install(-|_)?my(-|_)?gems$/
      Roebe.install_my_gems
    # ===================================================================== #
    # === roebe --permanently-disable-colours
    # ===================================================================== #
    when /^-?-?permanently(-|_)?disable(-|_)?colou?rs$/,
         /^-?-?disable(-|_)?colou?rs$/,
         /^-?-?no(-|_)?colou?rs$/
      opn; e 'Permanently disabling the colours in the Roebe namespace next.'
      Roebe.permanently_disable_colours
    # ===================================================================== #
    # === roebe --upcase_all_files
    # ===================================================================== #
    when /^-?-?upcase(_|-| )?all(_|-| )?files$/,
         /^-?-?upcase$/
      unless Roebe.respond_to? :upcase_all_files
        require 'roebe/classes/upcaser.rb'
      end
      Roebe.upcase_all_files
    # ===================================================================== #
    # === roebe --beautify-system
    # ===================================================================== #
    when /^-?-?beautify(_|-| )?system$/
      Roebe.beautify_system
    # ===================================================================== #
    # === roebe --show-classes
    # ===================================================================== #
    when /^-?-?show-?classes/,
         /^-?-?available-?classes/
      Roebe.report_classes # bl $ROEBE/toplevel_methods/report_classes.rb
    # ===================================================================== #
    # === roebe --set-project-base-directory=
    # ===================================================================== #
    when /-?-?set-?project-?base-?directory=(.+)/
      Roebe.permanently_set_project_base_directory_to($1.to_s.dup)
    else # else tag
      e rev+
        'Not found: '+orange(i)
    end
  end
end

.middle_dotObject

#

Roebe.middle_dot

This is ·.

#


1047
1048
1049
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1047

def self.middle_dot
  EmojiParadise.send(__method__)
end

.misc(start_position = 11, end_position = 45, this_word = 'plasma') ⇒ Object

#

Roebe.misc

This method can be used for ad-hoc generation of any ruby code. I use it as a placeholder that is doing mostly just “throwaway” stuff.

#


594
595
596
597
598
599
600
601
602
603
604
# File 'lib/roebe/toplevel_methods/misc.rb', line 594

def self.misc(
    start_position = 11,
    end_position   = 45,
    this_word      = 'plasma'
  )
  (start_position .. end_position).to_a.each {|number|
    line = ('c'+this_word+number.to_s+':').ljust(16)+
           ' ry '+this_word+number.to_s
    e line
  }
end

.mittelwert(i) ⇒ Object

#

Roebe.mittelwert

#


288
289
290
# File 'lib/roebe/math/math.rb', line 288

def self.mittelwert(i)
  ::Roebe::Math.mittelwert(i)
end

.mixed_case(i) ⇒ Object

#

Roebe.mixed_case

Usage examples:

Roebe.mixed_case("ADAM SMITH") # => "Adam Smith"
Roebe.mixed_case("adam smith") # => "Adam Smith"
Roebe.mixed_case("aDAM sMiTh") # => "Adam Smith"
#


517
518
519
# File 'lib/roebe/toplevel_methods/misc.rb', line 517

def self.mixed_case(i)
  i.downcase.gsub(/\b\w/) {|entry| entry.upcase }
end

.money_bagObject

#

Roebe.money_bag

puts Colours.crimson(Roebe.money_bag)

#


520
521
522
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 520

def self.money_bag
  EmojiParadise.send(__method__)
end

.month_to_number(i = 'Sep') ⇒ Object

#

Roebe.month_to_number

This method will convert a month, as String, such as ‘Sep’, into the appropriate number, aka 9.

Usage examples:

Roebe.month_to_number('Jan') # => 1
Roebe.month_to_number('Sep') # => 9
#


181
182
183
184
185
186
187
188
# File 'lib/roebe/time/time.rb', line 181

def self.month_to_number(i = 'Sep')
  array = Roebe.array_short_monthnames
  if i and !i.empty?
    array.find_index(i) + 1
  else
    nil
  end
end

.mount_procs(use_this_directory_for_the_chroot = '/Depot/Chroot/') ⇒ Object

#

Roebe.mount_procs

This method can be used to mount procs, such as typically necessary for a “Linux from scratch” system.

#


15
16
17
18
19
# File 'lib/roebe/toplevel_methods/mount_procs.rb', line 15

def self.mount_procs(
    use_this_directory_for_the_chroot = '/Depot/Chroot/'
  )
  esystem "mount -vt proc proc #{use_this_directory_for_the_chroot}proc"
end

.move_content_of_this_directory_to_that_directory_unless_target_already_exists(a, b) ⇒ Object

#

Roebe.move_content_of_this_directory_to_that_directory_unless_target_already_exists

#


111
112
113
# File 'lib/roebe/classes/move_content_of_this_directory_to_that_directory_unless_target_already_exists.rb', line 111

def self.move_content_of_this_directory_to_that_directory_unless_target_already_exists(a, b)
  Roebe::MoveContentOfThisDirectoryToThatDirectoryUnlessTargetAlreadyExists.new(a, b)
end

.move_to_torrent_directory(i = :all_torrent_files_in_the_current_directory, target_directory = '/Depot/Torrents/', be_verbose = :be_verbose) ⇒ Object

#

Roebe.move_to_torrent_directory

This method will move all .torrent files into the target directory. The target_directory is the second argument to this method. Obviously this directory should exist.

The first directory to this method will, by default, attempt to obtain all .torrent files in this directory.

#


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/roebe/toplevel_methods/move_to_torrent_directory.rb', line 23

def self.move_to_torrent_directory(
    i                = :all_torrent_files_in_the_current_directory,
    target_directory = '/Depot/Torrents/',
    be_verbose       = :be_verbose
  )
  if File.directory? target_directory
    case i
    when :all_torrent_files_in_the_current_directory
      i = Dir['*.torrent']
    end
    if i.empty?
      e 'No '+Colours.crimson('.torrent')+' file has been given to the method '+
        Colours.crimson('Roebe.move_to_torrent_directory()')+'.'
    else
      Roebe.move_files(i, target_directory, be_verbose)
    end
  else
    e "The target directory at `#{target_directory}` does not exist."
  end
end

.music_flat_signObject

#

Roebe.music_flat_sign

The symbol will be: ♭

#


848
849
850
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 848

def self.music_flat_sign
  EmojiParadise.send(__method__)
end

.music_natural_signObject

#

Roebe.music_natural_sign

The symbol will be: ♮

#


857
858
859
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 857

def self.music_natural_sign
  EmojiParadise.send(__method__)
end

.music_sharp_signObject

#

Roebe.music_sharp_sign

The symbol will be: ♯

#


866
867
868
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 866

def self.music_sharp_sign
  EmojiParadise.send(__method__)
end

.mv(old, new, be_verbose = false) ⇒ Object

#

Roebe.mv

Toplevel method to move files.

#


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/roebe/toplevel_methods/move_file.rb', line 18

def self.mv(
    old, new, be_verbose = false
  )
  if old.is_a? Array
    old.each {|entry|
      mv(entry, new, be_verbose)
    }
  else
    case be_verbose
    when :be_verbose
      be_verbose = true
    end
    if be_verbose
      e "#{rev}Moving `#{sfancy(old)}` to `#{sdir(new)}`."
    end
    FileUtils.mv(old, new)
  end
end

.n_characters_in_this_file(this_file, ignore_newlines = true) ⇒ Object

#

Roebe.n_characters_in_this_file

This method will return a number, which tells us how many characters are in the given input-file.

The input-file is the first argument to this method.

The second parameter of this method determines whether we will ignore newlines or whether we will not. By default we will ignore (and thus remove) newlines.

#


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/roebe/toplevel_methods/n_characters_in_this_file.rb', line 23

def self.n_characters_in_this_file(
    this_file,
    ignore_newlines = true
  )
  result = 0
  if this_file.is_a? Array
    this_file = this_file.join(' ').strip
  end
  if File.exist? this_file
    result = File.read(this_file)
    if ignore_newlines
      result.delete!("\n")
    end
    result = result.size
  end
  return result
end

.n_files(i = ARGV) ⇒ Object

#

Roebe.n_files

#


95
96
97
# File 'lib/roebe/classes/n_files.rb', line 95

def self.n_files(i = ARGV)
  ::Roebe::NFiles.new(i)
end

.n_files_are_available_in_totalObject

#

Roebe.n_files_are_available_in_total

This method returns how many files are available on the local computer system (a Linux system that is).

#


118
119
120
121
# File 'lib/roebe/toplevel_methods/misc.rb', line 118

def self.n_files_are_available_in_total
  result = `find  / . -type f -print 2> /dev/null | wc -l`
  return result.strip.to_i
end

.nano_addonsObject

#

Roebe.nano_addons

#


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/roebe/toplevel_methods/nano_addons.rb', line 15

def self.nano_addons
  base_dir = DIRECTORY_CONTAINING_THE_NANO_RC_FILES
  nanorc_file = ENV['HOME'].to_s+'/.nanorc'
  if File.exist? nanorc_file
    File.delete(nanorc_file)
  end
  # ======================================================================= #
  # But reject the file called 'README.md'.
  # ======================================================================= # 
  all_files = Dir[base_dir+'*.md'].reject {|entry|
    entry.include? 'README.md'
  }
  e 'We will append these files next:'
  pp all_files
  all_files.each {|file|
    dataset = File.read(file)+"\n"
    SaveFile.append_what_into(dataset, nanorc_file)
  }
  e "Storing into `#{nanorc_file}`."
end

.new_konsole_tabObject

#

Roebe.new_konsole_tab

Use this method to open a new konsole tab.

#


16
17
18
19
# File 'lib/roebe/toplevel_methods/new_konsole_tab.rb', line 16

def self.new_konsole_tab
  _ = 'konsole --new-tab &'
  esystem _
end

.newstud1Object

#

Roebe.newstud1

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud1.rb', line 16

def self.newstud1
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud10Object

#

Roebe.newstud10

This makes the tenth newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud10.rb', line 16

def self.newstud10
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud11Object

#

Roebe.newstud11

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud11.rb', line 16

def self.newstud11
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud12Object

#

Roebe.newstud12

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud12.rb', line 16

def self.newstud12
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud13Object

#

Roebe.newstud13

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud13.rb', line 16

def self.newstud13
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud14Object

#

Roebe.newstud14

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud14.rb', line 16

def self.newstud14
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud15Object

#

Roebe.newstud15

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud15.rb', line 16

def self.newstud15
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud16Object

#

Roebe.newstud16

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud16.rb', line 16

def self.newstud16
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud17Object

#

Roebe.newstud17

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud17.rb', line 16

def self.newstud17
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud18Object

#

Roebe.newstud18

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud18.rb', line 16

def self.newstud18
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud19Object

#

Roebe.newstud19

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud19.rb', line 16

def self.newstud19
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud2Object

#

Roebe.newstud2

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud2.rb', line 16

def self.newstud2
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud20Object

#

Roebe.newstud20

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud20.rb', line 16

def self.newstud20
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud21Object

#

Roebe.newstud21

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud21.rb', line 16

def self.newstud21
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud22Object

#

Roebe.newstud22

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud22.rb', line 16

def self.newstud22
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud23Object

#

Roebe.newstud23

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud23.rb', line 16

def self.newstud23
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud24Object

#

Roebe.newstud24

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud24.rb', line 16

def self.newstud24
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud25Object

#

Roebe.newstud25

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud25.rb', line 16

def self.newstud25
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud3Object

#

Roebe.newstud3

This makes the third newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud3.rb', line 16

def self.newstud3
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud4Object

#

Roebe.newstud4

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud4.rb', line 16

def self.newstud4
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud5Object

#

Roebe.newstud5

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud5.rb', line 16

def self.newstud5
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud6Object

#

Roebe.newstud6

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud6.rb', line 16

def self.newstud6
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud7Object

#

Roebe.newstud7

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud7.rb', line 16

def self.newstud7
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud8Object

#

Roebe.newstud8

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud8.rb', line 16

def self.newstud8
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.newstud9Object

#

Roebe.newstud9

This makes the secondary newstud setting.

#


16
17
18
# File 'lib/roebe/toplevel_methods/newstud/newstud9.rb', line 16

def self.newstud9
  Studium::NewStud[__method__.to_s[/(\d+)/]]
end

.no_capsObject

#

Roebe.no_caps

This method can be used to disable the caps-lock key.

It may be that only the setxkbmap entry (see below) is necessary, but for the time being we will also retain the two xmodmap commands.

On 29.02.2020 the first two lines were disabled, though.

#


19
20
21
22
23
# File 'lib/roebe/toplevel_methods/no_caps.rb', line 19

def self.no_caps
  # esystem "xmodmap -e 'remove lock = Caps_Lock'"
  # esystem "xmodmap -e 'clear lock'"
  esystem "setxkbmap -option ctrl:nocaps"
end

.non_asciiObject

#

Roebe.non_ascii

Get rid of trailing .ascii names.

#


238
239
240
241
242
243
244
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 238

def self.non_ascii
  Dir['*.ascii'].each {|file|
    new_filename = file.sub(/\.ascii$/,'')
    e 'Now modifying '+file+' to '+new_filename+'.'
    mv(file, new_filename)
  }
end

.not_equal_toObject

#

Roebe.not_equal_to

This is ≠.

#


766
767
768
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 766

def self.not_equal_to
  EmojiParadise.send(__method__)
end

.ntrad(i = ARGV) ⇒ Object

#

Roebe.ntrad (ntrad tag)

This method can be used to compile a program from source in a “non-traditional way” - meaning to compile it into an AppDir prefix, such as “/Programs/Gnumeric/4.3.2/”.

#


18
19
20
21
22
23
# File 'lib/roebe/toplevel_methods/ntrad.rb', line 18

def self.ntrad(
    i = ARGV
  )
  require 'rbt/utility_scripts/ntrad.rb'
  RBT.ntrad(i)
end

.number_to_english(i = 1) ⇒ Object

#

Roebe.number_to_english

#


152
153
154
# File 'lib/roebe/classes/number_to_english.rb', line 152

def self.number_to_english(i = 1)
  Roebe::NumberToEnglish[i]
end

.ocra_build(a = ARGV, b = :default) ⇒ Object

#

Roebe.ocra_build

#


5618
5619
5620
5621
5622
5623
# File 'lib/roebe/custom_methods/module.rb', line 5618

def self.ocra_build(
    a = ARGV,
    b = :default
  )
  ::Roebe::CustomMethods.ocra_build(a, b)
end

.open(i = ARGV) ⇒ Object

#

Roebe.open

#


328
329
330
331
# File 'lib/roebe/toplevel_methods/misc.rb', line 328

def self.open(i = ARGV)
  require 'open'
  ::Open[i]
end

.open_in_browser(i = ARGV) ⇒ Object

#

Roebe.open_in_browser

Use this method if you wish to open an URL in the browser.

#


14
15
16
17
18
19
20
21
22
23
24
# File 'lib/roebe/toplevel_methods/open_in_browser.rb', line 14

def self.open_in_browser(
    i = ARGV
  )
  require 'roebe/toplevel_methods/e.rb'
  begin
    require 'open/in_browser/in_browser.rb' unless Object.const_defined? :Open
  rescue LoadError
    e 'The gem open is not installed.'
  end
  ::Open.in_browser(i) { :try_to_use_localhost_URLs }
end

.open_in_editor(i = ARGV) ⇒ Object

#

Roebe.open_in_editor (open tag)

Open a file in the editor with this method.

#


16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/roebe/toplevel_methods/open_in_editor.rb', line 16

def self.open_in_editor(
    i = ARGV
  )
  begin
    require 'open'
    Open.in_editor(i) # bl $RSRC/open_in_editor/lib/open_in_editor/open_in_editor.rb
  rescue LoadError
    e 'module Roebe: the project called open is not '\
      'available. Consider installing it via: '\
      'gem install open'
  end
end

.open_in_editor_and_browser(this = ARGV) ⇒ Object

#

Roebe.open_in_editor_and_browser

Invocation example:

open_in_editor_and_browser admin
#


20
21
22
23
24
25
# File 'lib/roebe/toplevel_methods/open_in_editor_and_browser.rb', line 20

def self.open_in_editor_and_browser(this = ARGV)
  require 'roebe/browser/browser.rb'
  this = this.first if this.is_a? Array
  open_in_editor(this)
  self.firefox(this)
end

.open_ports?Boolean

#

Roebe.open_ports?

This method will return, as an Array, which ports are open on the given computer system.

Usage example:

array = Roebe.open_ports?
#

Returns:

  • (Boolean)


39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/roebe/toplevel_methods/open_ports.rb', line 39

def self.open_ports?
  require 'socket'
  array_open_ports = []
  check_up_to_these_ports = 16_096
  1.upto(check_up_to_these_ports) {|this_port|
    begin
      t = TCPSocket.new('localhost', this_port)
    rescue Errno::ECONNREFUSED
      # =================================================================== #
      # Ports that are closed will create an error (Errno::ECONNREFUSED),
      # which will be silently rescued here.
      # =================================================================== #
    else
      array_open_ports << this_port
      t.close
    end
  }
  return array_open_ports
end

.opnn(use_this_namespace = { namespace: NAMESPACE }) ⇒ Object

#

Roebe.opnn

#


20
21
22
23
24
25
26
27
28
29
# File 'lib/roebe/toplevel_methods/opnn.rb', line 20

def self.opnn(
    use_this_namespace = { namespace: NAMESPACE }
  ) # NAMESPACE is defined in constants.rb
  if use_this_namespace.is_a? Hash
    namespace = use_this_namespace
  elsif use_this_namespace.is_a? String
    namespace = { namespace: use_this_namespace }
  end
  Opn.opn(namespace) if Object.const_defined? :Opn
end

.orange(i = '') ⇒ Object

#

Roebe.orange

#


301
302
303
304
# File 'lib/roebe/colours/colours.rb', line 301

def self.orange(i = '')
  return COLOURS.orange(i) if @use_colours
  return i
end

.orchid(i = '', use_colours = @use_colours) ⇒ Object

#

Roebe.orchid

#


365
366
367
368
369
370
371
# File 'lib/roebe/colours/colours.rb', line 365

def self.orchid(
    i           = '',
    use_colours = @use_colours
  )
  return COLOURS.orchid(i) if use_colours
  return i
end

.padding?Boolean

#

Roebe.padding?

This method will return my preferred padding - which is two spaces.

#

Returns:

  • (Boolean)


173
174
175
# File 'lib/roebe/toplevel_methods/files.rb', line 173

def self.padding?
  '  '
end

.palemoon(this_remote_url = ARGV) ⇒ Object

#

Roebe.palemoon

#


37
38
39
# File 'lib/roebe/browser/palemoon.rb', line 37

def self.palemoon(this_remote_url = ARGV)
  Roebe::Palemoon.new(this_remote_url)
end

.parse_commandline(i = ARGV) ⇒ Object

#

Roebe.parse_commandline

#


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/roebe/commandline/parse_commandline.rb', line 12

def self.parse_commandline(
    i = ARGV
  )
  if i.is_a? Array
    case i.first
    # ===================================================================== #
    # === roebe --pristine something
    # ===================================================================== #
    when /^--pristine$/i
      require 'roebe/classes/pristine_gems.rb'
      ::Roebe::PristineGems.new(i.last)
    # ===================================================================== #
    # === roebe --extract Variablen.zip
    #
    # More usage examples:
    #
    #   roebe --extract=opn-1.0.53.gem
    #
    # ===================================================================== #
    when /^--extract$/i
      require 'roebe/classes/simple_extractor.rb'
      Roebe::SimpleExtractor.new(i)
    else
      i.each {|entry| parse_commandline(entry)}
    end
  else
    case i
    # ===================================================================== #
    # === roebe --help
    # ===================================================================== #
    when /help/
      Roebe.show_help # help tag
    else # else we will delegate into Roebe.menu()
      require 'roebe/commandline/menu.rb' unless Roebe.respond_to? :menu
      Roebe.menu(i)
    end
  end
end

.password(i = ARGV) ⇒ Object

#

Roebe.password

Usage example for my home system:

Roebe.password(:etec)
#


751
752
753
# File 'lib/roebe/classes/passwords.rb', line 751

def self.password(i = ARGV)
  Roebe::Passwords.new(i)
end

.path?Boolean

#

Roebe.path?

Return the PATH variable in use.

#

Returns:

  • (Boolean)


29
30
31
# File 'lib/roebe/toplevel_methods/env.rb', line 29

def self.path?
  @env['PATH']
end

.permanently_disable_coloursObject

#

Roebe.permanently_disable_colours

#


140
141
142
143
144
# File 'lib/roebe/colours/colours.rb', line 140

def self.permanently_disable_colours
  write_what_into(
    'false', FILE_USE_COLOURS
  )
end

.permanently_set_project_base_directory_to(i) ⇒ Object

#

Roebe.permanently_set_project_base_directory_to

To invoke this from the commandline, do:

roebe --set-project-base-directory=/opt
#


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/roebe/toplevel_methods/permanently_set_project_base_directory_to.rb', line 20

def self.permanently_set_project_base_directory_to(i)
  i = i.dup if i.frozen?
  i << '/' unless i.end_with? '/'
  _ = FILE_PROJECT_BASE_DIRECTORY
  e 'Now permanently setting the project base directory '\
    'to '+sdir(i)+'. (Storing in '+sfile(_)+')'
  # ======================================================================= #
  # We will store into a yaml file, in this case.
  # ======================================================================= #
  into = _
  what = YAML.dump(i)
  write_what_into(what, into)
  if is_on_roebe?
    into = RUBY_SRC+'roebe/lib/roebe/yaml/'+File.basename(into)
    if File.directory?(File.dirname(into))
      write_what_into(what, into)
    end
  end
end

.permanently_use_palemoon(where = DEFAULT_ASSUMED_PATH_TO_THE_PALEMOON_BINARY) ⇒ Object

#

Roebe.permanently_use_palemoon

This method can be used to permanently enable palemoon as the primary browser on the given computer system. By default the target will be /usr/bin/palemoon, for the main palemoon binary. Supply another path if palemoon is in another directory.

#


49
50
51
52
53
# File 'lib/roebe/browser/palemoon.rb', line 49

def self.permanently_use_palemoon(
    where = DEFAULT_ASSUMED_PATH_TO_THE_PALEMOON_BINARY
  )
  Roebe::Browser.permanently_use_this_browser(where, :default)
end

.ping_widgetObject

#

Roebe.ping_widget

#


550
551
552
# File 'lib/roebe/gui/universal_widgets/ping_widget/ping_widget.rb', line 550

def self.ping_widget
  Roebe::GUI::PingWidget.run
end

.platformObject

#

Roebe.platform

#


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/roebe/toplevel_methods/platform.rb', line 14

def self.platform
  case RUBY_PLATFORM
  # ======================================================================= #
  # === linux
  # ======================================================================= #
  when /linux/i,
       /freebsd/i,
       /bsd/i,
       /solaris/i, 
       /hpux/i,
       /powerpc-darwin/i
    :linux # Or :unix
  # ======================================================================= #
  # === windows
  # ======================================================================= #
  when /mswin32/i,
       /mingw32/i, /cygwin/i, /bccwin32/i
    :windows
  # ======================================================================= #
  # === java
  # ======================================================================= #
  when /java/i
    :java
  else
    :other
  end
end

.play_columbo_files(use_this_base_directory = '/home/x/video/', play_n_files = nil) ⇒ Object

#

Roebe.play_columbo_files

Play all columbo files.

#


148
149
150
151
152
153
154
155
156
157
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 148

def self.play_columbo_files(
    use_this_base_directory = '/home/x/video/',
    play_n_files            = nil
  )
  require 'multimedia_paradise/video/columbo/columbo.rb'
  MultimediaParadise::Columbo.new {{
    use_this_base_directory: use_this_base_directory,
    play_n_files:            play_n_files
  }}
end

.play_random_married_with_children_videoObject

#

Roebe.play_random_married_with_children_video

#


296
297
298
299
300
301
302
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 296

def self.play_random_married_with_children_video
  target = '/Depot/Video/Comedy/Married_With_Children-Season'
  all_files = Dir[target+'*/**/**']
  random_file = all_files.sample
  e 'Playing this file now: '+sfile(random_file)
  esystem 'mplayer '+random_file
end

.play_random_simpsons_movie(i = ARGV) ⇒ Object

#

Roebe.play_random_simpsons_movie

#


202
203
204
205
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 202

def self.play_random_simpsons_movie(i = ARGV)
  require 'multimedia_paradise/video/simpsons.rb'
  MulimediaParadise::Simpsons.new(i) # Delegate to MultimediaParadise here.
end

.play_random_songs(from_this_directory = '/home/x/songs/') ⇒ Object

#

Roebe.play_random_songs

This method is mostly just useful on my home setup. It will fetch audio-songs from the given directory, and then simply use mpv to randomly play a song from that list.

#


264
265
266
267
268
269
270
271
272
273
274
275
276
# File 'lib/roebe/commandline/misc.rb', line 264

def self.play_random_songs(
    from_this_directory = '/home/x/songs/'
  )
  available_songs = Dir["#{from_this_directory}*"].select {|entry|
    is_audio_file?(entry)
  }
  loop {
    sample = available_songs.sample
    e
    esystem "mpv #{sample}"
    e
  }
end

.populate_important_pdf_files(use_this_directory = DIRECTORY_ROEBE_YAML_PDF) ⇒ Object

#

Roebe.populate_important_pdf_files

The first argument to this method specifies the path to a directory containing the .yml files which will be read.

#


41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 41

def self.populate_important_pdf_files(
    use_this_directory = DIRECTORY_ROEBE_YAML_PDF
  )
  @important_pdf_files = []
  Dir["#{use_this_directory}*.yml"].sort.each {|this_file|
    if File.exist?(this_file)
      dataset = YAML.load_file(this_file)
      dataset = iso_encoding(dataset)
      if dataset.include? '$' # Add support for environment-variables here.
        dataset = convert_global_env(dataset)
      end
      @important_pdf_files << dataset
    end
  }
end

.populate_this_directory_with_rcfiles(i) ⇒ Object

#

Roebe.populate_this_directory_with_rcfiles

#


666
667
668
669
670
671
672
673
674
675
676
677
# File 'lib/roebe/toplevel_methods/misc.rb', line 666

def self.populate_this_directory_with_rcfiles(i)
  i = i.to_s.squeeze(' ').squeeze('/')
  unless i.end_with? '/'
    i = i.dup if i.frozen?
    i << '/'
  end
  unless i == '/'
    mkdir(i) unless File.directory? i
    require 'rcfiles'
    Rcfiles.populate_this_directory(i)
  end
end

.pp_output(i) ⇒ Object

#

Roebe.pp_output

To test this method, try something like this:

pp_output @_
#


19
20
21
22
23
24
25
26
27
28
29
# File 'lib/roebe/toplevel_methods/pp_output.rb', line 19

def self.pp_output(i)
  if i.is_a? Array
    i.each {|entry| pp_output(entry) }
  else
    if i and i.include?('@')
      pp get_ivar(i)
    else
      pp i
    end
  end
end

.prepare_geasObject

#

Roebe.prepare_geas

Prepare some code for GEAS.

#


325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 325

def self.prepare_geas
  base_dir = '/Depot/jj'
  Dir.chdir(base_dir)
  date = Time.now.strftime('%d.%m.%Y')
  dir_name = 'taniel_and_lilith-'+date
  Dir.mkdir(dir_name) if Dir.pwd == base_dir && ! File.exist?(dir_name)
  Dir.chdir(dir_name)
  _ = 'cp -r '+ENV['GEAS']+'/WIZARD/usr/linette/taniel .'
  puts _
  system(_)
  _ = 'cp -r '+ENV['GEAS']+'/WIZARD/usr/linette/lilith .'
  system(_)
  Dir.chdir(base_dir)
  puts 'Within '+Dir.pwd
  require 'x/tools/ruby_totarbz2.rb'
  ToTarBz2.new(dir_name)
  puts 'Done!'
end

.prettify_url(i = :installation, shall_we_replace_the_localhost = :default) ⇒ Object

#

Roebe.prettify_url

This will delegate towards class BeautifulUrl, since as of July 2011.

This method is to be used consistently whenever we seek a “correct” URL that has been pre-registered in the BeautifulUrl namespace.

We purposely do not make use of Arrays, because we want to return something.

Usage example:

Roebe.prettify_url(:installation) # => "/home/x/DATA/PROGRAMMING_LANGUAGES/RUBY/src/rbt/lib/rbt/yaml/installation_procedere.yml"

It will return a String.

@return [String]
#


33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/roebe/toplevel_methods/sanitize_url.rb', line 33

def self.prettify_url(
    i                              = :installation,
    shall_we_replace_the_localhost = :default # <- Get rid of localhost-strings.
  )
  case shall_we_replace_the_localhost
  when :default
    shall_we_replace_the_localhost = true
  end
  if i.is_a? Array
    i = i.first # Only respect the first member of the Array.
  end
  _ = i.to_s.dup
  if Object.const_defined? :BeautifulUrl
    _ = BeautifulUrl::BeautifulUrl.new(_, :do_not_run_yet)
    _.shall_we_replace_localhost = shall_we_replace_the_localhost
    _.run
    # @_ = _ # As of December 2013, we also assign to a dump variable.
    # Nope, disabled ^^^ as of August 2020 again. Let's retain pure methods.
  end
  unless _.is_a? String
    _ = _.string?
  end
  return _
end
#

Roebe.print_this_unicode_input

#


232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/roebe/toplevel_methods/unicode/map_input_to_unicode_symbol.rb', line 232

def self.print_this_unicode_input(i = ARGV)
  _ = i.partition {|entry|
    entry.start_with?('--')
  }
  commandline_options = _.first
  i = _.last
  properly_joined = i.join.strip.prepend(':')

  if properly_joined.include? '*'
    splitted = properly_joined.split('*')
    _ = Roebe.map_input_to_unicode_symbol(splitted.first)
    _ = _ * splitted[1].to_i
  else
    _ = Roebe.map_input_to_unicode_symbol(properly_joined)
  end
  if commandline_options and !commandline_options.empty?
    first = commandline_options.first.delete('-')
    if is_a_html_colour? first
      _ = COLOURS.send(first, _)
    end
  end
  puts _
end

.pristine_gems(i = ARGV) ⇒ Object

#

Roebe.pristine_gems

#


61
62
63
64
65
# File 'lib/roebe/classes/pristine_gems.rb', line 61

def self.pristine_gems(
    i = ARGV
  )
  Roebe::PristineGems.new(i)
end

.programs_directory?Boolean

#

Roebe.programs_directory?

Obtain a handle towards /Programs/, while also honouring $MY_PROGRAMS.

#

Returns:

  • (Boolean)


18
19
20
21
22
23
24
25
26
27
# File 'lib/roebe/toplevel_methods/programs_directory.rb', line 18

def self.programs_directory?
  this_key = 'MY_PROGRAMS'
  if ENV and ENV.has_key?(this_key)
    rds( # let rds() sanitize it a bit.
      "#{ENV[this_key]}/"
    )
  else
    '/home/Programs/'
  end
end

.project_base_dir?Boolean

#

Roebe.project_base_dir?

#

Returns:

  • (Boolean)


33
34
35
# File 'lib/roebe/project/project.rb', line 33

def self.project_base_dir?
  @project_base_directory
end

.project_yaml_dir?(i = @project_base_directory) ⇒ Boolean

#

Roebe.project_yaml_dir?

This has to dynamically determine the yaml/ directory of the Roebe project. In the past we also used a constant, but this is discouraged - use the method here; it is more convenient in the long run.

#

Returns:

  • (Boolean)


70
71
72
73
74
# File 'lib/roebe/project/project.rb', line 70

def self.project_yaml_dir?(
    i = @project_base_directory
  )
  "#{i}yaml/"
end

.publish_gem(i = ARGV) ⇒ Object

#

Roebe.publish_gem

#


241
242
243
# File 'lib/roebe/classes/publish_gem.rb', line 241

def self.publish_gem(i = ARGV)
  Roebe::PublishGem.new(i)
end

.purge_both(i = ARGV) ⇒ Object

#

Roebe.purge_both

This simply combines purgebin() with purgelib().

These two methods can remove binaries and libraries, respectively.

#


42
43
44
45
# File 'lib/roebe/toplevel_methods/purgeboth.rb', line 42

def self.purge_both(i = ARGV)
  purgebin(i)
  purgelib(i)
end

.purgebin(i) ⇒ Object

#

Roebe.purgebin

#


24
25
26
27
28
29
30
31
32
33
# File 'lib/roebe/toplevel_methods/purgeboth.rb', line 24

def self.purgebin(i)
  begin
    require 'rbt/utility_scripts/purge_binaries_of_this_program.rb'
  rescue LoadError; end
  if i.is_a? Array
    i.each {|entry| purgebin(entry) }
  else
    RBT::PurgeBinariesOfThisProgram.new(i)
  end
end

.purgelib(i) ⇒ Object

#

Roebe.purgelib

#


10
11
12
13
14
15
16
17
18
19
# File 'lib/roebe/toplevel_methods/purgeboth.rb', line 10

def self.purgelib(i)
  begin
    require 'rbt/utility_scripts/purge_libraries_of_this_program.rb'
  rescue LoadError; end
  if i.is_a? Array
    i.each {|entry| purgelib(entry) }
  else
    RBT::PurgeLibrariesOfThisProgram.new(i)
  end
end

.purple(i = '', use_colours = @use_colours) ⇒ Object

#

Roebe.purple

#


376
377
378
379
380
381
382
# File 'lib/roebe/colours/colours.rb', line 376

def self.purple(
    i           = '',
    use_colours = @use_colours
  )
  return COLOURS.purple(i) if use_colours
  return i
end

.puts_this(i) ⇒ Object

#

Roebe.puts_this

#


12
13
14
15
16
17
18
19
20
21
# File 'lib/roebe/toplevel_methods/puts_this.rb', line 12

def self.puts_this(i)
  if i.respond_to? :read
    i = i.read
  end
  begin
    $stdout.puts i
  rescue Errno::EPIPE
    exit(74)
  end
end

.pythagoras(a, b) ⇒ Object

#

Roebe.pythagoras

pyth 2,3

#


15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/roebe/toplevel_methods/math.rb', line 15

def self.pythagoras(a, b)
  if a.is_a? Array
    if a.size > 1
      _ = a
      a = _[0]
      b = _[1]
    end
  end
  a = a.to_f
  b = b.to_f
  c = Math.sqrt(a ** 2 + b ** 2) # Die Seite c.
  return c
end

.python_multilineObject

#

Roebe.python_multiline

#


349
350
351
352
353
354
355
356
# File 'lib/roebe/toplevel_methods/misc.rb', line 349

def self.python_multiline
  e
  e '"""'
  e ' Hello'
  e '  World'
  e '"""'
  e
end

.quadrant_lower_leftObject

#

Roebe.quadrant_lower_left

#


195
196
197
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 195

def self.quadrant_lower_left
  EmojiParadise.quadrant_lower_left
end

.quadrant_lower_rightObject

#

Roebe.quadrant_lower_right

#


202
203
204
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 202

def self.quadrant_lower_right
  EmojiParadise.quadrant_lower_right
end

.quadrant_upper_leftObject

#

Roebe.quadrant_upper_left

#


209
210
211
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 209

def self.quadrant_upper_left
  EmojiParadise.quadrant_upper_left
end

.quadrant_upper_left_and_lower_left_and_lower_rightObject

#

Roebe.quadrant_upper_left_and_lower_left_and_lower_right

#


216
217
218
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 216

def self.quadrant_upper_left_and_lower_left_and_lower_right
  EmojiParadise.quadrant_upper_left_and_lower_left_and_lower_right
end

.quadrant_upper_left_and_lower_rightObject

#

Roebe.quadrant_upper_left_and_lower_right

#


223
224
225
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 223

def self.quadrant_upper_left_and_lower_right
  EmojiParadise.quadrant_upper_left_and_lower_right
end

.quadrant_upper_left_and_upper_right_and_lower_leftObject

#

Roebe.quadrant_upper_left_and_upper_right_and_lower_left

#


230
231
232
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 230

def self.quadrant_upper_left_and_upper_right_and_lower_left
  EmojiParadise.quadrant_upper_left_and_upper_right_and_lower_left
end

.quadrant_upper_left_and_upper_right_and_lower_rightObject

#

Roebe.quadrant_upper_left_and_upper_right_and_lower_right

#


237
238
239
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 237

def self.quadrant_upper_left_and_upper_right_and_lower_right
  EmojiParadise.quadrant_upper_left_and_upper_right_and_lower_right
end

.quadrant_upper_rightObject

#

Roebe.quadrant_upper_right

#


244
245
246
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 244

def self.quadrant_upper_right
  EmojiParadise.quadrant_upper_right
end

.quadrant_upper_right_and_lower_leftObject

#

Roebe.quadrant_upper_right_and_lower_left

#


251
252
253
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 251

def self.quadrant_upper_right_and_lower_left
  EmojiParadise.quadrant_upper_right_and_lower_left
end

.quadrant_upper_right_and_lower_left_and_lower_rightObject

#

Roebe.quadrant_upper_right_and_lower_left_and_lower_right

#


258
259
260
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 258

def self.quadrant_upper_right_and_lower_left_and_lower_right
  EmojiParadise.quadrant_upper_right_and_lower_left_and_lower_right
end

.quarter_noteObject

#

Roebe.quarter_note

The symbol will be: ♩

#


821
822
823
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 821

def self.quarter_note
  EmojiParadise.send(__method__)
end

.query_length_of(i = main_file? ) ⇒ Object

#

Roebe.query_length_of

#


460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
# File 'lib/roebe/toplevel_methods/misc.rb', line 460

def self.query_length_of(
    i = main_file?
  )
  begin
    unless Object.const_defined? :MultimediaParadise
      require 'multimedia_paradise/requires/require_file_duration.rb'
    end
  rescue LoadError; end
  i = main_file? if i.nil?
  if i.is_a? Array
    i.each {|entry| query_length_of(entry) }
  else
    i = i.to_s
    if File.exist? i
      if Object.const_defined? :MultimediaParadise
        _ = MultimediaParadise::FileDuration.new(i, :do_not_exit).duration.to_s # bl $MULTIMEDIA_PARADISE/multimedia_file_duration.rb
        e "The file #{sfancy(i)} has a duration of #{simp(_)} seconds."
      else
        e 'Please install the project called '\
          'multimedia_paradise ( gem install multimedia_paradise )'
      end
    else
      e 'No file exists at '+sfile(i)+'.'
    end
  end
end

.random_background(i = ARGV) ⇒ Object

#

Roebe.random_background

#


181
182
183
# File 'lib/roebe/classes/random_background.rb', line 181

def self.random_background(i = ARGV)
  RandomBackground.new(i)
end

.random_background_via_n_delay(i = ARGV, delay = 1) ⇒ Object

#

Roebe.random_background_via_n_delay

#


188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'lib/roebe/classes/random_background.rb', line 188

def self.random_background_via_n_delay(
    i = ARGV, delay = 1
  )
  if i.empty?
    i = Dir[Roebe::RandomBackground::IMG_DIRECTORY+'NJOY/**/*'].flatten  
  end
  loop {
    i.each {|this_file|
      Roebe.random_background(this_file)
      sleep delay
    }
    break
  }
end

.random_gtkObject

#

Roebe.random_gtk

#


452
453
454
455
# File 'lib/roebe/toplevel_methods/misc.rb', line 452

def self.random_gtk
  require 'gtk_paradise'
  Gtk.run_a_random_gtk_class
end

.random_open(i = ARGV) ⇒ Object

#

Roebe.random_open

#


102
103
104
# File 'lib/roebe/classes/random_open.rb', line 102

def self.random_open(i = ARGV)
  RandomOpen.new(i)
end

.rds(i = '') ⇒ Object

#

RBT.rds

rds is short for “remove double slashes”. This method will always remove double slashes from a String.

#


15
16
17
18
19
20
21
22
23
# File 'lib/roebe/toplevel_methods/rds.rb', line 15

def self.rds(i = '')
  begin
    i = i.to_s.dup # Better to make a .dup here.
    return i.squeeze('/')
  rescue Exception => error
    p error
  end
  return i
end

.readlines(i) ⇒ Object

#

Roebe.readlines

This is a simple “wrapper” over File.readlines().

#


223
224
225
# File 'lib/roebe/toplevel_methods/files.rb', line 223

def self.readlines(i)
  File.readlines(i)
end

.register_sigint(optional_show_this_message = '', &block) ⇒ Object

#

Roebe.register_sigint

#


54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/roebe/toplevel_methods/register_sigint.rb', line 54

def self.register_sigint(
    optional_show_this_message = '',
    &block
  )
  Signal.trap('SIGINT') {
    if optional_show_this_message and
      !optional_show_this_message.empty?
      e optional_show_this_message
    end
  }
  Roebe::Sigint.register(&block)
end

.registered_unicode_symbolsObject

#

Roebe.registered_unicode_symbols

This method will return an Array listing which unicode-symbols have been registered in the Roebe project so far. This may have to be extended manually, so remain consistent about it.

#


64
65
66
67
68
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 64

def self.registered_unicode_symbols
  (
    (2600 .. 2619).to_a + ('260A' .. '260F').to_a
  ).flatten.map(&:to_s)
end

.remove_directory(i = ARGV, delete_only_empty_directories = false) ⇒ Object

#

Roebe.remove_directory

This method can be used to delete directories.

#


195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/roebe/classes/remove_directory.rb', line 195

def self.remove_directory(
    i                             = ARGV,
    delete_only_empty_directories = false
  )
  case delete_only_empty_directories
  when :only_delete_if_it_is_empty
    delete_only_empty_directories = true
  end
  Roebe::RemoveDirectory.new(i) {{
    delete_only_empty_directories: delete_only_empty_directories
  }}
end

.remove_escape_code(from_this_string) ⇒ Object

#

Roebe.remove_escape_code

This method removes ANSI escape codes.

To test this try:

puts Roebe.remove_escape_code("out of maximum \e[31;1m20\e[34;1m players online.\n")
#


17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/roebe/toplevel_methods/regex.rb', line 17

def self.remove_escape_code(from_this_string)
  use_this_regex = /\e\[\d{0,2};?\d{0,1}m?/
  # ======================================================================= #
  # For the regex see:
  #
  #   https://rubular.com/r/3o0NvbW7NFVsSB
  #
  # Oddly enough it displays \e differently - but the next check
  # does work. I made this sure on 01.06.2020.
  # ======================================================================= #
  from_this_string.gsub(use_this_regex, '')
end

.remove_extension(i) ⇒ Object

#

Roebe.remove_extension

#


85
86
87
88
89
# File 'lib/roebe/classes/remove_extension.rb', line 85

def self.remove_extension(i)
  [i].flatten.compact.each {|entry|
    Roebe::RemoveExtension.new(entry)
  }
end

.remove_file(this_file, be_verbose = true) ⇒ Object

#

Roebe.remove_file (delete tag, rm tag)

Use this convenience method if you wish to remove/delete a file.

#


232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# File 'lib/roebe/toplevel_methods/files.rb', line 232

def self.remove_file(
    this_file, be_verbose = true
  )
  case be_verbose
  when :be_quiet
    be_verbose = false
  end
  these_files = [this_file].flatten.compact
  # ======================================================================= #
  # Work on an Array past this point.
  # ======================================================================= #
  these_files.each {|inner_this_file|
    if File.exist?(inner_this_file) and
       File.file?(inner_this_file)
      unless inner_this_file.include? '/'
        this_file = (return_pwd+inner_this_file).squeeze '/'
      end
      if be_verbose
        opn(namespace: 'Roebe') if respond_to?(:opn)
        e "#{rev}Removing this file next: #{sfile(inner_this_file)}"
      end
      File.delete(inner_this_file) if File.exist?(inner_this_file)
    end
  }
end

.remove_html(i = ARGV) ⇒ Object

#

Roebe.remove_html

Usage example:

Roebe.remove_html('string with <span>some</span> html here')
Roebe.remove_html('string with <ud>some</ud> html here')
#


53
54
55
# File 'lib/roebe/modules/remove_html.rb', line 53

def self.remove_html(i = ARGV)
  ::Roebe::RemoveHtml[i]
end

.remove_line(i = ARGV) ⇒ Object

#

Roebe.remove_line

#


161
162
163
164
165
# File 'lib/roebe/classes/remove_line.rb', line 161

def self.remove_line(
    i = ARGV
  )
  Roebe::RemoveLine.new(i)
end

.remove_old_gemObject

#

Roebe.remove_old_gem

#


308
309
310
311
# File 'lib/roebe/classes/update.rb', line 308

def self.remove_old_gem
  this_gem = Dir['*.gem'].first
  remove_file(this_gem) if this_gem
end

.remove_user(i) ⇒ Object

#

Roebe.remove_user

This method will remove a user.

#


17
18
19
20
21
22
23
24
25
26
27
# File 'lib/roebe/toplevel_methods/remove_user.rb', line 17

def self.remove_user(i)
  if i.is_a? Array
    i.each {|entry| remove_user(entry) }
  else
    e 'Removing a new user:'
    e
    cmd = "userdel -r #{i}"
    esystem cmd
    e
  end
end

.rename_ascii_files(do_rename_the_files = true, start_position = 24, end_position = 56) ⇒ Object

#

Roebe.rename_ascii_files

This method is primarily used for the ascii_paradise project.

It can be used to rename a bunch of files.

Invoke like so:

rename_ascii_files
#


256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 256

def self.rename_ascii_files(
    do_rename_the_files = true, # For Debugging.
    start_position      = 24,
    end_position        = 56
  )
  base_name    = 'tears_of_ice_' # Add the prefix here.
  file_suffix  = '.ascii'
  range_to_use = (start_position..end_position) # Which range to use.
  array = range_to_use.to_a.reverse
  array.each {|number|
    _ = 'mv '+base_name+number.to_s+file_suffix+' '+base_name+(number+1).to_s+file_suffix
    e _
    system _ if do_rename_the_files # Do the rename-file action here, if requested to do s.
  }
end

.rename_file(old_filename, new_filename, be_verbose = true) ⇒ Object

#

Roebe.rename_file (rename tag)

Rename a file that way. We will return true on success, and false on failure.

If the file can not be renamed, ruby raises a SystemCallError by default.

#


285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
# File 'lib/roebe/toplevel_methods/files.rb', line 285

def self.rename_file(
    old_filename,
    new_filename,
    be_verbose = true # By default this method is verbose.
  )
  new_filename = new_filename.dup if new_filename.frozen?
  be_verbose = false if be_verbose == :be_silent
  if File.exist? old_filename
    if old_filename == new_filename
      if be_verbose
        ewarn "Not renaming the file as "\
              "#{sfile(old_filename)} equals #{sfile(new_filename)}."
      end
    else
      case File.ftype(old_filename)
      # =================================================================== #
      # === file
      # =================================================================== #
      when 'file'
        _ = sfile(new_filename)
      # =================================================================== #
      # === directory
      # =================================================================== #
      when 'directory'
        new_filename << '/' unless new_filename.end_with? '/'
        _ = sdir(new_filename)
      end
      if old_filename == return_real_filename(new_filename)
        if be_verbose
          e 'Can not rename these entries as they are '+
            'the same. ('+new_filename.to_s+')'
        end
        return false
      else
        if be_verbose
          e "Renaming #{sfile(old_filename)} to #{sfile(_)}."
        end
        # ================================================================= #
        # The following action must be put in a begin/rescue block
        # because it may break.
        # ================================================================= #
        begin
          FileUtils.mv(old_filename, new_filename)
        rescue Exception => exception
          pp exception.class
          pp exception
          e 'Exiting for now. old_filename was '+simp(old_filename)+
            ' and new_filename was '+simp(new_filename)
          exit
        end
        return true
      end
    end
  else # Else the file does not exist, thus we can not rename it.
    if be_verbose
      ewarn "But the file #{col(old_filename)} does not "\
            "exist, thus we can not rename it."
    end
  end
  return false
end

.rename_konsole(i = 'Testing (1) (2) (3)', be_verbose = false) ⇒ Object

#

Roebe.rename_konsole

The first argument is the (new) title of the kde konsole tab.

#


309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 309

def self.rename_konsole(
    i          = 'Testing (1) (2) (3)',
    be_verbose = false # We won't show the command used by default.
  )
  _ = ::Roebe::KdeKonsole.new(i, :do_not_run_yet)
  if i.is_a?(Symbol) or (i.is_a?(String) and i.start_with?(':'))
    # ======================================================================= #
    # Right now we assume that all Symbols passed, are special unicode
    # characters.
    # ======================================================================= #
    _.do_use_unicode # This "enables" Unicode, from within Ruby.
  end
  _.set_be_verbose(be_verbose)
  _.run
end

.repetition_pattern(n_times = 3, this_character = '#') ⇒ Object

#

Roebe.repetition_pattern

#


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/roebe/toplevel_methods/repetition_pattern.rb', line 12

def self.repetition_pattern(
    n_times = 3, this_character = '#'
  )
  padding = ''.dup
  n_times.times {
    print padding
    n_times.times {
      print this_character
    }
    padding += ' '
    padding.size.times {
      print this_character
    }
    print "\n"
  }
end

.replace_leading_file_name(i) ⇒ Object

#

Roebe.replace_leading_file_name

This method will get rid of a leading “file://” part, so that “file:///Depot/Images/output.png” would become “/Depot/Images/output.png”.

Specific Usage example:

Roebe.replace_leading_file_name('file://foo')
stat file:///FOO.doc
#


23
24
25
26
27
28
29
# File 'lib/roebe/toplevel_methods/replace_leading_file_name.rb', line 23

def self.replace_leading_file_name(i)
  if i
    i.sub(/^file:\/\//, '')
  else
    i
  end
end

.replace_localhost_with_data(i) ⇒ Object

#

Roebe.replace_localhost_with_data

This method will replace the leading “localhost” string with “/home/x/data/”.

In short:

"localhost" -> "/home/x/data"
#


23
24
25
26
27
28
29
30
31
32
33
# File 'lib/roebe/toplevel_methods/replace_localhost_with_data.rb', line 23

def self.replace_localhost_with_data(i)
  i = rds(i.to_s)
  i = i.sub(/^file:\/\//, '').
        sub(/^file::\//, '')
  _ = env?['MY_DATA']+'/' # Our pointer to "/home/x/data/"
  # return i.gsub(/^http:\/\/localhost/, _ )
  _ = i.gsub(/localhost/, _)
  _ = rds(_)
  _[0, 'http:'.size] = '' if _[0, 'http:'.size] == 'http:'
  return _
end

.replace_space_with_underscore(i = ARGV, &block) ⇒ Object

#

Roebe.replace_space_with_underscore

#


849
850
851
852
853
854
# File 'lib/roebe/classes/replace_space_with_underscore/replace_space_with_underscore.rb', line 849

def self.replace_space_with_underscore(
    i = ARGV,
    &block
  )
  Roebe::ReplaceSpaceWithUnderscore.new(i, &block)
end

.report_classesObject

#

Roebe.report_classes

This method will report which classes are available, as part of the Roebe namespace.

#


19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/roebe/toplevel_methods/report_classes.rb', line 19

def self.report_classes
  _ = "#{Roebe.project_base_dir?}classes/*.rb"
  these_classes = Dir[_].map {|line|
    line = File.basename(line)
    line.sub!(/\.rb$/,'')
    line = to_camelcase(line)
    # ===================================================================== #
    # Next, camelcase it.
    # ===================================================================== #
    'Roebe::'+line
  }
  e 'These '+these_classes.size.to_s+' classes are available for '\
    'the namespace Roebe:'
  e
  # ======================================================================= #
  # Next, sort these classes alphabetically.
  # ======================================================================= #
  sorted_these_classes = these_classes.sort_by {|entry|
    splitted = entry.split('::')
    last = splitted.last
    last
  }
  sorted_these_classes.each_with_index {|name, index| index += 1
    adjusted = (index.to_s+') ').rjust(7)
    e adjusted+name
  }; e
end

.report_pwdObject

#

Roebe.report_pwd

#


21
22
23
# File 'lib/roebe/toplevel_methods/return_pwd.rb', line 21

def Roebe.report_pwd
  e ::Colours.steelblue(return_pwd)
end

.report_ruby_versionObject

#

Roebe.report_ruby_version

#


43
44
45
# File 'lib/roebe/version/version.rb', line 43

def self.report_ruby_version
  e RUBY_VERSION
end

.report_the_gtk_versions_availableObject

#

Roebe.report_the_gtk_versions_available

#


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/roebe/toplevel_methods/report_the_gtk_versions_available.rb', line 14

def self.report_the_gtk_versions_available
  e
  e "#{rev}The various GTK versions available on this computer are:"
  e
  # ======================================================================= #
  # === gtk2
  # ======================================================================= #
  e seagreen('  gtk2: ')+
    steelblue(`pkg-config --modversion gtk+-2.0`.strip)
  # ======================================================================= #
  # === gtk3
  # ======================================================================= #
  e seagreen('  gtk3: ')+
    steelblue(`pkg-config --modversion gtk+-3.0`.strip)
  # ======================================================================= #
  # === gtk4
  # ======================================================================= #
  e seagreen('  gtk4: ')+
    steelblue(`pkg-config --modversion gtk4`.strip)
  e
end

.report_the_location_of_the_default_browserObject

#

Roebe.report_the_location_of_the_default_browser

This method can be used to report the full target location to the default browser at hand, based on the availability of a file called ‘browser.yml’

#


20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/roebe/toplevel_methods/report_the_location_of_the_default_browser.rb', line 20

def self.report_the_location_of_the_default_browser
  _ = FILE_TO_BROWSER
  if File.exist? _
    e 'The full location to the default browser in use, is '\
      'specified to be at:'
    e
    e "  #{sfile(YAML.load_file(_).strip)}"
    e
    e '(The file that was used for determining this was '+_+')'
    e
  else
    e "No file exists at `#{_}`."
  end
end

.report_versionObject

#

Roebe.report_version

#


19
20
21
# File 'lib/roebe/version/version.rb', line 19

def self.report_version
  puts VERSION
end

.require_all_new_stud_ruby_filesObject

#

Roebe.require_all_new_stud_ruby_files

#


15
16
17
18
19
# File 'lib/roebe/toplevel_methods/newstud.rb', line 15

def self.require_all_new_stud_ruby_files
  (1..20).each {|number|
    require_relative 'newstud/newstud'+number.to_s+'.rb'
  }
end

.require_all_standalone_classesObject

#

Roebe.require_all_standalone_classes

#


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/roebe/requires/require_all_standalone_classes.rb', line 17

def self.require_all_standalone_classes
  site_lib_dir = RbConfig::CONFIG['sitelibdir']+'/'
  _ = "#{::Roebe::PROJECT_BASE_DIRECTORY}classes/"
  Dir["#{_}**/**.rb"].each {|file|
    file.sub!(/#{site_lib_dir}/,'')
    begin
      require file
    rescue LoadError => error
      puts 'Some problem with '+file+' - we will continue '\
           'regardless but the error'
      puts 'will be shown in more detail next (LoadError)'
      pp error
    rescue SyntaxError => error
      puts 'A syntax error has occurred for the file '+file+'.'
      puts 'Considering fixing this issue, if possible.'
      puts 'The specific error is:'
      pp error
    end
  }
  # ======================================================================= #
  # Next, we require the open-gem, for convenience.
  # ======================================================================= #
  begin
    require 'open'
  rescue LoadError; end
  # ======================================================================= #
  # Also require all kde/ files.
  # ======================================================================= #
  # require 'roebe/classes/kde/restore_kde.rb'
  # require 'roebe/classes/kde/kde_konsole_send_command.rb'
  require 'roebe/classes/kde/kde_konsole/kde_konsole.rb'
  require 'roebe/classes/generate_gemspec/generate_gemspec.rb'
  require 'roebe/classes/modify_shebang_header/modify_shebang_header.rb'
  # ======================================================================= #
  # Next add the readme-generator:
  # ======================================================================= #
  require 'roebe/classes/readme_generator/readme_generator.rb'
  # ======================================================================= #
  # Next the new GenerateFstabFile class, written on 30.08.2021:
  # ======================================================================= #
  require 'roebe/classes/generate_fstab_file/generate_fstab_file.rb'
end

.require_all_standalone_module_methodsObject

#

Roebe.require_all_standalone_module_methods

#


39
40
41
# File 'lib/roebe/requires/require_all_standalone_modules.rb', line 39

def self.require_all_standalone_module_methods
  Roebe.require_unicode
end

.require_all_standalone_modulesObject

#

Roebe.require_all_standalone_modules

Load up all the individual modules of this project.

#


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/roebe/requires/require_all_standalone_modules.rb', line 20

def self.require_all_standalone_modules
  site_lib_dir = "#{RbConfig::CONFIG['sitelibdir']}/"
  _ = ::Roebe.project_base_directory?+'modules/'
  target_files = Dir["#{_}**/**.rb"]
  target_files.each {|file|
    file.sub!(/#{site_lib_dir}/,'')
    begin
      require file
    rescue LoadError; end
  }
  # ======================================================================= #
  # Also pull in http_status_codes next.
  # ======================================================================= #
  require 'roebe/modules/http_status_codes/http_status_codes.rb'
end

.require_then_include_this_gem(i = :cyberweb) ⇒ Object

#

Roebe.require_then_include_this_gem

#


156
157
158
159
160
161
# File 'lib/roebe/toplevel_methods/misc.rb', line 156

def self.require_then_include_this_gem(
    i = :cyberweb
  )
  require i.to_s
  include i.to_s.capitalize.to_sym
end

.require_this_roebe_class(i) ⇒ Object

#

Roebe.require_this_roebe_class

#


12
13
14
15
16
17
18
19
20
21
# File 'lib/roebe/toplevel_methods/require_this_roebe_class.rb', line 12

def self.require_this_roebe_class(
    i
  )
  i = i.dup if i.frozen?
  i << '.rb' unless i.end_with? '.rb'
  # ======================================================================= #
  # Next, require it.
  # ======================================================================= #
  require "roebe/classes/#{i}"
end

.require_unicodeObject

#

Roebe.require_unicode

#


14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/roebe/requires/require_unicode.rb', line 14

def self.require_unicode
  # ======================================================================= #
  # Next, all unicode-files.
  # ======================================================================= #
  site_lib_dir = RbConfig::CONFIG['sitelibdir']+'/'
  _ = ::Roebe.project_base_directory?+'toplevel_methods/unicode/'
  target_files = Dir[_+'*.rb']
  target_files.each {|file|
    file.sub!(/#{site_lib_dir}/,'')
    begin
      require file
    rescue LoadError; end
  }
end

.restore_kdeObject

#

Roebe.restore_kde

#


95
96
97
# File 'lib/roebe/classes/kde/restore_kde.rb', line 95

def self.restore_kde
  ::Roebe::RestoreKde.new
end

.restore_master_boot_record(save_in_this_file = 'backup_mbr', use_this_as_input_device = '/dev/sda') ⇒ Object

#

Roebe.restore_master_boot_record

#


64
65
66
67
68
69
70
71
72
# File 'lib/roebe/toplevel_methods/master_boot_record.rb', line 64

def self.restore_master_boot_record(
    save_in_this_file        = 'backup_mbr',
    use_this_as_input_device = '/dev/sda'
  )
  esystem 'dd if='+save_in_this_file+
          ' of='+
          use_this_as_input_device+
          ' bs='+MASTER_BOOD_RECORD_SIZE.to_s+' count=1'
end

.return_all_remote_entries_from_this_url(i = ARGV) ⇒ Object

#

Roebe.return_all_remote_entries_from_this_url

This method will return an Array of all remote entries found under a particular URL.

#


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/roebe/toplevel_methods/return_all_remote_entries_from_this_url.rb', line 15

def self.return_all_remote_entries_from_this_url(
    i = ARGV
  )
  require 'open-uri'
  if i.is_a? Array
    i = i.first
  end
  if i.nil? or i.empty?
    # ===================================================================== #
    # Use a default value in this case.
    # ===================================================================== #
    i = 'https://www.unicode.org/Public/UNIDATA/'
  end
  dataset = open(i).read
  regex_to_use = /<a href="(.+?)">/
  matches = dataset.scan(regex_to_use).flatten
  matches.map {|line| line.prepend(i) }
end

.return_all_unicode_symbols(max_number = 20_000) ⇒ Object

#

Roebe.return_all_unicode_symbols

This method will simply return all unicode symbols.

#


12
13
14
15
16
17
18
# File 'lib/roebe/toplevel_methods/unicode/return_all_unicode_symbols.rb', line 12

def self.return_all_unicode_symbols(
    max_number = 20_000
  )
  (1 .. max_number).to_a.map {|entry|
    [entry].pack('U*')
  }
end

.return_audio_logo(new_title = ARGV) ⇒ Object

#

The first argument to this method shall be the new title that you wish to use for the given KDE konsole tab.

#


300
301
302
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 300

def self.(new_title = ARGV)
  Roebe.return_important_notification(new_title, 'audio-headphones')
end

.return_cat_face_with_wry_smileObject

#

Roebe.return_cat_face_with_wry_smile

#


436
437
438
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 436

def self.return_cat_face_with_wry_smile
  EmojiParadise.send(__method__)
end

.return_coloured_unicode_snowmanObject

#

Roebe.return_coloured_unicode_snowman

#


443
444
445
446
447
# File 'lib/roebe/toplevel_methods/misc.rb', line 443

def self.return_coloured_unicode_snowman
  require 'roebe/requires/require_unicode.rb'
  _ = Roebe.snowman
  ::Colours.royalblue(_)
end

.return_dateObject

#

Roebe.return_date

#


12
13
14
# File 'lib/roebe/toplevel_methods/return_date.rb', line 12

def self.return_date
  Time.now.strftime '%d.%m.%Y'
end

.return_english_weekday(i) ⇒ Object

#

Roebe.return_english_weekday

Usage example:

Roebe.return_english_weekday('03.10.2016') # => "Monday"
#


99
100
101
102
103
104
# File 'lib/roebe/toplevel_methods/time.rb', line 99

def self.return_english_weekday(i)
  day_of_the_week_as_number = ::Time.parse(i.to_s).wday # This will be a number.
  long_name_of_the_day = ::Time::RFC2822_DAY_NAME[day_of_the_week_as_number] # This will be "Sun" rather than "Sunday".
  result = HASH_SHORT_TO_LONG_WEEKDAYS[long_name_of_the_day] # Now it will be correct.
  return result
end

.return_even_numbered_lines_from_this_file(i) ⇒ Object

#

Roebe.return_even_numbered_lines_from_this_file

This method was specifically written to solve the following problem at Rosalind:

http://rosalind.info/problems/ini5/
#


18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/roebe/toplevel_methods/return_even_numbered_lines_from_this_file.rb', line 18

def self.return_even_numbered_lines_from_this_file(i)
  i = i.first if i.is_a? Array
  if File.exist? i
    dataset = File.readlines(i)
    dataset = dataset.each_with_index.map {|content, index|
      if index.odd?
        content
      else
        nil
      end 
    }.compact
    dataset
  end
end

.return_german_weekday(i = '08.05.2022') ⇒ Object

#

Roebe.return_german_weekday

Usage example:

Roebe.return_german_weekday('03.10.2016') # => "Monday"
#


128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/roebe/toplevel_methods/time.rb', line 128

def self.return_german_weekday(
    i = '08.05.2022'
  )
  case i
  when :today
    i = ::Time.now.strftime('%d.%m.%Y')
  end
  if i.is_a? ::Time
    # All is fine, pass-through.
  else
    i = ::Time.parse(i)
  end
  i = Roebe.weekday?(i.wday) # => "Mon"
  i = WEEKDAYS_FROM_ENGLISH_TO_GERMAN[i] # => "Montag"
  i
end

.return_hostnameObject

#

Roebe.return_hostname

Gets the name of our computer host.

#


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/roebe/toplevel_methods/hostname.rb', line 17

def self.return_hostname
  if does_this_program_exist? 'hostname'
    _ = `hostname`.chomp
  elsif File.exist?('/etc/HOSTNAME')
    _ = File.read('/etc/HOSTNAME')
  else
    # ===================================================================== #
    # In the past we used HSS (HASH_SUPER_SYSTEM), which described my
    # computer, via a hash. But I have abandoned this in 2020, so we
    # will instead use the String 'unknown' instead. This may be subject
    # to change in the future, though.
    # ===================================================================== #
    _ = 'unknown'
  end
  return _
end

.return_important_notification(new_title = ARGV, use_this_as_logo = 'emblem-important') ⇒ Object

#

Roebe.return_important_notification

The first argument is the title that you wish to set for the particular KDE konsole tab at hand.

#


286
287
288
289
290
291
292
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 286

def self.return_important_notification(
    new_title        = ARGV,
     = 'emblem-important'
  )
  new_title = new_title.join if new_title.is_a? Array
  "\033]32;#{}\007\e]30;#{new_title}\007"
end

.return_n_aliases(i = ARGV, &block) ⇒ Object

#

Roebe.return_n_aliases

Usage example:

x = Roebe.return_n_aliases { 16 }
#


169
170
171
172
# File 'lib/roebe/classes/return_aliases/return_n_aliases.rb', line 169

def self.return_n_aliases(i = ARGV, &block)
  x = ::Roebe::ReturnNAliases.new(i, &block)
  return x.main_hash
end

.return_natürliche_zahlObject

#

Roebe.return_natürliche_zahl

This will be “ℕ”.

#


97
98
99
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 97

def self.return_natürliche_zahl
  EmojiParadise.send(__method__)
end

.return_pid_of_kde_konsoleObject

#

Roebe.return_pid_of_kde_konsole

This method will return the PID of the KDE konsole.

#


15
16
17
18
19
20
21
22
23
24
# File 'lib/roebe/classes/kde/return_pid_of_kde_konsole.rb', line 15

def self.return_pid_of_kde_konsole
  result = `ps ax`.split("\n")
  result = result.select {|entry|
    entry.strip.end_with? ' konsole'
  }
  unless result.empty?
    first = result.first
    return first.split(' ').first
  end
end

.return_pile_of_pooObject

#

Roebe.return_pile_of_poo

This is Alt +1F4A9.

See:

https://www.fileformat.info/info/unicode/char/1f4a9/index.htm
#


450
451
452
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 450

def self.return_pile_of_poo
  EmojiParadise.send(__method__)
end

.return_pwdObject

#

Roebe.return_pwd

#


14
15
16
# File 'lib/roebe/toplevel_methods/return_pwd.rb', line 14

def self.return_pwd
  "#{Dir.pwd}/".squeeze('/')
end

.return_random_alphabet_characterObject

#

Roebe.return_random_alphabet_character

This method will return a random alphabet char.

#


502
503
504
505
# File 'lib/roebe/toplevel_methods/misc.rb', line 502

def self.return_random_alphabet_character
  alphabet = 'abcdefghijklmnopqrstuvwxyz'
  alphabet.sample
end

.return_real_filename(i) ⇒ Object

#

Roebe.return_real_filename

This method will return the “real” filename, that is, without any leading “./” parts.

For instance, a file called foobar may be referred to as “./foobar” so this method should return only “foobar”.

#


268
269
270
271
272
273
274
# File 'lib/roebe/toplevel_methods/files.rb', line 268

def self.return_real_filename(i)
  _ = i.dup # Work on a copy.
  if i.start_with? './'
    _[0,2] = ''
  end
  return _
end

.return_ruby_headerObject

#

Roebe.return_ruby_header

This method will simply (and silently) return a String, containing the typical header we will use for .rb files.

#


114
115
116
# File 'lib/roebe/classes/ruby_header.rb', line 114

def self.return_ruby_header
  Roebe::RubyHeader.return_ruby_header
end

.return_ruby_use_config_fileObject

#

Roebe.return_ruby_use_config_file

#


96
97
98
# File 'lib/roebe/classes/ruby_use_config_file.rb', line 96

def self.return_ruby_use_config_file
  Roebe::RubyUseConfigFile.return_ruby_use_config_file
end

.return_ten_aliases?Boolean

#

Roebe.return_ten_aliases?

#

Returns:

  • (Boolean)


70
71
72
# File 'lib/roebe/classes/return_aliases/return_ten_aliases.rb', line 70

def self.return_ten_aliases?
  Roebe::ReturnTenAliases[]
end

.return_the_date_of_this_doc_file(i) ⇒ Object

#

Roebe.return_the_date_of_this_doc_file

This method accepts a .doc file. It will then use “file” to try and find out the creation time of that file. If that is not possible then nil will be returned.

Usage example:

Roebe.return_the_date_of_this_doc_file('Top__5__Umbau_Grossbüro_Vordertrakt.doc') # => "11.09.2009"
#


397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'lib/roebe/toplevel_methods/misc.rb', line 397

def self.return_the_date_of_this_doc_file(i)
  if i.is_a? Array
    i = i.first # Only use the first element of an Array, if an Array was given.
  end
  result = nil
  if i and
     File.exist?(i) and
     i.end_with?('.doc')
    result_of_the_file_command = `file #{i}`
    if result_of_the_file_command
      # =================================================================== #
      # See:
      #
      #   https://rubular.com/r/rQV75VA90K9tuZ
      #
      # =================================================================== #
      use_this_regex = /([A-Z][a-z]{2}) ? ?(\d{1,2}) \d{1,2}:\d{1,2}:\d{1,2} (\d{4})/
      result_of_the_file_command =~ use_this_regex
      result = ($2.to_s).rjust(2,'0')+'.'+
               Roebe.month_to_number($1.to_s).to_s.rjust(2,'0')+'.'+
               $3.to_s
    end
  end
  return result
end

.return_twenty_aliases?Boolean

#

Roebe.return_twenty_aliases?

#

Returns:

  • (Boolean)


71
72
73
# File 'lib/roebe/classes/return_aliases/return_twenty_aliases.rb', line 71

def self.return_twenty_aliases?
  Roebe::ReturnTwentyAliases[]
end

.return_unicode_ascending_nodeObject

#

Roebe.return_unicode_ascending_node

See:

http://www.fileformat.info/info/unicode/char/260a/index.htm
#


482
483
484
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 482

def self.return_unicode_ascending_node
  EmojiParadise.send(__method__)
end

.return_unicode_ballot_boxObject

#

Roebe.return_unicode_ballot_box

#


489
490
491
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 489

def self.return_unicode_ballot_box
  EmojiParadise.send(__method__)
end

.return_unicode_ballot_box_with_checkObject

#

Roebe.return_unicode_ballot_box_with_check

#


496
497
498
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 496

def self.return_unicode_ballot_box_with_check
  EmojiParadise.send(__method__)
end

.return_unicode_ballot_box_with_xObject

#

Roebe.return_unicode_ballot_box_with_x

#


504
505
506
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 504

def self.return_unicode_ballot_box_with_x
  EmojiParadise.send(__method__)
end

.return_unicode_black_starObject

#

Roebe.return_unicode_black_star

This is the equivalent of: ★

See:

http://www.fileformat.info/info/unicode/char/2605/index.htm
#


780
781
782
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 780

def self.return_unicode_black_star
  EmojiParadise.send(__method__)
end

.return_unicode_black_sun_with_raysObject

#

Roebe.return_unicode_black_sun_with_rays

This represents a “black sun” with some rays. It is also known as “Clear weather”, oddly enough.

#


223
224
225
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 223

def self.return_unicode_black_sun_with_rays
  EmojiParadise.send(__method__)
end

.return_unicode_black_telephoneObject

#

Roebe.return_unicode_black_telephone

See:

http://www.fileformat.info/info/unicode/char/260e/index.htm
#


532
533
534
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 532

def self.return_unicode_black_telephone
  EmojiParadise.send(__method__)
end

.return_unicode_catObject

#

Roebe.return_unicode_cat

See:

https://www.fileformat.info/info/unicode/char/1f408/index.htm
#


382
383
384
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 382

def self.return_unicode_cat
  EmojiParadise.send(__method__)
end

.return_unicode_cat_faceObject

#

Roebe.return_unicode_cat_face

See:

http://www.fileformat.info/info/unicode/char/1f431/index.htm
#


462
463
464
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 462

def self.return_unicode_cat_face
  EmojiParadise.send(__method__)
end

.return_unicode_cloudObject



212
213
214
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 212

def self.return_unicode_cloud
  EmojiParadise.send(__method__)
end

.return_unicode_cometObject

#

Roebe.return_unicode_comet

See:

http://www.fileformat.info/info/unicode/char/2604/index.htm
#


290
291
292
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 290

def self.return_unicode_comet
  EmojiParadise.send(__method__)
end

.return_unicode_conjunctionObject

#

Roebe.return_unicode_conjunction

See:

http://www.fileformat.info/info/unicode/char/260c/index.htm
#


341
342
343
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 341

def self.return_unicode_conjunction
  EmojiParadise.send(__method__)
end

.return_unicode_descending_nodeObject

#

Roebe.return_unicode_descending_node

See:

http://www.fileformat.info/info/unicode/char/260b/index.htm
#


331
332
333
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 331

def self.return_unicode_descending_node
  EmojiParadise.send(__method__)
end

.return_unicode_dogObject

#

Roebe.return_unicode_dog

#


389
390
391
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 389

def self.return_unicode_dog
  EmojiParadise.send(__method__)
end

.return_unicode_dog_faceObject

#

Roebe.return_unicode_dog_face

#


429
430
431
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 429

def self.return_unicode_dog_face
  EmojiParadise.send(__method__)
end

.return_unicode_heartObject

#

Roebe.return_unicode_heart

#


231
232
233
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 231

def self.return_unicode_heart
  EmojiParadise.send(__method__)
end

.return_unicode_high_voltage_signObject

#

Roebe.return_unicode_high_voltage_sign

See:

https://www.fileformat.info/info/unicode/char/26a1/index.htm
#


415
416
417
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 415

def self.return_unicode_high_voltage_sign
  EmojiParadise.send(__method__)
end

.return_unicode_keyboardObject

#

Roebe.return_unicode_keyboard

#


396
397
398
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 396

def self.return_unicode_keyboard
  EmojiParadise.send(__method__)
end

.return_unicode_kingObject

#

Roebe.return_unicode_king

#


403
404
405
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 403

def self.return_unicode_king
  EmojiParadise.send(__method__)
end

.return_unicode_lightningObject

#

Roebe.return_unicode_lightning

See:

http://www.fileformat.info/info/unicode/char/2607/index.htm
#


311
312
313
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 311

def self.return_unicode_lightning
  EmojiParadise.send(__method__)
end

.return_unicode_oppositionObject

#

Roebe.return_unicode_opposition

See:

http://www.fileformat.info/info/unicode/char/260d/index.htm
#


351
352
353
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 351

def self.return_unicode_opposition
  EmojiParadise.send(__method__)
end

.return_unicode_phoneObject

#

Roebe.return_unicode_phone

#


422
423
424
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 422

def self.return_unicode_phone
  EmojiParadise.send(__method__)
end

.return_unicode_shamrockObject

#

Roebe.return_unicode_shamrock

#


511
512
513
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 511

def self.return_unicode_shamrock
  EmojiParadise.send(__method__)
end

.return_unicode_snowmanObject

#

Roebe.return_unicode_snowman

See:

https://www.fileformat.info/info/unicode/char/2603/index.htm
#


78
79
80
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 78

def self.return_unicode_snowman
  EmojiParadise.send(__method__)
end

.return_unicode_sunObject

#

Roebe.return_unicode_sun

See:

http://www.fileformat.info/info/unicode/char/2609/index.htm
#


472
473
474
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 472

def self.return_unicode_sun
  EmojiParadise.send(__method__)
end

.return_unicode_televisionObject

#

Roebe.return_unicode_television

See:

http://www.fileformat.info/info/unicode/char/1f4fa/index.htm
#


280
281
282
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 280

def self.return_unicode_television
  EmojiParadise.send(__method__)
end

.return_unicode_thunderstormObject

#

Roebe.return_unicode_thunderstorm

See:

http://www.fileformat.info/info/unicode/char/2608/index.htm
#


321
322
323
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 321

def self.return_unicode_thunderstorm
  EmojiParadise.send(__method__)
end

.return_unicode_umbrellaObject

#

Roebe.return_unicode_cloud

See: www.fileformat.info/info/unicode/char/2601/index.htm

#


201
202
203
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 201

def self.return_unicode_umbrella
  EmojiParadise.send(__method__)
end

.return_unicode_white_starObject

#

Roebe.return_unicode_white_star

See:

http://www.fileformat.info/info/unicode/char/2606/index.htm
#


300
301
302
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 300

def self.return_unicode_white_star
  EmojiParadise.send(__method__)
end

.return_unicode_white_telephoneObject

#

Roebe.return_unicode_white_telephone

See:

https://www.fileformat.info/info/unicode/char/260f/index.htm
#


370
371
372
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 370

def self.return_unicode_white_telephone
  EmojiParadise.send(__method__)
end

.return_unicode_yin_yangObject

#

Roebe.return_unicode_yin_yang

See:

https://www.fileformat.info/info/unicode/char/262F/index.htm
#


268
269
270
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 268

def self.return_unicode_yin_yang
  EmojiParadise.send(__method__)
end

.return_url_to_the_blackchancery_fontObject

#

Roebe.return_url_to_the_blackchancery_font

#


19
20
21
# File 'lib/roebe/toplevel_methods/install_this_font.rb', line 19

def self.return_url_to_the_blackchancery_font
  'https://www.1001fonts.com/download/blackchancery.zip'
end

.return_url_to_the_envy_fontObject

#

Roebe.return_url_to_the_envy_font

#


26
27
28
# File 'lib/roebe/toplevel_methods/install_this_font.rb', line 26

def self.return_url_to_the_envy_font
  'https://download.damieng.com/fonts/original/EnvyCodeR-PR7.zip'
end

.rev(use_colours = @use_colours) ⇒ Object

#

Roebe.rev

#


100
101
102
103
104
105
106
107
108
# File 'lib/roebe/colours/colours.rb', line 100

def self.rev(
    use_colours = @use_colours
  )
  if use_colours
    COLOURS.rev if defined?(COLOURS)
  else
    ''
  end
end

.reversed_rotated_floral_heart_bulletObject

#

Roebe.reversed_rotated_floral_heart_bullet

#


192
193
194
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 192

def self.reversed_rotated_floral_heart_bullet
  EmojiParadise.send(__method__)
end

.right_half_blockObject

#

Roebe.right_half_block

#


153
154
155
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 153

def self.right_half_block
  EmojiParadise.right_half_block
end

.right_one_eight_blockObject

#

Roebe.right_one_eight_block

#


188
189
190
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 188

def self.right_one_eight_block
  EmojiParadise.right_one_eight_block
end

.right_pointing_indexObject

#

Roebe.right_pointing_index

This refers to the following symbol: ☛

#


884
885
886
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 884

def self.right_pointing_index
  EmojiParadise.send(__method__)
end

.rightwards_arrowObject

#

Roebe.rightwards_arrow

The symbol will be: →

See: www.fileformat.info/info/unicode/char/2192/index.htm

Invocation example:

puts Colours.crimson(Roebe.rightwards_arrow)
#


983
984
985
986
987
988
989
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 983

def self.rightwards_arrow
  result = "\u{2192}"
  if is_on_roebe?
    set_xorg_buffer(result.strip)
  end
  result
end

.rightwards_harpoon_over_leftwards_harpoonObject

Roebe.rightwards_harpoon_over_leftwards_harpoon

The symbol will be: ⇌

See: www.compart.com/en/unicode/U+21CC

Invocation example:

puts Colours.crimson(Roebe.chemical_reaction_arrow)
#


632
633
634
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 632

def self.rightwards_harpoon_over_leftwards_harpoon
  EmojiParadise.send(__method__)
end

.rinstall2(be_verbose = true) ⇒ Object

#

Roebe.rinstall2 (r2 tag)

This method essentially “installs” a ruby-based project via invoking the file ‘setup.rb’.

Be sure to be in the proper directory already, before invoking this method.

#


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/roebe/toplevel_methods/rinstall2.rb', line 25

def self.rinstall2(
    be_verbose = true
  )
  if be_verbose
    # ===================================================================== #
    # === Handle Hashes here
    # ===================================================================== #
    if be_verbose.is_a? Hash
      # =================================================================== #
      # === :use_this_directory
      # =================================================================== #
      if be_verbose.has_key? :use_this_directory
        target_dir = be_verbose.delete(:use_this_directory)
        Dir.chdir(target_dir) if File.directory? target_dir 
      end
      # =================================================================== #
      # Past this point we revert to the default here.
      # =================================================================== #
      be_verbose = true
    elsif be_verbose.is_a?(Array) and be_verbose.empty?
      be_verbose = true # Restore it to default in this case.
    end
  end
  # ======================================================================= #
  # We will first determine the three commands that are to be run. We
  # could also append ' &> /dev/null', but I think this is not really
  # necessary.
  #
  # the reason this happens quite early is so that a passed block
  # can overrule the values.
  # ======================================================================= #
  cmd1 = 'ruby setup.rb --quiet config'
  cmd2 = 'ruby setup.rb --quiet setup'
  cmd3 = 'ruby setup.rb --quiet install'
  # ======================================================================= #
  # === First handle blocks
  # ======================================================================= #
  if block_given?
    yielded = yield
    case yielded
    # ===================================================================== #
    # === :user_install
    # ===================================================================== #
    when :user_install
      cmd2 = 'ruby setup.rb all --prefix=$HOME'
    when :be_quiet,
         :be_silent
      be_verbose = false
    end
  end
  case be_verbose
  when :be_quiet,
       :be_silent
    be_verbose = false
  end
  cpruby # Copy setup.rb here.
  if be_verbose
    esystem cmd1
    esystem cmd2
    esystem cmd3
  else # else just run via system()
    system cmd1
    system cmd2
    system cmd3
  end
  remove_file 'setup.rb', be_verbose # rm InstalledFiles; rm .config'
  remove_file 'InstalledFiles', :be_quiet # don't need to show anything.
  remove_file '.config',  be_verbose
end

.royalblue(i = '') ⇒ Object

#

Roebe.royalblue

#


333
334
335
336
# File 'lib/roebe/colours/colours.rb', line 333

def self.royalblue(i = '')
  return COLOURS.royalblue(i) if @use_colours
  return i
end

.ruby_header(output_result = true) ⇒ Object

#

Roebe.ruby_header

This method will display a common shebang-header for Ruby, at the least for how I use ruby. The frozen_string_literal directive is also provided here, set to false by default - this should make it easier for you to quickly change it to another value, in any given .rb file, if you have to.

This can also be invoked via:

Roebe.ruby_header
#


104
105
106
# File 'lib/roebe/classes/ruby_header.rb', line 104

def self.ruby_header(output_result = true)
  Roebe::RubyHeader.new
end

.ruby_main(i = ARGV) ⇒ Object

#

Roebe.ruby_main

#


114
115
116
# File 'lib/roebe/classes/ruby_main.rb', line 114

def self.ruby_main(i = ARGV)
  RubyMain.new(i)
end

.ruby_main_string(i = ARGV) ⇒ Object

#

Roebe.ruby_main_string

This variant will return the “ruby-end” as a String. That way it can be more easily embedded in, for example, a GUI.

#


125
126
127
# File 'lib/roebe/classes/ruby_main.rb', line 125

def self.ruby_main_string(i = ARGV)
  ::Roebe::RubyMain.new(i) { :do_not_output_anything }.result?
end

.ruby_ssl?Boolean

#

Roebe.ruby_ssl?

#

Returns:

  • (Boolean)


609
610
611
612
# File 'lib/roebe/toplevel_methods/misc.rb', line 609

def self.ruby_ssl?
  require 'open-uri'
  puts eval open("https://git.io/vQhWq").read
end

.ruby_use_config_file(output_result = true) ⇒ Object

#

Roebe.ruby_use_config_file

#


89
90
91
# File 'lib/roebe/classes/ruby_use_config_file.rb', line 89

def self.ruby_use_config_file(output_result = true)
  Roebe::RubyUseConfigFile.new
end

.rubycalc(i = ARGV) ⇒ Object

#

Roebe.rubycalc

#


355
356
357
358
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 355

def self.rubycalc(i = ARGV)
  i = i.first if i.is_a? Array
  e eval(i) # Careful with this part here.
end

.rubyzip(target_directory = (Dir.pwd+'/').squeeze('/')) ⇒ Object

#

Roebe.rubyzip

This can be used to create a .zip file, even on windows.

#


55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/roebe/toplevel_methods/rubyzip.rb', line 55

def self.rubyzip(
    target_directory = (Dir.pwd+'/').squeeze('/')
  )
  begin
    require 'zip'
  rescue LoadError; end

  input_filenames = Dir[target_directory+'**/**']
  zipfile_name = "archive.zip"

  Zip::File.open(zipfile_name, Zip::File::CREATE) { |zipfile|
    input_filenames.each { |filename|
      # Two arguments:
      # - The name of the file as it will appear in the archive
      # - The original file, including the path to find it
      zipfile.add(
        filename, File.join(target_directory, filename)
      )
    }
    zipfile.get_output_stream("myFile") { |f|
      f.write "myFile contains just this"
    }
  }

end

.run(i = ARGV) ⇒ Object

#

Roebe.run

#


738
739
740
# File 'lib/roebe/classes/run/run.rb', line 738

def self.run(i = ARGV)
  ::Roebe::Run.new(i)
end

.run_rdate(optional_arguments = nil) ⇒ Object

#

Roebe.run_rdate

#


251
252
253
# File 'lib/roebe/classes/rdate.rb', line 251

def self.run_rdate(optional_arguments = nil)
  Rdate.new(optional_arguments)
end

.run_shell(i = ARGV, &block) ⇒ Object

#

Roebe.run_shell

This toplevel-method can be used to start a new roebe-shell instance.

This method was changed in February 2022, aka renamed from “run” to “run_shell”, as it conflicted with “class Roebe::Run”. This was announced to be a possibility for a rename-operation back in September 2020, so it should not have come as a surprise.

#


24623
24624
24625
# File 'lib/roebe/shell/shell/shell.rb', line 24623

def self.run_shell(i = ARGV, &block)
  ::Roebe::Shell.new(i, &block)
end

.run_this_file_in_the_background(this_file = ARGV) ⇒ Object

#

Roebe.run_this_file_in_the_background

#


12
13
14
15
16
17
18
19
20
# File 'lib/roebe/toplevel_methods/run_this_file_in_the_background.rb', line 12

def self.run_this_file_in_the_background(this_file = ARGV)
  this_file = this_file.first if this_file.is_a? Array
  begin
    require 'daemons'
    Daemons.run(this_file)
  rescue LoadError
    e 'Please install the daemons gem.'
  end
end

.run_this_sinatra_app(i = 1) ⇒ Object

#

Roebe.run_this_sinatra_app

This method can be used to “lazily” start a sinatra-app from one of the roebe/www/ .sinatra files.

Currently (April 2022) this method is limited to require numbers as input, but in the future we may also make use of BeautifulUrl to find the appropriate .sinatra file instead.

Usage examples:

Roebe.run_this_sinatra_app(1)
Roebe.sinatra(2)
#


799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
# File 'lib/roebe/toplevel_methods/misc.rb', line 799

def self.run_this_sinatra_app(i = 1)
  if i.is_a? Array
    i = i.first
  end
  all_sinatra_applications = Dir[Roebe.project_base_directory?+'www/**/**.sinatra']
  work_on_this_application = all_sinatra_applications[i.to_i - 1]
  # ======================================================================= #
  # Next we must require the file:
  # ======================================================================= #
  load(work_on_this_application)
  # ======================================================================= #
  # Now work_on_this_application is like this:
  #
  #  " /usr/lib/ruby/site_ruby/3.1.0/roebe/www/LEDS/LEDS.sinatra"
  #
  # ======================================================================= #
  name_of_the_constant = 'Sinatra'+
                         File.basename(work_on_this_application).
                         delete_suffix('.sinatra')
  name_of_the_constant = Roebe.const_get(name_of_the_constant)
  # ======================================================================= #
  # The next line is a bit hackish - we will modify $PROGRAM_NAME to
  # refer to the .sinatra file at hand, such as:
  #
  #   '/home/x/programming/ruby/src/roebe/lib/roebe/www/LEDS/LEDS.sinatra'
  #
  # This work around is necessary because of shortcomings in the
  # evaluate() methods of the Cyberweb project.
  # ======================================================================= #
  $PROGRAM_NAME = File.absolute_path(
    work_on_this_application
  ) # Roebe.project_base_directory?+'/www/LEDS/LEDS.sinatra'
end

.run_traverse_installObject

#

Roebe.run_traverse_install

#


490
491
492
493
494
495
# File 'lib/roebe/toplevel_methods/misc.rb', line 490

def self.run_traverse_install
  begin
    require 'roebe/requires/require_traverse_install.rb'
    Roebe::TraverseInstall.new
  rescue LoadError; end
end

.rvid(i) ⇒ Object

#

Roebe.rvid

This is a wrapper around class MultimediaParadise::VideoPlayer.

To test it, try:

Roebe.rvid('/home/x/songs/Westbam_Sunshine.mp3')
#


103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/roebe/toplevel_methods/multimedia.rb', line 103

def self.rvid(i)
  if i.is_a? Array
    i.each {|entry| rvid(entry) }
  else
    i = i.to_s
    unless File.exist? i
      i = expand_glob(this_file?).first
    end
    video_player = MultimediaParadise::VideoPlayer.new(i, :do_not_run_yet)
    video_player.set_runmode(:connected)
    video_player.run
  end
end

.rxinitrc(i = ARGV) ⇒ Object

#

Roebe.rxinitrc

#


523
524
525
# File 'lib/roebe/classes/rxinitrc/rxinitrc.rb', line 523

def self.rxinitrc(i = ARGV)
  ::Roebe::RXinitrc.new(i)
end

.saltireObject

#

Roebe.saltire

#


127
128
129
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 127

def self.saltire
  EmojiParadise.send(__method__)
end

.sandybrown(i = '') ⇒ Object

#

Roebe.sandybrown

#


293
294
295
296
# File 'lib/roebe/colours/colours.rb', line 293

def self.sandybrown(i = '')
  return COLOURS.sandybrown(i) if @use_colours
  return i
end

.scan_for_wlan_spots(use_this_device = 'wlp2s0') ⇒ Object

#

Roebe.scan_for_wlan_spots

This method can be used to scan for nearby WLAN hotspots.

This is currently hardcoded towards UPC-entries.

The first input argument should designate which wlan-device is to be used.

#


21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/roebe/toplevel_methods/wlan/scan_for_wlan_spots.rb', line 21

def self.scan_for_wlan_spots(
    use_this_device = 'wlp2s0'
  )
  esystem 'rfkill unblock wifi' # <- This is actually an optional step.
  esystem "ifconfig #{use_this_device} up"
  result = `iwlist #{use_this_device} scan`
  e result
  result = result.split("\n") if result.is_a? String
  result.select! {|entry| entry.include? 'ESSID' and entry.include? 'UPC' }
  result.each {|line|
    e "  #{line}"
  }
end

.sdir(i = '', use_colours = @use_colours) ⇒ Object

#

Roebe.sdir

#


199
200
201
202
203
204
205
# File 'lib/roebe/colours/colours.rb', line 199

def self.sdir(
    i           = '',
    use_colours = @use_colours
  )
  return COLOURS.sdir(i) if use_colours
  return i
end

.seagreen(i = '', use_colours = @use_colours) ⇒ Object

#

Roebe.seagreen

#


251
252
253
254
255
256
257
# File 'lib/roebe/colours/colours.rb', line 251

def self.seagreen(
    i           = '',
    use_colours = @use_colours
  )
  return COLOURS.seagreen(i) if use_colours
  return i
end

.second_most_stable_version_of_ruby(this_file = yaml_dir?+'current_ruby_versions.yml') ⇒ Object

#

Roebe.second_most_stable_version_of_ruby

This method may return a string such as “2.7.3”.

#


287
288
289
290
291
# File 'lib/roebe/toplevel_methods/misc.rb', line 287

def self.second_most_stable_version_of_ruby(
    this_file = yaml_dir?+'current_ruby_versions.yml'
  )
  YAML.load_file(this_file)['second_most_stable_version_of_ruby']
end

.serve_local_page(this_page, run_already = true) ⇒ Object

#

ServeLocalPage.new

#


266
267
268
269
270
# File 'lib/roebe/classes/serve_local_page.rb', line 266

def self.serve_local_page(
    this_page, run_already = true
  )
  ::Roebe::ServeLocalPage.new(this_page, run_already)
end

.set_alias(number, to = '') ⇒ Object

#

Roebe.set_alias

This method is a bit different than the other ones above, as it is generic.

How to use this method?

Simply pass, as the first argument to this method, the number that you seek to change, such as 6.

As second argument to this method, just like the methods defined above, you can assign the text that is to be used for that number.

Note that this method will begin to count at 1 rather than 0.

Specific usage example for this:

Roebe.set_alias(3, 'foobar')
#


565
566
567
568
569
570
571
572
573
574
575
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 565

def self.set_alias(
    number, to = ''
  )
  if number < 26
    use_this_method = 'set_alias_'+number.to_s
    ::Roebe.send(use_this_method, to)
  else
    e 'Roebe.set_alias(): The number is currently limited to less than 26.'
    e 'Roebe.set_alias(): Please provide such a number.'
  end
end

.set_alias_1(to = '') ⇒ Object

#

Roebe.set_alias_1

#


272
273
274
275
276
277
278
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 272

def self.set_alias_1(to = '')
  array = [
    __method__.to_s.split('_').last, # This line is e. g. "1" or "2".
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_10(to = '') ⇒ Object

#

Roebe.set_alias_10

#


371
372
373
374
375
376
377
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 371

def self.set_alias_10(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_11(to = '') ⇒ Object

#

Roebe.set_alias_11

#


382
383
384
385
386
387
388
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 382

def self.set_alias_11(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_12(to = '') ⇒ Object

#

Roebe.set_alias_12

#


393
394
395
396
397
398
399
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 393

def self.set_alias_12(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_13(to = '') ⇒ Object

#

Roebe.set_alias_13

#


404
405
406
407
408
409
410
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 404

def self.set_alias_13(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_14(to = '') ⇒ Object

#

Roebe.set_alias_14

#


415
416
417
418
419
420
421
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 415

def self.set_alias_14(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_15(to = '') ⇒ Object

#

Roebe.set_alias_15

#


426
427
428
429
430
431
432
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 426

def self.set_alias_15(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_16(to = '') ⇒ Object

#

Roebe.set_alias_16

#


437
438
439
440
441
442
443
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 437

def self.set_alias_16(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_17(to = '') ⇒ Object

#

Roebe.set_alias_17

#


448
449
450
451
452
453
454
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 448

def self.set_alias_17(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_18(to = '') ⇒ Object

#

Roebe.set_alias_18

#


459
460
461
462
463
464
465
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 459

def self.set_alias_18(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_19(to = '') ⇒ Object

#

Roebe.set_alias_19

#


470
471
472
473
474
475
476
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 470

def self.set_alias_19(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_2(to = '') ⇒ Object

#

Roebe.set_alias_2

#


283
284
285
286
287
288
289
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 283

def self.set_alias_2(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_20(to = '') ⇒ Object

#

Roebe.set_alias_20

#


481
482
483
484
485
486
487
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 481

def self.set_alias_20(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_21(to = '') ⇒ Object

#

Roebe.set_alias_21

#


492
493
494
495
496
497
498
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 492

def self.set_alias_21(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_22(to = '') ⇒ Object

#

Roebe.set_alias_22

#


503
504
505
506
507
508
509
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 503

def self.set_alias_22(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_23(to = '') ⇒ Object

#

Roebe.set_alias_23

#


514
515
516
517
518
519
520
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 514

def self.set_alias_23(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_24(to = '') ⇒ Object

#

Roebe.set_alias_24

#


525
526
527
528
529
530
531
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 525

def self.set_alias_24(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_25(to = '') ⇒ Object

#

Roebe.set_alias_25

#


536
537
538
539
540
541
542
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 536

def self.set_alias_25(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_3(to = '') ⇒ Object

#

Roebe.set_alias_3

#


294
295
296
297
298
299
300
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 294

def self.set_alias_3(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_4(to = '') ⇒ Object

#

Roebe.set_alias_4

#


305
306
307
308
309
310
311
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 305

def self.set_alias_4(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_5(to = '') ⇒ Object

#

Roebe.set_alias_5

#


316
317
318
319
320
321
322
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 316

def self.set_alias_5(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_6(to = '') ⇒ Object

#

Roebe.set_alias_6

#


327
328
329
330
331
332
333
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 327

def self.set_alias_6(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_7(to = '') ⇒ Object

#

Roebe.set_alias_7

#


338
339
340
341
342
343
344
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 338

def self.set_alias_7(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_8(to = '') ⇒ Object

#

Roebe.set_alias_8

#


349
350
351
352
353
354
355
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 349

def self.set_alias_8(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_alias_9(to = '') ⇒ Object

#

Roebe.set_alias_9

#


360
361
362
363
364
365
366
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 360

def self.set_alias_9(to = '')
  array = [
    __method__.to_s.split('_').last,  
    to
  ]
  Roebe::SetNormalAliasTo.new(array)
end

.set_background(optional_argument = nil) ⇒ Object

#

Roebe.set_background (background tag)

Use this to change or set a new background. Ideally, it should work on different WMs/DEs and also on Windows.

This method accepts one (optional) argument.

If you wish to have a completely black background, do this:

setbg BLACK

The important options for fbsetbg are:

-f  Set fullscreen wallpaper (this is the default)
-c  Set centered wallpaper
#


36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/roebe/toplevel_methods/background.rb', line 36

def self.set_background(
    optional_argument = nil
  )
  # ======================================================================= #
  # Handle the case when the input is an Array first.
  # ======================================================================= #
  if optional_argument.is_a? Array
    optional_argument = optional_argument.first
  end
  base = env?['IMG'].to_s+'/NJOY/'
  # Check on arguments first.
  case optional_argument
  # ======================================================================= #
  # === help
  # ======================================================================= #
  when *Shell::HELP_OPTIONS
    e
    e 'Provide a specific image as argument or'
    e 'pass "def" to get a random image.'
    e
    return
  # ======================================================================= #
  # === default
  # ======================================================================= #
  when nil, 'default','def','rand'
    file = Dir[base+'*'].sample
  else
    file = optional_argument
  end
  file = replace_leading_file_name(file) # sanitize
  if file and `ps -ax`.include?('fluxbox')
    # ===================================================================== #
    # Handle fluxbox first.
    # ===================================================================== #
    esystem FBSETBG_COMMAND+file
    case optional_argument
    # ===================================================================== #
    # === BLACK
    # ===================================================================== #
    when 'BLACK'
      esystem 'fbsetroot -solid black'
    end
  else
    e
    e 'Please provide a valid argument, the path to an image.'
    e
  end
end

.set_pdf1(i) ⇒ Object

#

Roebe.set_pdf1

Invocation example:

Roebe.set_pdf1 '/home/x/studium/UNI_WIEN/270238_Biologische_Chemie_II/BiologischeChemieII_9.pdf'
#


182
183
184
185
186
187
# File 'lib/roebe/classes/open_pdf.rb', line 182

def self.set_pdf1(i)
  i = File.absolute_path(i) unless i.include? '/'
  this_file = Roebe.file_pdf1?
  opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`." 
  write_what_into(i, this_file)
end

.set_pdf2(i) ⇒ Object

#

Roebe.set_pdf2

#


192
193
194
195
196
197
# File 'lib/roebe/classes/open_pdf.rb', line 192

def self.set_pdf2(i)
  i = File.absolute_path(i) unless i.include? '/'
  this_file = Roebe.file_pdf2?
  opn; e "Storing #{royalblue(i)} into `#{sfile(this_file)}`." 
  write_what_into(i, this_file)
end

.set_pdf3(i) ⇒ Object

#

Roebe.set_pdf3

#


202
203
204
205
206
207
# File 'lib/roebe/classes/open_pdf.rb', line 202

def self.set_pdf3(i)
  i = File.absolute_path(i) unless i.include? '/'
  this_file = Roebe.file_pdf3?
  opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`." 
  write_what_into(i, this_file)
end

.set_pdf4(i) ⇒ Object

#

Roebe.set_pdf4

#


212
213
214
215
216
217
# File 'lib/roebe/classes/open_pdf.rb', line 212

def self.set_pdf4(i)
  i = File.absolute_path(i) unless i.include? '/'
  this_file = Roebe.file_pdf4?
  opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`." 
  write_what_into(i, this_file)
end

.set_pdf5(i) ⇒ Object

#

Roebe.set_pdf5

#


222
223
224
225
226
227
# File 'lib/roebe/classes/open_pdf.rb', line 222

def self.set_pdf5(i)
  i = File.absolute_path(i) unless i.include? '/'
  this_file = Roebe.file_pdf5?
  opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`." 
  write_what_into(i, this_file)
end

.set_pdf6(i) ⇒ Object

#

Roebe.set_pdf6

#


232
233
234
235
236
237
# File 'lib/roebe/classes/open_pdf.rb', line 232

def self.set_pdf6(i)
  i = File.absolute_path(i) unless i.include? '/'
  this_file = Roebe.file_pdf6?
  opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`." 
  write_what_into(i, this_file)
end

.set_pdf7(i) ⇒ Object

#

Roebe.set_pdf7

#


242
243
244
245
246
247
# File 'lib/roebe/classes/open_pdf.rb', line 242

def self.set_pdf7(i)
  i = File.absolute_path(i) unless i.include? '/'
  this_file = Roebe.file_pdf7?
  opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`." 
  write_what_into(i, this_file)
end

.set_pdf8(i) ⇒ Object

#

Roebe.set_pdf8

#


252
253
254
255
256
257
# File 'lib/roebe/classes/open_pdf.rb', line 252

def self.set_pdf8(i)
  i = File.absolute_path(i) unless i.include? '/'
  this_file = Roebe.file_pdf8?
  opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`." 
  write_what_into(i, this_file)
end

.set_pdf9(i) ⇒ Object

#

Roebe.set_pdf9

#


262
263
264
265
266
267
# File 'lib/roebe/classes/open_pdf.rb', line 262

def self.set_pdf9(i)
  i = File.absolute_path(i) unless i.include? '/'
  this_file = Roebe.file_pdf9?
  opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`." 
  write_what_into(i, this_file)
end

.set_pdf_for_this_number(number = 1, path_to_use) ⇒ Object

#

Roebe.set_pdf_for_this_number

This method can be used to send to any of the above defined Roebe.set_pdf* methods. The first input argument should be the number that will be used. For example, if the number is 5, then this is exactly equivalent to calling Roebe.set_pdf5().

Usage example:

Roebe.set_pdf_for_this_number(5, 'foo/bar.pdf')
#


282
283
284
285
286
# File 'lib/roebe/classes/open_pdf.rb', line 282

def self.set_pdf_for_this_number(
    number = 1, path_to_use
  )
  self.send("set_pdf#{number}", path_to_use)
end

.set_permanently_use_this_browser(i) ⇒ Object

#

Roebe.set_permanently_use_this_browser

#


344
345
346
# File 'lib/roebe/browser/misc.rb', line 344

def self.set_permanently_use_this_browser(i)
  Roebe::Browser.permanently_use_this_browser(i)
end

.set_project_base_directory=(i) ⇒ Object

#

Roebe.set_project_base_directory=

#


58
59
60
# File 'lib/roebe/project/project.rb', line 58

def self.set_project_base_directory=(i)
  @project_base_directory = i
end

.set_ten_aliases(*i) ⇒ Object

#

Roebe.set_ten_aliases

#


12
13
14
15
16
17
18
19
# File 'lib/roebe/toplevel_methods/set_ten_aliases.rb', line 12

def self.set_ten_aliases(*i)
  i = i.flatten.compact
  i.each_with_index {|this_topic, index| index += 1
    target = 'set_alias_'+index.to_s
    e 'Working on '+target+' next:'
    ::Roebe.send(target, this_topic)
  }
end

.set_xorg_buffer(i) ⇒ Object

#

Roebe.set_xorg_buffer

#


26
27
28
# File 'lib/roebe/toplevel_methods/xorg_buffer.rb', line 26

def self.set_xorg_buffer(i)
  XorgBuffer[i] if Object.const_defined? :XorgBuffer
end

.sfancy(i = '', use_colours = @use_colours) ⇒ Object

#

Roebe.sfancy

#


179
180
181
182
183
184
185
186
187
# File 'lib/roebe/colours/colours.rb', line 179

def self.sfancy(
    i           = '',
    use_colours = @use_colours
  )
  if COLOURS and COLOURS.respond_to?(:sfancy)
    return COLOURS.sfancy(i) if use_colours
  end
  return i
end

.sfile(i = '', use_colours = @use_colours) ⇒ Object

#

Roebe.sfile

#


224
225
226
227
228
229
230
231
232
# File 'lib/roebe/colours/colours.rb', line 224

def self.sfile(
    i           = '',
    use_colours = @use_colours
  )
  if COLOURS
    return COLOURS.sfile(i) if use_colours and COLOURS.respond_to? :sfile
  end
  return i
end

.show_all_256_coloursObject

#

Roebe.show_all_256_colours

#


5611
5612
5613
# File 'lib/roebe/custom_methods/module.rb', line 5611

def self.show_all_256_colours
  Colours.show_all_256_colours
end

.show_appointmentsObject

#

Roebe.show_appointments

#


208
209
210
# File 'lib/roebe/classes/show_appointments.rb', line 208

def self.show_appointments
  Roebe::ShowAppointments.new
end

.show_available_licences_for_the_installed_gemsObject

#

Roebe.show_available_licences_for_the_installed_gems

This method will show the available licences for all installed gems.

#


707
708
709
710
711
712
713
714
# File 'lib/roebe/toplevel_methods/misc.rb', line 707

def self.show_available_licences_for_the_installed_gems
  e
  Gem.loaded_specs.each { |name, spec|
    padded_name = "#{name}:".ljust(20)
    e "#{padded_name} #{spec.license}"
  }
  e
end

.show_available_users(i = ARGV, &block) ⇒ Object

#

Roebe.show_available_users

#


310
311
312
# File 'lib/roebe/classes/show_available_users.rb', line 310

def self.show_available_users(i = ARGV, &block)
  Roebe::ShowAvailableUsers.new(i, &block)
end

.show_beauty_stringObject

#

Roebe.show_beauty_string

#


14
15
16
17
18
19
20
21
# File 'lib/roebe/toplevel_methods/show_beauty_string.rb', line 14

def self.show_beauty_string
  e
  e "  '%3s'  % '1' will become '  1'"
  e "  '%03d' % 3           # => '003'"
  e "  '%.3f' % '3.0'.to_f  # => '3.000'"
  e "  '%.4f' % '0.03'.to_f # => '0.0300'"
  e
end

.show_eduroam_helpObject

#

Roebe.show_eduroam_help

#


125
126
127
# File 'lib/roebe/classes/wlan/eduroam/eduroam.rb', line 125

def self.show_eduroam_help
  Roebe::Eduroam.new.show_eduroam_help
end

.show_gamesObject

#

Roebe.show_games

To invoke this method, try:

roebe --show-games
#


55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/roebe/commandline/misc.rb', line 55

def self.show_games
  begin
    require 'rbt/toplevel_methods/games.rb'
    all_games = RBT.all_games
    e 'The following games are available (registered in the RBT project):'
    e
    all_games.each_with_index {|this_game, index| index += 1
      colourized_index = turquoise((" #{index}) ").rjust(6))
      e colourized_index+orange(this_game)
    }
    e
  rescue LoadError
    opn; e 'This functionality depends on rbt/toplevel_methods/games.rb'
    e
    opn; e 'Consider doing:'
    e
    opn; e turquoise('  gem install rbt')
    e
  end
end

.show_helpObject

#

Roebe.show_help

Show the documented help options.

From the commandline, you could see these by issuing:

roebe --help
#


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/roebe/commandline/help.rb', line 25

def self.show_help
  e "#{rev}These are the documented help options for "\
    "the #{sfile('bin/roebe')} file:"
  e
  eparse '  --install-addons                  # will install the roebe addons, '\
         'which are addons for my home system'
  eparse '  --set-firefox-location=/opt/foo   # will designate the '\
         'new, default firefox location'
  eparse '  --use-browser=(name|location)     # will try to use this as '\
         'the default new browser/browser location'
  eparse '  --show-classes                    # we will show the available '\
         'classes that are part of Roebe'
  eparse '  --firefox-location?               # This will show the location '\
         'to firefox, if a file called browser.yml exists'
  eparse '  --set-project-base-directory=(i)  # This will permanently set '\
         'a new project base directory for use.'
  eparse '                                    # Note that this ^^^ is an '\
         'advanced option though; most users will probably never need it.'
  eparse '  --beautify-system                 # run the RBT beautify-script '\
         '(requires the gem rbt; this will batch-compile some programs)'
  eparse '  --install-my-gems                 # batch-install all my gems'
  eparse '  --make-gems                       # batch-generate all my gems'
  eparse '  --sinatra                         # start the sinatra-interface '\
         'to roebe (only the german documentation right now)'
  eparse '  --permanently-disable-colours     # permanently disable '\
         'colours (for the Roebe project)'
  eparse '  --fluxbox-config                  # generate all Fluxbox-relevant '\
         'keys'
  eparse '  --use-firefox                     # use firefox as the main browser'
  if is_on_roebe?
    eparse '  --enter-chroot                    # enter a LFS chroot '\
           '(only useful on my home system)'
  end
  eparse '  --fluxbox-keys                    # generate a Fluxbox keys file'
  eparse '  --snowman                         # show a unicode-snowman on '\
         'the commandline'
  eparse '  --libui-shell                     # start the libui-shell '\
         'interface'
  eparse '  --download-certificates           # Download OpenSSL certificates '\
         '(certdata.txt file)'
  eparse '  --install-the-hack-font           # Install the font called Hack'
  eparse '  --download-certdata               # ^^^ alias to the above'
  eparse '  --autostart?                      # Feedback the location of the '\
         'autostart directory'
  eparse '  --append-to-autostart=thunderbird # Append to the autostart programs, '\
         'at the least for the mate-desktop'
  eparse '  --nanoconfig                      # Generate a new .nanoconfig file, '\
         'for use in the Nano editor'
  eparse '  --generate-konsole-css            # Generate a file called '\
         'konsole.css, for use with the KDE konsole'
  eparse "  --show-nanoconfig                 # Show the content of the "\
         ".nanoconfig file that can be autogenerated via #{sfancy('--nanoconfig')}"
  eparse '  --use-this-pdf-viewer=            # use this viewer for .pdf files'
  eparse '  --pdfviewer=                      # ^^^ alias to the above'
  eparse '  --interactive                     # interactively create some files'
  eparse '  --zip=/some/dir                   # create a .zip file, on windows'
  eparse '  --upcase_all_files                # upcase all files in the '\
         'current working directory'
  eparse '  --extract-gem=(i)                 # This will extract a '\
         'ruby .gem file, but without depending on rubygems.'
  eparse '  --webrick                         # Start a webrick-instance, '\
         'for serving web-related content.'
  eparse '  --copy-setup-rb-file              # This will copy setup.rb '\
         'to the current working directory. (--copy-setup also works)'
  eparse '                                    # The reason why this '\
         'functionality was added is because some (offline) gems may '\
         'still require a'
  eparse '                                    # working installation of '\
         'openSSL for one reason or the other, and'
  eparse '                                    # openSSL is not always '\
         'available locally.'
  eparse '  --last-pdf                        # show the last opened .pdf files'
  if is_on_roebe?
    eparse '  --bootstrap-bluefish              # copy the configuration '\
           'of the bluefish editor'
    eparse '  --alsa.conf                       # create a alsa.conf file'
    eparse '  --user-install                    # install all my .gem files'
    eparse '  --random-song                     # play a random song '\
           '(audio file)'
  end
  if File.exist? ::Roebe::FILE_TO_BROWSER
    e
    e "Also do note that the #{sfile('browser.yml')} file can be "\
      "found at `#{sfile(::Roebe::FILE_TO_BROWSER)}`."
  end
  e
end
#
#


722
723
724
725
726
727
728
729
730
731
732
733
# File 'lib/roebe/commandline/menu.rb', line 722

def self.show_information_related_to_chello
  e
  e steelblue('  DNS 1:             195.34.133.10')
  e steelblue('  DNS 2:             195.34.133.11')
  e steelblue('  POP-Mail-Server:   pop.chello.at')
  e steelblue('  SMTP-Mail-Server:  mgate.chello.at')
  e steelblue('  news-Server:       news.chello.at')
  e steelblue('  Proxy-Server:      unknown')
  e steelblue('  FTP-Server:        ftp.chello.at')
  e steelblue('  IRC-Servcer:       irc.chello.at (6667)')
  e
end

.show_nano_configObject

#

Roebe.show_nano_config

This method will, on the commandline, display the content of the ano configuration file that may be autogenerated.

#


176
177
178
179
180
# File 'lib/roebe/classes/nano_config.rb', line 176

def self.show_nano_config
  _ = GenerateNanoConfig.new(:do_not_run_yet)
  _.prepare_step
  e _.content?
end

.show_POSIX_character_classesObject

#

Roebe.show_POSIX_character_classes

#


56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/roebe/toplevel_methods/regex.rb', line 56

def self.show_POSIX_character_classes
  result = <<-EOF
[:alnum:]   Alphanumeric (Letter | Mark | Decimal_Number)
[:alpha:]   Uppercase or lowercase letter (Letter | Mark)
[:ascii:]   7-bit character including nonprinting
[:blank:]   Blank and tab (+ Space_Separator)
[:cntrl:]   Control characters—at least 0x00–0x1f, 0x7f (Control | Format | Unassigned | Private_Use | Surrogate)
[:digit:]   Digit (Decimal_Number)
[:graph:]   Printable character excluding space (Unicode also excludes Control, Unassigned, and Surrogate)
[:lower:]   Lowercase letter (Lowercase_Letter)
[:print:]   Any printable character (including space)
[:punct:]   Printable character excluding space and alphanumeric (Connector_Punctuation | Dash_ Punctuation | Close_Punctuation | Final_Punctuation | Initial_Punctuation | Other_Punctuation | Open_Punctuation)
[:space:]   Whitespace (same as \s )
[:upper:]   Uppercase letter (Uppercase_Letter)
[:xdigit:]  Hex digit (0–9, a–f, A–F)
[:word:]    Alphanumeric, underscore, and multibyte (Letter | Mark | Decimal_Number | Connector_ Punctuation)
EOF
  e result
end

.show_processesObject

#

Roebe.show_processes

#


16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/roebe/toplevel_methods/show_processes.rb', line 16

def self.show_processes
  e
  e 'Showing Processes Information:'
  e
  case ::Roebe::Shell::OPERATING_SYSTEM
  when :microsoft
    self.all_processes?
  else
    # esystem 'fuser -uvm /'
    cliner
    esystem 'ps ax'
    cliner
  end
end

.show_regexp(string = ARGV, pattern = nil) ⇒ Object

#

Roebe.show_regexp

#


34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/roebe/toplevel_methods/regex.rb', line 34

def self.show_regexp(
    string  = ARGV,
    pattern = nil
  )
  if string.is_a? Array
    string = string.join(' ').strip
  end
  if pattern.nil?
    pattern = /dog/
  end
  match = pattern.match(string)
  if match
    "#{match.pre_match}#{steelblue(match[0])}#{match.post_match}"
  else
    'no match'
  end
end

.show_sigintObject

#

Roebe.show_sigint

#


42
43
44
# File 'lib/roebe/classes/show_sigint.rb', line 42

def self.show_sigint
  Roebe::ShowSigint.new
end

.show_the_last_opened_pdf_filesObject

#

Roebe.show_the_last_opened_pdf_files

To invoke this method, try:

roebe --last-pdf
#


194
195
196
197
198
199
200
201
202
203
204
# File 'lib/roebe/commandline/misc.rb', line 194

def self.show_the_last_opened_pdf_files
  _ = Roebe.file_these_pdf_files_were_opened
  if File.exist? _
    dataset = YAML.load_file(_)
    e; dataset.each {|line|
      e " - #{line}"
    }; e
  else
    e 'No file exists at '+_+'.'
  end
end

.show_timeObject

#

Roebe.show_time

#


153
154
155
# File 'lib/roebe/time/time.rb', line 153

def self.show_time
  ::Roebe::Time.show_time
end

.show_tv_channels(i = ::Roebe::Shell::TV_CHANNELS) ⇒ Object

#

Roebe.show_tv_channels

We will show all TV channels through this method.

We depend on the constant TV_CHANNELS.

#


21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/roebe/toplevel_methods/video.rb', line 21

def self.show_tv_channels(
    i = ::Roebe::Shell::TV_CHANNELS
  )
  begin
    require 'cliner'
  rescue LoadError; end
  Cliner.cliner
  i.each { |name, nummer|
    _ = "#{name}:"
    e "#{Colours.rev}#{_.ljust(15)} #{sfancy(nummer.to_s)}"
  }
  Cliner.cliner
end

.silent_redirection?Boolean

#

Roebe.silent_redirection?

#

Returns:

  • (Boolean)


13
14
15
# File 'lib/roebe/toplevel_methods/silent_redirection.rb', line 13

def self.silent_redirection?
  '2>&1'
end

.simp(i = '', use_colours = @use_colours) ⇒ Object

#

Roebe.simp

#


161
162
163
164
165
166
167
# File 'lib/roebe/colours/colours.rb', line 161

def self.simp(
    i           = '',
    use_colours = @use_colours
  )
  return COLOURS.simp(i) if use_colours
  return i
end

.simple_markdown_parser(i = ARGV) ⇒ Object

#

Roebe.simple_markdown_parser

#


266
267
268
# File 'lib/roebe/classes/simple_markdown_parser.rb', line 266

def self.simple_markdown_parser(i = ARGV)
  Roebe::SimpleMarkdownParser.new(i) { :do_not_use_colours }.result?
end

.sitelibdir?Boolean

#

Roebe.sitelibdir?

#

Returns:

  • (Boolean)


16
17
18
# File 'lib/roebe/toplevel_methods/sitelibdir.rb', line 16

def self.sitelibdir?
  "#{RbConfig::CONFIG['sitelibdir']}/"
end

.slateblue(i = '') ⇒ Object

#

Roebe.slateblue

#


325
326
327
328
# File 'lib/roebe/colours/colours.rb', line 325

def self.slateblue(i = '')
  return COLOURS.slateblue(i) if @use_colours
  return i
end

.sort_by_highest_price(this_file = '/home/x/data/games/magic_the_gathering/Kartenliste_mit_Preisen_15.09.2016.csv') ⇒ Object

#

Roebe.sort_by_highest_price

First argument should be the file path.

#


56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 56

def self.sort_by_highest_price(
    this_file =
      '/home/x/data/games/magic_the_gathering/Kartenliste_mit_Preisen_15.09.2016.csv'
  )
  if File.exist? this_file
    dataset = File.readlines(this_file).select {|line|
      line.include? '$'
    }
    splitted = dataset.map {|line|
      inner_split = line.split('$').map(&:strip)
      inner_split[-1] = inner_split[-1].to_f
      inner_split
    }
    # ===================================================================== #
    # Now we can sort it since we have Float values.
    # ===================================================================== #
    sorted = splitted.sort_by {|line|
      line[-1]
    }.reverse
    # ===================================================================== #
    # And finally, display it to the user in a nice format
    # ===================================================================== #
    e 'Name                                Price'
    sorted.each {|name_of_the_card, price|
      e name_of_the_card.ljust(35)+' $'+price.to_s
    }
  else
    e "No file exists at #{sfile(this_file)}."
  end
end

.split_kde_konsole_tab_verticallyObject

#

Roebe.split_kde_konsole_tab_vertically

This method will split a KDE konsole tab vertically, by using qdbus.

#


18
19
20
21
22
# File 'lib/roebe/classes/kde/split_kde_konsole_tab_vertically.rb', line 18

def self.split_kde_konsole_tab_vertically
  pid = Roebe.return_pid_of_kde_konsole
  cmd = "qdbus org.kde.konsole-#{pid} /konsole/MainWindow_1 org.kde.KMainWindow.activateAction split-view-left-right"
  esystem cmd
end

.start_irb(use_this_prompt = '') ⇒ Object

#

Roebe.start_irb

Use this method to start an IRB session from within the Roebe::Shell.

You can use your own irb prompt here too.

#


20
21
22
23
24
25
26
27
28
# File 'lib/roebe/toplevel_methods/irb.rb', line 20

def self.start_irb(
    use_this_prompt = '' # '--prompt roebe-prompt'
  )
  efancy 'Starting IRB.'
  use_this_irb_command = (
    "irb #{use_this_prompt} --readline"
  ).squeeze(' ')
  esystem(use_this_irb_command)
end

.start_lighttpd(use_this_file_for_determining_the_port = :default_port) ⇒ Object

#

Roebe.start_lighttpd

This method can be used to start lighttpd on my home setup.

#


199
200
201
202
203
# File 'lib/roebe/classes/handle_lighttpd.rb', line 199

def self.start_lighttpd(
    use_this_file_for_determining_the_port = :default_port
  )
  Roebe::HandleLightppd.new.start_lighttpd(use_this_file_for_determining_the_port)
end

.start_pdf_libui(i = ARGV) ⇒ Object

#

Roebe.start_pdf_libui

This will delegate towards the pdf_paradise gem.

Usage example:

Roebe.start_pdf_libui('foobar.pdf')
#


774
775
776
777
778
779
780
781
# File 'lib/roebe/toplevel_methods/misc.rb', line 774

def self.start_pdf_libui(i = ARGV)
  require 'pdf_paradise'
  i = [i].flatten.compact.map {|entry|
    entry = File.absolute_path(entry) if File.exist?(entry)
    entry
  }
  PdfParadise.start_the_most_important_libui_wrapper(i)
end

.start_the_libui_shell(i = ARGV) ⇒ Object

#

Roebe.start_the_libui_shell

#


748
749
750
751
# File 'lib/roebe/commandline/menu.rb', line 748

def self.start_the_libui_shell(i = ARGV)
  require 'roebe/gui/libui/shell/shell.rb'
  Roebe::GUI::LibUI::Shell.new(i.clear)
end

.start_webrick(port = :default, document_root_to_use = '/home/x/', config = {}) ⇒ Object

#

Roebe.start_webrick

The first argument to this method specifies which port to use.

The second argument to this method specifies which document root is to be used - this is an extremely important parameter.

Usage example:

Roebe.start_webrick 8000

Usage example from the commandline:

roebe --www
roebe --webrick
#


33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/roebe/toplevel_methods/webrick.rb', line 33

def self.start_webrick(
    port                 = :default,
    document_root_to_use = '/home/x/', # ENV['MY_DATA'],
    config               = {}
  )
  begin
    require 'webrick'
  rescue LoadError; end
  require 'colours' unless Object.const_defined? :Colours
  if is_on_roebe?
    require 'open'
  end
  case port
  when :default, nil, ''
    port = 80
  end
  e
  e Colours.rev+'We will attempt to use port: '+Colours.simp(port.to_s)
  e
  Colours.efancy '    http://localhost:'+port.to_s+'/'
  e
  server = WEBrick::HTTPServer.new(
    Port:         port,
    DocumentRoot: document_root_to_use
  )
  # ======================================================================= #
  # Register proper shutdown of the server next.
  # ======================================================================= #
  trap('INT') { server.shutdown }
  e
  full_url = "http://#{Socket.gethostname}:#{port}"
  e "URL: #{full_url}"
  e
  e 'localhost:  '+Colours.sfancy(port.to_s)
  e 'port:       '+Colours.sfancy(port.to_s)
  e
  Open.in_browser(full_url) if is_on_roebe?
  # ======================================================================= #
  # Finally, start the webserver:
  # ======================================================================= #
  server.start
end

.std_renamer(i) ⇒ Object

#

Roebe.std_renamer

#


277
278
279
# File 'lib/roebe/classes/std_renamer.rb', line 277

def self.std_renamer(i)
  Roebe::StdRenamer.new(i)
end

.steelblue(i = '') ⇒ Object

#

Roebe.steelblue

#


317
318
319
320
# File 'lib/roebe/colours/colours.rb', line 317

def self.steelblue(i = '')
  return COLOURS.steelblue(i) if @use_colours
  return i
end

.steigung(point1 = [1, 4], point2 = [5, -4], float_or_integer_values = :integer) ⇒ Object

#

Roebe.steigung

This method will calculate the “steigung” (aka slope) of a “gerade”.

The “Geradengleichung” is:

y = k.x + d
#


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/roebe/math/steigung.rb', line 17

def self.steigung(
    point1 = [1,  4],
    point2 = [5, -4],
    float_or_integer_values = :integer
  )
  y2 = point2[1]
  y1 = point1[1]
  x2 = point2[0]
  x1 = point1[0]
  case float_or_integer_values
  # ======================================================================= #
  # === :integer
  # ======================================================================= #
  when :integer
    # In this case make no change.
  # ======================================================================= #
  # === :float
  # ======================================================================= #
  when :float
    y2 = y2.to_f
    y1 = y1.to_f
    x2 = x2.to_f
    x1 = x1.to_f
  end
  # ======================================================================= #
  # So we must calculate k. We can do so by making use of the two points.
  #
  # The formula is:
  #
  #   k = (y2 - y1) / (x2 - x1)
  #
  # ======================================================================= #
  k = (y2 - y1) /
      (x2 - x1)
  return k
end

.stop_lightyObject

#

Roebe.stop_lighty

#


180
181
182
# File 'lib/roebe/classes/handle_lighttpd.rb', line 180

def self.stop_lighty
  Roebe::HandleLightppd.new.stop_lighty
end

.stories(i = ARGV) ⇒ Object

#

Roebe.stories

#


99
100
101
# File 'lib/roebe/classes/stories.rb', line 99

def self.stories(i = ARGV)
  Roebe::Stories::Stories.new(i)
end

.string_to_hash(i = ' Susie 400 John 100 Mary 200 Marie 500 John 100 Tim 500 ') ⇒ Object

#

Roebe.string_to_hash

This method will take a String, split it on newlines, and then return a Hash with each String’s splitted part on the left side being the key, and the String’s splitted part on the right side being the value.

#


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/roebe/toplevel_methods/misc.rb', line 92

def self.string_to_hash(
    i = '
      Susie 400
      John 100
      Mary 200
      Marie 500
      John 100
      Tim   500
    '
  )
  hash = {}
  _splitted = i.split("\n").reject {|entry| entry.strip.empty? }.map {|entry|
    entry.strip.squeeze(' ')
  }.each {|split_me|
    inner_splitted = split_me.split(' ')
    hash[inner_splitted.first] = inner_splitted.last
  }
  return hash
end

.studium1Object

#

Roebe.studium1

#


12
13
14
15
16
17
# File 'lib/roebe/toplevel_methods/studium1.rb', line 12

def self.studium1
  begin
    require 'studium'
    pp Studium.lecture_information
  rescue LoadError; end
end

.subscript_fourObject

#

Roebe.subscript_four

This is ₄.

#


938
939
940
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 938

def self.subscript_four
  EmojiParadise.send(__method__)
end

.subscript_sixObject

#

Roebe.subscript_six

This is ₆.

#


947
948
949
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 947

def self.subscript_six
  EmojiParadise.send(__method__)
end

.subscript_threeObject

#

Roebe.subscript_three

The symbol will be: ₃

#


929
930
931
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 929

def self.subscript_three
  EmojiParadise.send(__method__)
end

.subscript_twoObject

#

Roebe.subscript_two

The symbol will be: ₂

#


920
921
922
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 920

def self.subscript_two
  EmojiParadise.send(__method__)
end

.superscript_minusObject

#

Roebe.superscript_minus

The symbol will be: ⁻

URL is: www.compart.com/en/unicode/U+207B

#


1029
1030
1031
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1029

def self.superscript_minus
  EmojiParadise.send(__method__)
end

.superscript_plusObject

#

Roebe.superscript_plus

The symbol will be: ⁺

URL is: www.compart.com/en/unicode/U+207A

#


1018
1019
1020
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1018

def self.superscript_plus
  EmojiParadise.send(__method__)
end

.swarn(i = '', use_colours = @use_colours) ⇒ Object

#

Roebe.swarn

#


149
150
151
152
153
154
155
# File 'lib/roebe/colours/colours.rb', line 149

def self.swarn(
    i           = '',
    use_colours = @use_colours
  )
  return ::Roebe.tomato(i) if use_colours
  return i # else return the unmodified input.
end
#
#


262
263
264
# File 'lib/roebe/classes/symlink_files_from_that_directory_to_the_current_directory/symlink_files_from_that_directory_to_the_current_directory.rb', line 262

def self.symlink_files_from(i = ARGV)
  Roebe::SymlinkFilesFromThatDirectoryToTheCurrentDirectory.new(i)
end

.tales_from_the_cryptObject

#

Roebe.tales_from_the_crypt

#


543
544
545
# File 'lib/roebe/classes/tales_from_the_crypt.rb', line 543

def self.tales_from_the_crypt
  Roebe::TalesFromTheCrypt.new
end

.temp_dir?Boolean

#

Roebe.temp_dir?

Query the current temp-directory in use.

#

Returns:

  • (Boolean)


139
140
141
# File 'lib/roebe/constants/misc.rb', line 139

def self.temp_dir?
  '/home/x/Temp/' # This is currently hardcoded.
end

.third_most_stable_version_of_ruby(this_file = yaml_dir?+'current_ruby_versions.yml') ⇒ Object

#

Roebe.third_most_stable_version_of_ruby

This method may return a string such as “2.5.8”. This is the variant that I will try to synchronize with jruby.

#


299
300
301
302
303
# File 'lib/roebe/toplevel_methods/misc.rb', line 299

def self.third_most_stable_version_of_ruby(
    this_file = yaml_dir?+'current_ruby_versions.yml'
  )
  YAML.load_file(this_file)['third_most_stable_version_of_ruby']
end

.tibetan_symbol_padma_gdanObject

#

Roebe.tibetan_symbol_padma_gdan

#


134
135
136
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 134

def self.tibetan_symbol_padma_gdan
  EmojiParadise.send(__method__)
end

.to_bool(i) ⇒ Object

#

Roebe.to_bool

This method will “convert” a String, such as “true” or “t”, into the corresponding true value in ruby.

#


15
16
17
18
19
20
21
22
23
24
25
# File 'lib/roebe/toplevel_methods/to_bool.rb', line 15

def self.to_bool(i)
  case i.to_s
  when 'true','t',
       'yes','y','ja'
    i = true
  when 'false','f',
       'no','n','nein'
    i = false
  end
  return i
end

.to_camelcase(i) ⇒ Object

#

Roebe.to_camelcase

To see what this does, look at the following example:

Roebe.to_camelcase 'foo_bar' # => "FooBar"
#


15
16
17
# File 'lib/roebe/toplevel_methods/to_camelcase.rb', line 15

def self.to_camelcase(i)
  i.split('_').map { |_| _.capitalize }.join
end

.to_current(this_dir = ARGV.first) ⇒ Object

#

Roebe.to_current

This method will make use of the class RBT::SymlinkProgram.

Usage examples:

rinvoke to_current 4.2.3
tocurrent 4.2.3
#


391
392
393
394
395
396
397
398
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 391

def self.to_current(this_dir = ARGV.first)
  begin
    require 'rbt/utility_scripts/to_current.rb'
    RBT::ToCurrent.new(this_dir)
  rescue LoadError
    e 'class RBT::ToCurrent is not available.'
  end
end

.to_movie(i = @_, store_here = '/Depot/Video/output_images.avi') ⇒ Object

#

Roebe.to_movie

Use this method to create a little movie from different image files, by making use of mencoder.

We will use the current directory as input.

More information about this can be obtained from here:

http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-enc-images.html
#


77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/roebe/toplevel_methods/multimedia.rb', line 77

def self.to_movie(
    i          = @_,
    store_here = '/Depot/Video/output_images.avi'
  )
  # width_and_height_to_use = 'w=300:h=300'
  i = i.join(',') if i.is_a? Array
  esystem 'mencoder mf://'+i.to_s+' -vf scale=300:300 '+ # +width_and_height_to_use+
  '-mv :fps=1:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell '+
  '-oac copy -o '+store_here
  e
  e 'The video file can be found at the following location:'
  e
  efancy "  #{store_here}"
  e
end

.to_mp3(i = ARGV) ⇒ Object

#

Roebe.to_mp3

Method to convert an audio file to a .mp3 file, e. g. a .wav file into a .mp3 file.

Keep in mind that lame can not convert all .wav files. For example, Microsoft’s “ADPCM codec” can not be converted by lame. Lame may output the error message “Unsupported data format: 0x0011”, so use ffmpeg instead. Ffmpeg has no problem with that codec.

#


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/roebe/toplevel_methods/to_mp3.rb', line 20

def self.to_mp3(
    i = ARGV
  )
  unless Object.const_defined? :MultimediaParadise
    require 'multimedia_paradise'
  end
  require 'multimedia_paradise/conversions/conversions.rb'
  if i.is_a? Array
    i.each {|entry| to_mp3(entry) }
  else
    file_extension = File.extname(i).delete('.')
    case file_extension # case tag
    when /wav/i
      MultimediaParadise::MultimediaConversions.wav_to_mp3(i)
    else
      MultimediaParadise::MultimediaConversions.any_to_mp3(i) # part of conversions.rb
    end
  end
end

.to_underscore(i) ⇒ Object

#

Roebe.to_underscore

If the given input to this method has a ‘/’ character then this method will underscore only the last entry. See the usage example that follows.

Usage example:

to_underscore 'FooBar' # => "foo_bar"
#


21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/roebe/toplevel_methods/to_underscore.rb', line 21

def self.to_underscore(i)
  if i.is_a? Array
    i = i.join(' ').strip
  end
  if i.include? '/'
    dirname = File.dirname(i)
    basename = File.basename(i).gsub(/(.)([A-Z])/,'\1_\2').downcase
    ("#{dirname}/#{basename}").squeeze('/')
  else
    result = i.gsub(/(.)([A-Z])/,'\1_\2').downcase
    result[0,1] = '' if result.start_with? '_'
    result
  end
end

.tokenitor(use_this_colour = :steelblue) ⇒ Object

#

Roebe.tokenitor

#


16
17
18
19
20
21
22
23
# File 'lib/roebe/toplevel_methods/tokenitor.rb', line 16

def self.tokenitor(
    use_this_colour = :steelblue
  )
  e Colours.send(
      use_this_colour,
      '# =========================================================================== #'
    )
end

.tomato(i = '') ⇒ Object

#

Roebe.tomato

#


309
310
311
312
# File 'lib/roebe/colours/colours.rb', line 309

def self.tomato(i = '')
  return COLOURS.tomato(i) if @use_colours
  return i
end

.top_left_corner_thinObject

#

Roebe.top_left_corner_thin

See:

https://www.compart.com/en/unicode/U+231C
#


661
662
663
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 661

def self.top_left_corner_thin
  EmojiParadise.send(__method__)
end

.trad(i = ARGV) ⇒ Object

#

Roebe.trad

The input is downcased because otherwise downstream errors may occur, e. g. Liblzma versus liblzma, whereas only lzma is registered.

Since as of 26.08.2022 the old code in this class has been deprecated and removed. RBT itself offers this functionality now, via class RBT::CompileInTraditionalManner.

#


21
22
23
24
# File 'lib/roebe/toplevel_methods/trad.rb', line 21

def self.trad(i = ARGV)
  require 'rbt/utility_scripts/compile_in_traditional_manner.rb'
  RBT::CompileInTraditionalManner.new(i)
end

.traditional_fibonacci(i = 1) ⇒ Object

#

Roebe.traditional_fibonacci

The fibonacci sequence starts with 1.

The previous two numbers will determine the next value to be used.

Examples:

1 + 1 =  2 (This is our 3rd value)
1 + 2 =  3 (4th)
2 + 3 =  5 (5th)
3 + 5 =  8 (6th)
5 + 8 = 13 (7th)

This method is also called the “traditional Fibonacci” implementation. It is very slow the larger the input-number will be, thus it is not really too terribly useful.

#


51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/roebe/toplevel_methods/fibonacci.rb', line 51

def self.traditional_fibonacci(i = 1)
  i = i.first if i.is_a? Array
  i = i.to_i if i.is_a? String
  if i <= 0
    e 'Please provide a number larger than 0.'
  elsif i == 1
    i
  elsif i == 2
    1
  else
    fibonacci(i - 1) + fibonacci(i - 2)
  end
end

.traurige_oder_fröhliche_zahl(i) ⇒ Object

#

Roebe.traurige_oder_fröhliche_zahl

Es handelt sich dann um eine fröhliche Zahl, wenn folgende Rechenvorschrift mit einer endlichen Anzahl an Iterationsschritten zur Zahl 1 führt:

(1) Es wird jede Ziffer der gegebenen Zahl quadriert.
(2) Die Quadrate werden summiert.

Auf die Summe wird wieder diese Rechenvorschrift ausgeführt. Wird eben die Zahl 1 erreicht, dann ist die Berechnung am Ende angekommen.

Folgende Beispiele repräsentieren fröhliche Zahlen:

23 → 2 2 + 3 2 = 13 → 1 2 + 3 2 = 10 → 1 2 + 0 2 = 1
97 → 9 2 + 7 2 = 130 → 1 2 + 3 2 + 0 2 = 10 → 1 2 + 0 2 = 1
 7 → 7 2 = 49 → 4 2 + 9 2 = 97 → 9 2 + 7 2 = 130 → 1 2 + 3 2 + 0 2 = 10 → 1 2 + 0 2 = 1
#


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/roebe/math/traurige_oder_fröhliche_zahl.rb', line 27

def self.traurige_oder_fröhliche_zahl(i)
  i = i.first if i.is_a? Array
  i = i.to_s
  splitted = i.split(//)
  sum = splitted.map {|entry| entry.to_i * entry.to_i }.sum
  case sum
  when 1
    return true
  when 4
    return false
  else
    sum = traurige_oder_fröhliche_zahl(sum)
  end
  return sum
end

.try_to_enable_the_expanded_cd_aliases(be_verbose = true) ⇒ Object

#

Roebe.try_to_enable_the_expanded_cd_aliases

This method will define various methods when invoked.

Since as of February it resides in its own helper-module.

#


58
59
60
61
62
# File 'lib/roebe/toplevel_methods/try_to_enable_the_expanded_cd_aliases.rb', line 58

def self.try_to_enable_the_expanded_cd_aliases(
    be_verbose = true
  )
  ::Roebe::CdHelperModule.try_to_enable_the_expanded_cd_aliases(be_verbose)
end

.try_to_extract_this_gem(i) ⇒ Object

#

Roebe.try_to_extract_this_gem

Use this method if you wish to extract a ruby .gem archive. Normally you could - and should - use the “gem” utility for this, but sometimes, for various reasons, you may have to use a non-gem based method to extract .gem files. This is why this method exists.

Presently (past July 2017), we will make use of “tar” to extract a .gem file but this may change at a later time, perhaps even using a ruby-internal way instead.

#


191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/roebe/classes/extract_gem_file.rb', line 191

def self.try_to_extract_this_gem(i)
  if i.is_a? Array
    i.each {|entry| try_to_extract_this_gem(entry) }
  else
    if File.exist? i
      opn; e 'Trying to extract the .gem '+sfancy(i)+' next.'
      Roebe.extract_gem_file(i)
    else
      opn; e 'No such gem at '+sfile(i)+' appears to exist.'
    end
  end
end

.try_to_require_the_colours_project(be_verbose = true) ⇒ Object

#

Roebe.try_to_require_the_colours_project

#


31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/roebe/colours/colours.rb', line 31

def self.try_to_require_the_colours_project(
    be_verbose = true
  )
  begin
    require 'colours/html_colours'
  rescue LoadError
    if be_verbose
      puts 'The colours project does not seem to be '\
           'available. We will continue though.'
    end
  end
end

.try_to_run_the_ascii_paradise_demoObject

#

Roebe.try_to_run_the_ascii_paradise_demo

#


14
15
16
17
18
19
20
21
# File 'lib/roebe/toplevel_methods/ascii_paradise.rb', line 14

def self.try_to_run_the_ascii_paradise_demo
  begin
    require 'ascii_paradise'
    AsciiParadise.demo
  rescue LoadError
    e 'ascii_paradise is not installed.'
  end
end

.turquoise(i = '') ⇒ Object

#

Roebe.turquoise

#


357
358
359
360
# File 'lib/roebe/colours/colours.rb', line 357

def self.turquoise(i = '')
  return COLOURS.turquoise(i) if @use_colours
  return i
end

.umbrella_with_raindropsObject

#

Roebe.umbrella_with_raindrops

#


164
165
166
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 164

def self.umbrella_with_raindrops
  EmojiParadise.send(__method__)
end

.umfang(i = ARGV) ⇒ Object

#

Roebe.umfang

#


87
88
89
# File 'lib/roebe/math/circle.rb', line 87

def self.umfang(i = ARGV)
  ::Roebe::Math.kreisumfang(i)
end

.unicode_chess_symbols?Boolean

#

Roebe.unicode_chess_symbols?

#

Returns:

  • (Boolean)


166
167
168
169
170
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 166

def self.unicode_chess_symbols?
  (
    [ Chess.white_pieces? ] + [ Chess.black_pieces? ]
  ).flatten
end

.unicode_clinerObject

#

Roebe.unicode_cliner

This is the same as cliner(), defined below, but it will use Unicode building blocks rather than the ‘-’ character.

#


63
64
65
66
# File 'lib/roebe/toplevel_methods/cliner.rb', line 63

def self.unicode_cliner
  require 'roebe/requires/require_unicode.rb'
  e (Roebe.horizontal_building_block * 80)
end

.unicode_integral_symbolObject

#

Roebe.unicode_integral_symbol

This will show the symbol “∫”.

#


120
121
122
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 120

def self.unicode_integral_symbol
  EmojiParadise.send(__method__)
end

.university_email?Boolean

#

Roebe.university_email?

#

Returns:

  • (Boolean)


22
23
24
25
26
27
28
29
30
# File 'lib/roebe/toplevel_methods/email.rb', line 22

def self.university_email?
  target_file = '/home/x/data/personal/yaml/roeberia_settings.yml'
  if File.exist? target_file
    return YAML.load_file(target_file)['UNET_EMAIL']
  else
    e 'No file exists at '+target_file
  end
  return nil
end

.upcase_all_files(from = return_pwd) ⇒ Object

#

Roebe.upcase_all_files

Easier module-level method. First argument should be the directory under which you wish to use this class on.

#


135
136
137
138
139
# File 'lib/roebe/classes/upcaser.rb', line 135

def self.upcase_all_files(
    from = return_pwd
  )
  Roebe::Upcaser.new(from)
end

.update(install_how = :both) ⇒ Object

#

Roebe.update (iruby tag, update tag)

Purpose of this little method is to update my personal ruby projects, no matter what. We will also dump into the directory /Depot/Temp/MyGems (My custom addons)

Since as of Feb 2015 we will also put these .gem files into an archive directory.

The first argument ‘install_how` can be either of these 3 values:

:gem or :setup or :both

To invoke this method from the commandline, do:

rupdate
#


288
289
290
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 288

def self.update(install_how = :both) # rupdate
  ::Roebe::Update.new(install_how)
end

.update_pciids(i = :ruby_way, remote_url_to_use = 'http://pci-ids.ucw.cz/v2.2/pci.ids') ⇒ Object

#

Roebe.update_pciids

There are two ways how to use this method:

(a) the :ruby_way
(b) the :pciutils_way

The default is the ruby way; the variant with pciutils exists primarily so that we can remain compatible with the shell script called update-pciids, which comes from the “pciutils” suite.

This method can also be called from the commandline, by issuing a command like:

roebe --update-pciids
#


31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/roebe/toplevel_methods/update_pciids.rb', line 31

def self.update_pciids(
    i                 = :ruby_way,
    remote_url_to_use = 'http://pci-ids.ucw.cz/v2.2/pci.ids'
  )
  case i
  # ======================================================================= #
  # === :ruby_way
  # ======================================================================= #
  when :ruby_way,
       :default
    require 'open-uri'
    dataset = open(remote_url_to_use).read
    what = dataset
    into = File.basename(remote_url_to_use)
    e "Storing into `#{into}`."
    write_what_into(what, into)
    # ===================================================================== #
    # Move the file into the "default" directory if we are on a roebe
    # system:
    # ===================================================================== #
    if File.exist?(into) and is_on_roebe?
      require 'fileutils'
      _ = '/usr/local/share/'
      mkdir(_) unless File.directory? _
      new_into = _+File.basename(remote_url_to_use)
      e 'Next moving `'+into+'` into `'+new_into+'`.'
      FileUtils.mv(into, new_into)
    end
  # ======================================================================= #
  # === :pciutils_way
  # ======================================================================= #
  when :pciutils_way
    esystem 'update-pciids'
  end
end

.update_roebe(i = "#{HOME_DIRECTORY_OF_USER_X}data/PROGRAMMING_LANGUAGES/RUBY/src/roebe/") ⇒ Object

#

Roebe.update_roebe

This is a quick ad-hoc method to update the roebe project, on my home directory.

#


101
102
103
104
105
106
107
108
109
# File 'lib/roebe/toplevel_methods/rinstall2.rb', line 101

def self.update_roebe(
    i = "#{HOME_DIRECTORY_OF_USER_X}data/PROGRAMMING_LANGUAGES/RUBY/src/roebe/"
  )
  if File.directory? i
    Dir.chdir(i) # Perform a cd-operation first.
    e 'We are now in the directory `'+Dir.pwd+'`.'
  end
  Roebe.rinstall2
end

.update_the_main_pdf_viewer_file_with_this_program(what) ⇒ Object

#

Roebe.update_the_main_pdf_viewer_file_with_this_program

The argument to this method should be your favourite PDF viewer, such as ‘okular’ or ‘evince’.

#


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/roebe/toplevel_methods/update_the_main_pdf_viewer_file_with_this_program.rb', line 23

def self.update_the_main_pdf_viewer_file_with_this_program(
    what
  )
  what = what.to_s.dup
  require 'pdf_paradise'
  if Object.const_defined? :PdfParadise
    into = PdfParadise.file_pdf_viewer?
    e "#{Colours.grey('Storing')} "\
      "#{sfancy(what.to_s)} #{Colours.grey('into `')}"\
      "#{sfile(into)}"\
      "#{Colours.grey('`.')}"
    ::Roebe.write_what_into(what, into)
  else
    e 'The project pdf_paradise is not available.'
  end
end

.upper_half_blockObject

#

Roebe.upper_half_block

This is especially useful for “interface building” on the commandline.

We can display a horizontal but also a vertical line with this, even via colours.

#


48
49
50
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 48

def self.upper_half_block
  EmojiParadise.upper_half_block
end

.upper_one_eighth_blockObject

#

Roebe.upper_one_eighth_block

#


181
182
183
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 181

def self.upper_one_eighth_block
  EmojiParadise.upper_one_eighth_block
end

.upwards_arrowObject

#

Roebe.upwards_arrow

The symbol will be: ↑

See: en.wikipedia.org/wiki/Arrow_%28symbol%29#Arrows_in_Unicode

Invocation example:

puts Colours.crimson(Roebe.up_arrow)
#


1003
1004
1005
1006
1007
1008
1009
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1003

def self.upwards_arrow
  result = "\u{2191}"
  if is_on_roebe?
    set_xorg_buffer(result.strip)
  end
  result
end

.url_to_the_cascadia_font?Boolean

#

Roebe.url_to_the_cascadia_font?

Just store the URL to the cascadia font - the method will then download the fonts into the current working directory, or into the main TTF directory if we are on a roebe-system.

#

Returns:

  • (Boolean)


24
25
26
27
28
29
30
31
32
33
# File 'lib/roebe/toplevel_methods/install_the_cascadia_font.rb', line 24

def self.url_to_the_cascadia_font?
  %w(

    https://github.com/microsoft/cascadia-code/releases/download/v1911.21/Cascadia.ttf
    https://github.com/microsoft/cascadia-code/releases/download/v1911.21/CascadiaMono.ttf
    https://github.com/microsoft/cascadia-code/releases/download/v1911.21/CascadiaMonoPL.ttf
    https://github.com/microsoft/cascadia-code/releases/download/v1911.21/CascadiaPL.ttf

  )
end

.url_to_the_hack_font?(general_URL_or_URL_to_the_zip_file = :general) ⇒ Boolean

#

Roebe.url_to_the_hack_font?

Just store the URL to the Hack font, since this is one of my favourite fonts to use.

#

Returns:

  • (Boolean)


23
24
25
26
27
28
29
30
31
32
# File 'lib/roebe/toplevel_methods/install_the_hack_font.rb', line 23

def self.url_to_the_hack_font?(
    general_URL_or_URL_to_the_zip_file = :general
  )
  case general_URL_or_URL_to_the_zip_file
  when :general
    'https://github.com/source-foundry/Hack/releases'
  else
    'https://github.com/source-foundry/Hack/releases/download/v3.003/Hack-v3.003-ttf.zip'
  end
end

.url_to_the_jet_brains_font?(general_URL_or_URL_to_the_zip_file = :general) ⇒ Boolean

#

Roebe.url_to_the_jet_brains_font?

#

Returns:

  • (Boolean)


19
20
21
22
23
24
25
26
27
28
# File 'lib/roebe/toplevel_methods/install_the_jet_brains_mono_font.rb', line 19

def self.url_to_the_jet_brains_font?(
    general_URL_or_URL_to_the_zip_file = :general
  )
  case general_URL_or_URL_to_the_zip_file
  when :general
    'https://www.jetbrains.com/lp/mono/'
  else
    'https://download.jetbrains.com/fonts/JetBrainsMono-1.0.0.zip'
  end
end

.use_atrilObject

#

Roebe.use_atril

Use atril as the main pdf-viewer.

#


45
46
47
# File 'lib/roebe/toplevel_methods/update_the_main_pdf_viewer_file_with_this_program.rb', line 45

def self.use_atril
  update_the_main_pdf_viewer_file_with_this_program(:atril)
end

.use_colours?Boolean

#

Roebe.use_colours?

#

Returns:

  • (Boolean)


93
94
95
# File 'lib/roebe/colours/colours.rb', line 93

def self.use_colours?
  @use_colours
end

.use_evinceObject

#

Roebe.use_evince

Use evince as the main pdf-viewer.

#


54
55
56
# File 'lib/roebe/toplevel_methods/update_the_main_pdf_viewer_file_with_this_program.rb', line 54

def self.use_evince
  update_the_main_pdf_viewer_file_with_this_program(:evince)
end

.user_install_all_registered_gems(use_gem_or_setup_rb = :setup_rb) ⇒ Object

#

Roebe.user_install_all_registered_gems

To invoke this, try:

roebe --user-install
#


85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/roebe/commandline/misc.rb', line 85

def self.user_install_all_registered_gems(
    # use_gem_or_setup_rb = :gem
    use_gem_or_setup_rb = :setup_rb
  )
  require 'roebe/toplevel_methods/rinstall2.rb'
  _ = array_install_these_gem_projects
  e
  e 'Now installing all registered gems that are found in the'
  e 'Roebe project.'
  e
  # start_dir = return_pwd
  start_dir = '/home/x/programming/ruby/src/'
  cd start_dir
  _.each {|this_gem|
    e 'Installing this gem: '+steelblue(this_gem)
    cd this_gem
    # ===================================================================== #
    # Next, we will either install via .gem, or we will use
    # setup.rb. Right now we will default to setup.rb
    # ===================================================================== #
    case use_gem_or_setup_rb
    # ===================================================================== #
    # === :gem
    # ===================================================================== #
    when :gem
      possible_name = Dir[this_gem+'*.gem'].first.to_s # <- rbt-0.8.67.gem
      remove_file(possible_name) if File.exist? possible_name # <- Remove old .gem files first.
      esystem 'gem build *.gemspec'
      possible_name = Dir[this_gem+'*.gem'].first.to_s # <- rbt-0.8.67.gem
      esystem 'gem install ./'+possible_name+' --user-install'
      remove_file(possible_name) if File.exist? possible_name # <- And remove it again.
    # ===================================================================== #
    # === :setup_rb
    # ===================================================================== #
    when :setup_rb,
         :default
      rinstall2 { :user_install }
    end
    cd start_dir
  }
end

.verbose_truth(i) ⇒ Object

#

Roebe.verbose_truth

#


13
14
15
16
17
18
19
20
21
# File 'lib/roebe/toplevel_methods/verbose_truth.rb', line 13

def self.verbose_truth(i)
  case i.to_s
  when 'true','t'
    i = 'Yes.'
  when 'false','f'
    i = 'No.'
  end
  i
end

.version?Boolean

#

Roebe.version?

#

Returns:

  • (Boolean)


50
51
52
# File 'lib/roebe/version/version.rb', line 50

def self.version?
  VERSION
end

.vetmed?Boolean

#

Roebe.vetmed?

#

Returns:

  • (Boolean)


419
420
421
422
423
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 419

def self.vetmed?
  require 'roebe/classes/passwords.rb'
  e BeautifulUrl[:vetmed]
  Passwords.password_for :vetmed
end

.warning_signObject

#

Roebe.warning_sign

The symbol will be: ⚠

Invocation example:

puts Colours.crimson(Roebe.warning_sign)
#


616
617
618
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 616

def self.warning_sign
  EmojiParadise.send(__method__)
end

.weekday?(this_weekday_as_number = Date.today.wday) ⇒ Boolean

#

Roebe.weekday?

Usage example:

Roebe.weekday? # => "Tue"
#

Returns:

  • (Boolean)


114
115
116
117
118
# File 'lib/roebe/toplevel_methods/time.rb', line 114

def self.weekday?(
    this_weekday_as_number = Date.today.wday
  )
  return DAY_NAMES[this_weekday_as_number] # => "Mon"'
end

.wget(i) ⇒ Object

#

Roebe.wget

#


12
13
14
15
# File 'lib/roebe/toplevel_methods/wget.rb', line 12

def self.wget(i)
  _ = "wget #{i}"
  system _
end

.wheel_of_dharmaObject

#

Roebe.wheel_of_dharma

#


541
542
543
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 541

def self.wheel_of_dharma
  EmojiParadise.send(__method__)
end

.white_chess_bishopObject

#

Roebe.white_chess_bishop

#


42
43
44
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 42

def self.white_chess_bishop # ♗
  EmojiParadise.white_chess_bishop
end

.white_chess_kingObject

#

Roebe.white_chess_king

#


20
21
22
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 20

def self.white_chess_king # ♔
  EmojiParadise.white_chess_king
end

.white_chess_knightObject

#

Roebe.white_chess_knight

#


92
93
94
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 92

def self.white_chess_knight # ♘
  EmojiParadise.white_chess_knight
end

.white_chess_pawnObject

#

Roebe.white_chess_pawn

#


50
51
52
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 50

def self.white_chess_pawn # ♙
  EmojiParadise.white_chess_pawn
end

.white_chess_queenObject

#

Roebe.white_chess_queen

#


27
28
29
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 27

def self.white_chess_queen # ♕
  EmojiParadise.white_chess_queen
end

.white_chess_rookObject

#

Roebe.white_chess_rook

#


35
36
37
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 35

def self.white_chess_rook # ♖
  EmojiParadise.white_chess_rook
end

.white_frowning_faceObject

#

Roebe.white_frowning_face

This is, sort of, a sad smiley. It will look like this: ☹

#


1038
1039
1040
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1038

def self.white_frowning_face
  EmojiParadise.send(__method__)
end

.white_shogi_pieceObject

#

Roebe.white_shogi_piece

#


178
179
180
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 178

def self.white_shogi_piece
  EmojiParadise.send(__method__)
end

.white_sun_with_raysObject

#

Roebe.white_sun_with_rays

#


358
359
360
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 358

def self.white_sun_with_rays
  EmojiParadise.send(__method__)
end

.whois(i = nil) ⇒ Object

#

Roebe.whois

#


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/roebe/toplevel_methods/whois.rb', line 14

def self.whois(i = nil)
  i = [i].flatten.compact
  # ======================================================================= #
  # Make use of a default if the user did not input anything at all:
  # ======================================================================= #
  i << 'google.at' if i.empty?
  i.each {|entry|
    begin
      require 'whois'
      w = Whois::Client.new
      lookup_result = w.lookup(entry)
      e lookup_result
    rescue LoadError
      e 'The gem called whois is unavailable.'
    end
  }
end

.wochentag?(i = ARGV.first) ⇒ Boolean

#

Roebe.wochentag? (weekday)

This uses the script:

bl $RUBY_TIME/wochentag_anzeiger.rb
#

Returns:

  • (Boolean)


165
166
167
168
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 165

def self.wochentag?(i = ARGV.first)
  require_this_roebe_class 'wochentag_anzeiger'
  WochentagAnzeiger.new(i)
end

.wochentag_anzeiger(i) ⇒ Object

#

Roebe.wochentag_anzeiger

#


208
209
210
# File 'lib/roebe/classes/wochentag_anzeiger.rb', line 208

def self.wochentag_anzeiger(i)
  ::Roebe::WochentagAnzeiger.new(i)
end

.word_count(i = ARGV) ⇒ Object

#

Roebe.word_count

#


46
47
48
49
50
51
# File 'lib/roebe/toplevel_methods/word_frequencies.rb', line 46

def self.word_count(i = ARGV)
  if i.is_a? Array
    i = i.join(' ').strip
  end
  i.delete("\n").split(' ').size
end

.word_frequencies(i = 'We tried list and we tried dicts also we tried Zen') ⇒ Object

#

Roebe.word_frequencies

The input to this method should be a String.

This method will return a Hash, keeping track of the amount of words that are part of the given input String.

Usage example:

Roebe.word_frequencies( %w( sparky the cat sat on the mat )) # => {"sparky"=>1, "the"=>2, "cat"=>1, "sat"=>1, "on"=>1, "mat"=>1}
#


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/roebe/toplevel_methods/word_frequencies.rb', line 22

def self.word_frequencies(
    i = 'We tried list and we tried dicts also we tried Zen'
  )
  if i.is_a? Array
    i = i.join(' ').strip
  end
  if i and i.is_a?(String) and File.exist?(i)
    # ===================================================================== #
    # Read the file if passed to this method next:
    # ===================================================================== #
    i = File.read(i).strip.squeeze(' ')
  end
  hash = Hash.new
  hash.default = 0
  i.split(' ').each {|word|
    hash[word] += 1
  }
  hash
end

.word_wrap(i, n_characters = :default) ⇒ Object

#

Roebe.word_wrap

#


59
60
61
# File 'lib/roebe/classes/word_wrap.rb', line 59

def self.word_wrap(i, n_characters = :default)
  return Roebe::WordWrap[i, n_characters]
end

.write_what_into(what, into = 'foobar.md', use_this_mode = 'w+') ⇒ Object

#

Roebe.write_what_into

This toplevel-method can be used to write into a file.

The first argument is the text that you may want to use.

#


78
79
80
81
82
83
84
# File 'lib/roebe/toplevel_methods/write_what_into.rb', line 78

def self.write_what_into(
    what,
    into          = 'foobar.md',
    use_this_mode = 'w+'
  )
  ::Roebe::SaveFile.write_what_into(what, into, use_this_mode)
end

.wurzelObject

#

Roebe.wurzel

This will be “√”.

#


88
89
90
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 88

def self.wurzel
  EmojiParadise.send(__method__)
end

.www_directory?Boolean

#

Roebe.www_directory?

#

Returns:

  • (Boolean)


38
39
40
41
# File 'lib/roebe/constants/www.rb', line 38

def self.www_directory?
  require 'roebe/project/project.rb'
  Roebe.project_base_dir?+'www/'
end

.zenity(i) ⇒ Object

#

Roebe.zenity

#


300
301
302
# File 'lib/roebe/classes/zenity.rb', line 300

def self.zenity(i)
  Roebe::Zenity[i]
end

.zip_on_windows(this_directory = Dir.pwd, name_of_the_file = :default) ⇒ Object

#

Roebe.zip_on_windows

Usage example:

Roebe.zip_on_windows '/home/x/songs/', 'all_songs.zip'
#


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/roebe/toplevel_methods/rubyzip.rb', line 20

def self.zip_on_windows(
    this_directory   = Dir.pwd,
    name_of_the_file = :default
  )
  if is_on_roebe? and (!this_directory == Dir.pwd) and
     (name_of_the_file == :default)
    # ===================================================================== #
    # In this case we change the name of the file, if
    # the name is :default.
    # ===================================================================== #
    name_of_the_file = File.basename(this_directory).delete('/')
  end
  case name_of_the_file
  # ======================================================================= #
  # === :default
  # ======================================================================= #
  when :default
    name_of_the_file = 'archive.zip'
  end
  name_of_the_file = name_of_the_file.dup if name_of_the_file.frozen?
  name_of_the_file << '.zip' unless name_of_the_file.end_with? '.zip'
  if this_directory.frozen?
    this_directory = this_directory.dup
  end
  this_directory << '/' unless this_directory.end_with? '/'
  cmd = "7z a -tzip #{name_of_the_file} #{this_directory}"
  esystem cmd
end

.zlib(zipped_filename, unzipped_filename) ⇒ Object

#

Roebe.zlib

This method can be used to use zlib in order to create a .gz file.

This method accepts two arguments:

(1) zipped_filename:

    This is the string holding the path/filename of where 
    your gzipped file is located.

(2) unzipped_filename:

    This is the string holding path/filename of where 
    you are saving the unzipped file.
#


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/roebe/toplevel_methods/zlib.rb', line 27

def self.zlib(
    zipped_filename,
    unzipped_filename
  )
  begin
    require 'zlib'
  rescue LoadError; end
  File.open(unzipped_filename, 'wb') { |unzipped_file|
    unzipped_file.binmode
    gz = File.open(zipped_filename, 'rb')
    gz.binmode
    begin
      zis = Zlib::GzipReader.new(gz)
      dis = zis.read
      io = StringIO.new(dis)
    ensure
      zis.finish if zis
    end
    unzipped_file.write(io.read)
    unzipped_file.flush
    unzipped_file.fsync
    gz.close
  }
  GC.start
end

Instance Method Details

#ecomment(i = '') ⇒ Object

#

ecomment

#


133
134
135
# File 'lib/roebe/colours/colours.rb', line 133

def ecomment(i = '')
  ::Roebe.ecomment(i)
end

#gold(i = '', use_colours = true) ⇒ Object

#

gold

#


283
284
285
286
287
288
# File 'lib/roebe/colours/colours.rb', line 283

def gold(
    i           = '',
    use_colours = true
  )
  ::Roebe.gold(i, use_colours)
end

#ntrad(i = ARGV) ⇒ Object

#

ntrad

#


28
29
30
# File 'lib/roebe/toplevel_methods/ntrad.rb', line 28

def ntrad(i = ARGV)
  ::Roebe.ntrad(i)
end

#open_in_editor_and_browser(this = ARGV) ⇒ Object

#

open_in_editor_and_browser

#


30
31
32
# File 'lib/roebe/toplevel_methods/open_in_editor_and_browser.rb', line 30

def open_in_editor_and_browser(this = ARGV)
  ::Roebe.open_in_editor_and_browser(this)
end

#play_simpsons(available_where = nil) ⇒ Object Also known as: simpson, simps, simpsons, halloween

#

play_simpsons

rinvoke simpsons

#


88
89
90
# File 'lib/roebe/toplevel_methods/halloween.rb', line 88

def play_simpsons(available_where = nil)
  ::Roebe.halloween
end

#prettify_url(i = :installation, shall_we_replace_the_localhost = :default) ⇒ Object Also known as: beautiful_url, pretty_url, sanitize_url

#

prettify_url

Just a wrapper towards Roebe.sanitize_url

#


63
64
65
66
67
68
69
70
# File 'lib/roebe/toplevel_methods/sanitize_url.rb', line 63

def prettify_url(
    i                              = :installation,
    shall_we_replace_the_localhost = :default
  )
  ::Roebe.sanitize_url(
    i, shall_we_replace_the_localhost
  )
end

#programs_dir?Boolean

#

programs_dir?

#

Returns:

  • (Boolean)


106
107
108
# File 'lib/roebe/constants/misc.rb', line 106

def programs_dir?
  PROGRAMS_DIRECTORY
end

#rds(i) ⇒ Object Also known as: remove_double_slashes, replace_double_slash

#

rds

#


28
29
30
# File 'lib/roebe/toplevel_methods/rds.rb', line 28

def rds(i)
  ::Roebe.rds(i)
end

#return_dateObject

#

return_date

#


19
20
21
# File 'lib/roebe/toplevel_methods/return_date.rb', line 19

def return_date
  ::Roebe.return_date
end

#sdir(i) ⇒ Object

#

sdir

#


210
211
212
# File 'lib/roebe/colours/colours.rb', line 210

def sdir(i)
  ::Roebe.sdir(i)
end

#seagreen(i = '', use_colours = true) ⇒ Object

#

seagreen

#


262
263
264
265
266
267
# File 'lib/roebe/colours/colours.rb', line 262

def seagreen(
    i           = '',
    use_colours = true
  )
  ::Roebe.seagreen(i, use_colours)
end

#sfile(i) ⇒ Object

#

sfile

#


237
238
239
# File 'lib/roebe/colours/colours.rb', line 237

def sfile(i)
  ::Roebe.sfile(i)
end

#simp(i) ⇒ Object

#

simp

#


172
173
174
# File 'lib/roebe/colours/colours.rb', line 172

def simp(i)
  ::Roebe.simp(i)
end

#studium1Object

#

studium1

#


22
23
24
# File 'lib/roebe/toplevel_methods/studium1.rb', line 22

def studium1
  ::Roebe.studium1
end

#trad(i = ARGV) ⇒ Object

#

trad

#


29
30
31
# File 'lib/roebe/toplevel_methods/trad.rb', line 29

def trad(i = ARGV)
  ::Roebe.trad(i)
end