class RBT::Cookbooks::Homepage
Constants
- MODIFY_THE_XORG_BUFFER_IF_A_HOMEPAGE_ENTRY_EXISTS
#¶ ↑
MODIFY_THE_XORG_BUFFER_IF_A_HOMEPAGE_ENTRY_EXISTS
¶ ↑If the following constant is set to true then we will also try to modify the xorg buffer.
#¶ ↑
- NAMESPACE
#¶ ↑
NAMESPACE
¶ ↑#¶ ↑
Public Class Methods
[](i = '')
click to toggle source
new( this_program = ARGV.first, optional_use_this_dataset = nil, run_already = true )
click to toggle source
Public Instance Methods
consider_opening_the_url_to_the_homepage_in_the_browser()
click to toggle source
dataset?()
click to toggle source
determine_the_dataset_to_use(i = nil)
click to toggle source
#¶ ↑
determine¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/homepage.rb, line 74 def determine_the_dataset_to_use(i = nil) if i.nil? unless RBT::Cookbooks.const_defined? :Cookbook require 'rbt/cookbooks/class/class.rb' end @dataset = RBT::Cookbooks::Cookbook.new(which_program?) { :bypass_menu } else @dataset = i end end
modify_the_xorg_buffer_if_a_homepage_entry_exists?()
click to toggle source
#¶ ↑
modify_the_xorg_buffer_if_a_homepage_entry_exists¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/homepage.rb, line 67 def modify_the_xorg_buffer_if_a_homepage_entry_exists? @modify_the_xorg_buffer_if_a_homepage_entry_exists end
Also aliased as: modify_the_xorg_buffer?
reset()
click to toggle source
return_homepage()
click to toggle source
run()
click to toggle source
set_this_program(i = '')
click to toggle source
show_all_programs_that_miss_a_homepage_entry()
click to toggle source
#¶ ↑
show_all_programs_that_miss_a_homepage_entry
¶ ↑
This method will show all programs that miss a homepage entry.
#¶ ↑
# File lib/rbt/utility_scripts/homepage.rb, line 132 def show_all_programs_that_miss_a_homepage_entry require 'rbt/cookbooks/class/class.rb' available_programs?.each {|this_program| dataset = RBT::Cookbooks::Cookbook.new(this_program) { :bypass_menu_check } homepage_entry = dataset.homepage? if homepage_entry.nil? _ = ("`#{this_program}`").ljust(15) opnn; e "The program #{sfancy(_)} has no "\ "#{sfancy('homepage: ')} entry." end } end
show_help()
click to toggle source
#¶ ↑
show_help
(help tag)¶ ↑
Invoke this entry point via:
homepage --help
#¶ ↑
# File lib/rbt/utility_scripts/homepage.rb, line 151 def show_help opnn; e 'Currently these options are available for `'+ sfancy('class '+NAMESPACE)+'`:' e e ' --missing-url? # show which cookbook entries lack '\ 'a proper '+sfancy('homepage: entry') e end
show_homepage_of_this_program( this_program = which_program? )
click to toggle source
#¶ ↑
show_homepage_of_this_program
¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/homepage.rb, line 184 def show_homepage_of_this_program( this_program = which_program? ) if this_program.include? '.yml' this_program.sub!(/\.yml$/,'') end _ = return_homepage if _ if _.empty? opnn; e "No homepage has been registered for the program "\ "`#{sfancy(this_program)}`." else # =================================================================== # # Else we have found a homepage entry and will display # our findings to the end-user. # # To test this subsection, try: # # homepage geany # # =================================================================== # opnn; e "The homepage of the program `#{sfancy(this_program)}"\ "` is at:" e e " #{orange(_)}" e if modify_the_xorg_buffer? set_xorg_buffer(_) end end else opnn; e 'No homepage entry is registered in `'+ sfancy(this_program)+'` (The .yml file should be at ' opnn; e simp(" #{individual_cookbooks_dir?}#{this_program}.yml")+ ')' end end
Also aliased as: report_the_homepage
this_program?()
click to toggle source