Class: Cyberweb::HtmlToHtml
- Inherits:
-
ObtainFilesAndDirectoriesFromThisPath
- Object
- Base
- ObtainFilesAndDirectoriesFromThisPath
- Cyberweb::HtmlToHtml
- Defined in:
- lib/cyberweb/utility_scripts/html_to_html/html_to_html.rb
Overview
Cyberweb::HtmlToHtml
Constant Summary collapse
- ENGLISH_TITLE =
#
ENGLISH_TITLE
#
'HTML webpages'
- GERMAN_TITLE =
#
GERMAN_TITLE
#
'HTML Webseiten'
Constants inherited from ObtainFilesAndDirectoriesFromThisPath
ObtainFilesAndDirectoriesFromThisPath::ARRAY_IMAGES, ObtainFilesAndDirectoriesFromThisPath::BE_VERBOSE, ObtainFilesAndDirectoriesFromThisPath::CSS_STYLE_TO_USE_FOR_THE_TOP_HEADER, ObtainFilesAndDirectoriesFromThisPath::DEFAULT_CSS_STYLE_FOR_HYPERLINKS, ObtainFilesAndDirectoriesFromThisPath::FONT_SIZE_TO_USE, ObtainFilesAndDirectoriesFromThisPath::HTML, ObtainFilesAndDirectoriesFromThisPath::IMG_CSS_STYLE, ObtainFilesAndDirectoriesFromThisPath::INFO_DIRECTORY, ObtainFilesAndDirectoriesFromThisPath::SHALL_WE_DEBUG, ObtainFilesAndDirectoriesFromThisPath::THESE_CSS_CLASSES_ARE_KNOWN_TO_THE_RENDERED_TEMPLATE
Constants inherited from Base
Base::HOME_DIRECTORY_OF_THE_USER_X, Base::NAMESPACE
Class Method Summary collapse
-
.[](i = ARGV) ⇒ Object
# === Cyberweb::HtmlToHtml[] ========================================================================= #.
Instance Method Summary collapse
-
#initialize(commandline_arguments = ARGV, run_already = true) ⇒ HtmlToHtml
constructor
# === initialize ========================================================================= #.
-
#reset ⇒ Object
# === reset (reset tag) ========================================================================= #.
-
#run ⇒ Object
# === run (run tag) ========================================================================= #.
Methods inherited from ObtainFilesAndDirectoriesFromThisPath
#add, #add_date_in_the_lower_part_of_the_webpage?, #add_hyperlinks_to_subdirectories?, #add_the_footer_with_hyperlinks, #addnl, #append, #append_to_local_css_style, #be_verbose?, #body_css_style?, #check_whether_at_the_least_one_argument_was_given_and_then_act_accordingly, #clear_directories, #clear_files, #colour_for_pdf_files, #consider_appending_the_jquery_string, #content_of_the_HTML_page?, #directory_containing_all_files?, #display_the_top_header?, #do_debug, #do_include_subdirectories, #do_make_use_of_a_go_down_one_level_link, #do_not_include_subdirectories, #do_not_use_HTML_table_layout, #do_open_the_webpage_if_we_are_on_a_roebe_system, #do_process_all_entries_from_this_directory, #do_store_the_content, #do_traverse_into_subdirectories?, #do_use_HTML_table_layout, #files?, #filter_for_these_files, #gold, #include_subdirectories?, #make_use_of_a_go_down_one_level_link?, #mediumorchid, #mediumseagreen, #menu, #n_rows?, #olivedrab, #paleturquoise, #registered_ids?, #report_not_registered_commandline_argument, #report_scanning_directory, #return_early_and_late_year_from_this_array, #return_jquery, #return_the_code_for_going_down_one_level, #return_the_pretty_name_of_the_webpage, #royalblue, #save_into_this_local_file?, #set_background, #set_body_css_style, #set_content_of_the_html_page, #set_directory_containing_all_files, #set_files, #set_save_into_this_local_file, #shall_we_debug?, #show_help, #show_year_in_the_header?, #sort_how?, #use_HTML_table_layout?, #use_german?, #use_jquery?, #use_no_size_value?, #work_on_video_files_only?
Methods inherited from Base
#be_verbose, #be_verbose?, #cascading_style_sheets_directory?, #cd, #commandline_mode?, #copyright?, #css_comment, #delete_directory, #do_toggle, #e, #echo_raw, #filename?, #full_path_to_image_directory?, #html_colours?, #html_image, #htmlentities, #img_dir?, #infer_the_namespace, #initialize_the_configuration, #is_a_file?, #is_a_video_file?, #is_an_image_file?, #is_on_roebe?, #last_tag_used?, #last_tag_used_first_element?, #last_tag_used_id?, #mkdir, #mode?, #namespace?, #open_in_browser, #opne, #opnn, #remove_comments_from_this_string_but_preserve_CSS_rules, #remove_html, #return_all_directories, #return_date, #return_program_name, #return_pwd, #ruby_header?, #server_base_directory?, #set_commandline_mode, #set_last_tag_used, #update_the_image_directory, #use_this_relative_directory_for_custom_images?, #www_mode?
Methods included from BaseModule::FileRelatedFunctionality
#copy_this_file, #cpr, #delete_file, #filename_without_extension?, #read_file_via_utf8_encoding
Methods included from BaseModule
#attach_these_constants, #base_dir?, #beautiful_url, #cd, #create_the_internal_hash, #doctype?, #ee, #ensure_main_encoding, #esystem, #html_templates, #initialize_the_config_if_the_config_hash_is_empty, #internal_hash?, #log_dir?, #no_http, #random_alphabet_characters, #rarrow?, #rds, #remove_comments_from_this_string, #remove_numbers, #require_the_html_templates, #require_these, #return_file_size_in_kb_of, #return_html_comment, #ruby_sitelib_dir?, #sanitize_this_id, #server_base_directory?, #string_remote_image, #today?, #try_to_require_rack, #try_to_require_the_open_gem, #write_what_into
Methods included from BaseModule::ContentType
#content_type_is_html, #content_type_is_jpeg, #content_type_is_json, #content_type_is_plain_text
Methods included from BaseModule::CommandlineArguments
#append_to_the_commandline_arguments, #commandline_arguments?, #first_argument?, #parse_these_commandline_arguments, #second_argument?, #set_commandline_arguments
Methods included from BaseModule::Colours
#all_html_colours, #lightgreen, #rev, #sdir, #sfancy, #sfile, #simp, #steelblue, #tomato
Constructor Details
#initialize(commandline_arguments = ARGV, run_already = true) ⇒ HtmlToHtml
#
initialize
#
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/cyberweb/utility_scripts/html_to_html/html_to_html.rb', line 33 def initialize( commandline_arguments = ARGV, run_already = true ) reset set_commandline_arguments( commandline_arguments ) run if run_already end |
Class Method Details
Instance Method Details
#reset ⇒ Object
#
reset (reset tag)
#
47 48 49 50 51 52 53 54 |
# File 'lib/cyberweb/utility_scripts/html_to_html/html_to_html.rb', line 47 def reset super() infer_the_namespace # ======================================================================= # # === @title_to_use # ======================================================================= # @title_to_use = ENGLISH_TITLE end |
#run ⇒ Object
#
run (run tag)
#
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/cyberweb/utility_scripts/html_to_html/html_to_html.rb', line 59 def run do_include_subdirectories do_obtain_all_files(:pwd) do_filter_for(:html) files = files? consider_appending_the_jquery_string addnl('<div style="color: lightgreen; margin: 8px">') addnl( HtmlTags.h1( @title_to_use+' ('+files.size.to_s+' in total)', 'lightgreen' ) ) addnl("</div>") files.each_with_index {|this_file, index| index += 1 addnl( HtmlTags.a( this_file.delete_prefix('/home/x/programming/ruby/src/cyberweb/examples/'), css_style: 'font-size: 1.2em; font-weight: bold;', description: ' → '+this_file.delete_prefix('/home/x/programming/ruby/src/cyberweb/examples/'), new_tab: true ) ) addnl('<br><br>') } do_store_the_content end |