git.guelker.eu uranus / master Rakefile
master

Tree @master (Download .tar.gz)

Rakefile @masterraw · history · blame

require_relative "lib/uranus"

desc "Update all feeds and regenerate the planet."
task :update do
  puts "Step 1: Updating feeds..."

  feeds = []

  config = Uranus::Config.new("config.yml")
  config.feeds.each_pair do |title, config|
    feed = Uranus::Feed.new(title, config)
    feeds << feed

    print "Updating #{title} at #{feed.url}... "
    feed.fetch!
    puts "ok"
  end

  puts "Step 2: Generating planet..."
  Uranus::Generator.new(feeds).generate!

  puts "Wrote planet to #{config.output_dir}."
end