Created
January 31, 2011 12:22
-
-
Save deplorableword/803956 to your computer and use it in GitHub Desktop.
sudo gem install ticketmaster, sudo gem install ticketmaster-lighthouse. usage: ruby lighthoust-export.rb accoutname username password projectid
This file contains 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 'rubygems' | |
require 'ticketmaster' | |
require 'ticketmaster-lighthouse' | |
Lighthouse.account = ARGV[0] | |
Lighthouse.authenticate(ARGV[1],ARGV[2]) | |
all_tickets = Lighthouse::Ticket.find(:all, :params => { :project_id => ARGV[3] }) | |
begin | |
File.delete("export.html") | |
rescue | |
end | |
export = File.new("export.html", "w+") | |
all_tickets.each do |ticket| | |
export.puts('<h1> (#'+ticket.id.to_s+') '+ticket.title+'</h1>') | |
if (ticket.original_body != nil) | |
export.puts('<p>'+ticket.original_body+'</p>') | |
end | |
export.puts('<hr />') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment