Created
August 26, 2008 11:47
-
-
Save cth/7247 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env ruby | |
def process_line(line) | |
if line =~ /(.*):(\d*):(.*)/ then | |
"<a href=\"txmt://open?url=file://#{ENV['TM_DIRECTORY']}/#{$1}&line=#{$2}\">#{$1}:#{$2}: #{$3}</a><br/>" | |
else | |
line + "<br/>" | |
end | |
end | |
system "make &> /tmp/textmake.output" | |
File.open("/tmp/textmake.output") do |f| | |
f.each do |line| | |
puts process_line(line) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment