Created
April 11, 2011 18:14
-
-
Save atoulme/913970 to your computer and use it in GitHub Desktop.
A simple script to scrap a set of jira issues from Jira. You should always use the "printable" url of the filter you pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'uri' | |
require 'net/http' | |
require 'rubygems' | |
require 'hpricot' | |
def extract_updates(url) | |
html = Net::HTTP.get(URI.parse(url)) | |
doc = Hpricot(html) | |
table = doc.search("//*[@id='issuetable']") | |
table.search("//*[@class='nav duedate']").remove | |
table.search("//*[@class='nav progress']").remove | |
table.search("//*[@class='nav created']").remove | |
table.search("//*[@class='nav issuekey']").remove | |
table.search("//*[@class='colHeaderLink headerrow-issuekey']").remove | |
table.search("//*[@class='colHeaderLink headerrow-created']").remove | |
table.search("//*[@class='colHeaderLink headerrow-duedate']").remove | |
table.search("//*[@class='colHeaderLink headerrow-progress']").remove | |
puts table | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment