class Cookbooks::ScanForBlfsPrograms
Constants
- ALSO_GIVE_HELP_FOR_MODIFYING_THESE_ENTRIES
#¶ ↑
ALSO_GIVE_HELP_FOR_MODIFYING_THESE_ENTRIES¶ ↑
#¶ ↑
- ALSO_REMOVE_NUMBERS_FROM_REMOTE_PROGRAM_NAMES
#¶ ↑
ALSO_REMOVE_NUMBERS_FROM_REMOTE_PROGRAM_NAMES¶ ↑
If the following constant is set, then we will remove all numbers from the given input.
#¶ ↑
- NAMESPACE
#¶ ↑
NAMESPACE¶ ↑
#¶ ↑
- REGEX_FOR_PROGRAMS_REGISTERED_AT_THE_REMOTE_BLFS_WEBPAGE
#¶ ↑
REGEX_FOR_PROGRAMS_REGISTERED_AT_THE_REMOTE_BLFS_WEBPAGE¶ ↑
#¶ ↑
- REMOTE_BASE_URL
#¶ ↑
REMOTE_BASE_URL¶ ↑
#¶ ↑
Public Class Methods
Public Instance Methods
iterate_over_all_programs_missing_a_blfs_entry()
click to toggle source
#¶ ↑
#iterate_over_all_programs_missing_a_blfs_entry¶ ↑
#¶ ↑
# File lib/cookbooks/utility_scripts/scan_for_blfs_programs.rb, line 119 def iterate_over_all_programs_missing_a_blfs_entry # ======================================================================= # # First, build up our Array that has the programs registered which # also have a remote BLFS page. # ======================================================================= # array_these_local_programs_do_not_have_a_blfs_entry = [] @programs_missing_a_blfs_entry.each {|this_program| if ALSO_REMOVE_NUMBERS_FROM_REMOTE_PROGRAM_NAMES if this_program =~ /\d+/ this_program = remove_all_numbers_from(this_program) end end if @remotely_available_programs.include? this_program array_these_local_programs_do_not_have_a_blfs_entry << this_program end } if array_these_local_programs_do_not_have_a_blfs_entry.empty? opnn; e 'All remote programs have already been registered '\ 'locally. This is good!' else array_these_local_programs_do_not_have_a_blfs_entry.each {|this_program| remote_blfs_page = remote_blfs_page? opnn; e 'The program `'+sfancy(this_program)+'` is missing a blfs: entry.' remote_html_page = remote_blfs_page+'general/'+this_program+'.html' opnn; e 'The remote BLFS page is: '+ simp(remote_html_page) # =================================================================== # # Next, also report where it is available locally. # =================================================================== # if on_roebe? local_path = ROEBE_PATH_TO_COOKBOOKS+ 'yaml/individual_cookbooks/'+this_program+'.yml' else local_path = individual_cookbooks_directory?+ this_program+'.yml' end if ALSO_GIVE_HELP_FOR_MODIFYING_THESE_ENTRIES e e ' bl '+sfile(local_path) e ' '+simp(remote_html_page) e end } end end
obtain_all_programs_that_miss_a_blfs_entry()
click to toggle source
obtain_dataset_from_the_remote_webpage()
click to toggle source
#¶ ↑
#obtain_dataset_from_the_remote_webpage¶ ↑
#¶ ↑
# File lib/cookbooks/utility_scripts/scan_for_blfs_programs.rb, line 93 def obtain_dataset_from_the_remote_webpage @dataset_from_the_remote_webpage = open(REMOTE_BASE_URL).read # ======================================================================= # # The next variable will contain all programs that are available # at the BLFS webpage. # ======================================================================= # @remotely_available_programs = @dataset_from_the_remote_webpage.scan(/#{remote_regex?}/).flatten end
opnn()
click to toggle source
remote_blfs_page?()
click to toggle source
remote_regex?()
click to toggle source
remove_all_numbers_from(i)
click to toggle source
report_how_many_remote_entries_exist()
click to toggle source
reset()
click to toggle source