Guest User

Untitled

a guest
Feb 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2.  
  3. def process_line(line)
  4. if line =~ /(.*):(\d*):(.*)/ then
  5. "<a href=\"txmt://open?url=file://#{ENV['TM_DIRECTORY']}/#{$1}&line=#{$2}\">#{$1}:#{$2}: #{$3}</a><br/>"
  6. else
  7. line + "<br/>"
  8. end
  9. end
  10.  
  11. system "make &> /tmp/textmake.output"
  12. File.open("/tmp/textmake.output") do |f|
  13. f.each do |line|
  14. puts process_line(line)
  15. end
  16. end
Add Comment
Please, Sign In to add comment