Skip to content

Instantly share code, notes, and snippets.

@LevitatingBusinessMan
Created October 16, 2024 09:16
Show Gist options
  • Save LevitatingBusinessMan/62b9ed94dd9f2e196d70b86fb91ef657 to your computer and use it in GitHub Desktop.
Save LevitatingBusinessMan/62b9ed94dd9f2e196d70b86fb91ef657 to your computer and use it in GitHub Desktop.
Print archnews rss feed
#!/usr/bin/env ruby
require 'rss'
require 'open-uri'
require 'rainbow/refinement'
using Rainbow
puts 'https://archlinux.org/'
url = 'https://archlinux.org/feeds/news/'
URI.open(url) do |rss|
feed = RSS::Parser.parse(rss)
feed.items.each do |item|
puts "#{item.date.strftime '%d %b %y'} #{item.title.yellow}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment