Method: Html2rss::CLI#feed
- Defined in:
- lib/html2rss/cli.rb
#feed(yaml_file, *options) ⇒ nil
Prints the feed to STDOUT.
25 26 27 28 29 30 31 32 |
# File 'lib/html2rss/cli.rb', line 25 def feed(yaml_file, *) raise "File '#{yaml_file}' does not exist" unless File.exist?(yaml_file) feed_name = .shift unless .first&.include?('=') params = .to_h { |opt| opt.split('=', 2) } puts Html2rss.feed_from_yaml_config(yaml_file, feed_name, params:) end |