# File lib/wpstools/plugins/list_generator/list_generator_plugin.rb, line 4 def initialize super(author: 'WPScanTeam - @FireFart') register_options( ['--generate-plugin-list [NUMBER_OF_PAGES]', '--gpl', Integer, 'Generate a new data/plugins.txt file. (supply number of *pages* to parse, default : 150)'], ['--generate-full-plugin-list', '--gfpl', 'Generate a new full data/plugins.txt file'], ['--generate-theme-list [NUMBER_OF_PAGES]', '--gtl', Integer, 'Generate a new data/themes.txt file. (supply number of *pages* to parse, default : 150)'], ['--generate-full-theme-list', '--gftl', 'Generate a new full data/themes.txt file'], ['--generate-all', '--ga', 'Generate a new full plugins, full themes, popular plugins and popular themes list'] ) end
# File lib/wpstools/plugins/list_generator/list_generator_plugin.rb, line 18 def run(options = {}) @verbose = options[:verbose] || false generate_all = options[:generate_all] || false if options.has_key?(:generate_plugin_list) || generate_all most_popular('plugin', options[:generate_plugin_list] || 150) end if options[:generate_full_plugin_list] || generate_all full('plugin') end if options.has_key?(:generate_theme_list) || generate_all most_popular('theme', options[:generate_theme_list] || 150) end if options[:generate_full_theme_list] || generate_all full('theme') end end
Generated with the Darkfish Rdoc Generator 2.