Skip to content

Instantly share code, notes, and snippets.

@BrianEnigma
Created February 6, 2014 00:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrianEnigma/8836066 to your computer and use it in GitHub Desktop.
Save BrianEnigma/8836066 to your computer and use it in GitHub Desktop.
Grab and locally cache comments from multiple WordPress blogs
#!/usr/bin/ruby
URL_LIST = [
'site1', 'http://example.com/comments/feed/',
'site2', 'http://example.com/comments/feed/',
'site3', 'http://example.com/comments/feed/',
]
position = 0
while position < URL_LIST.length
name = URL_LIST[position]
link = URL_LIST[position + 1]
cmd = "wget -q -O #{name}.xml '#{link}'"
system(cmd)
position += 2
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment