mirror of
https://github.com/kennethreitz-archive/kHTML.tmbundle.git
synced 2026-06-21 08:00:58 +00:00
34 lines
967 B
Plaintext
Executable File
34 lines
967 B
Plaintext
Executable File
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>beforeRunningCommand</key>
|
|
<string>nop</string>
|
|
<key>command</key>
|
|
<string>#!/usr/bin/env ruby
|
|
table = STDIN.readlines
|
|
table = table.collect { |row| row.gsub(/\n/, '').split(/\t+/) }
|
|
puts "<table>"
|
|
table.each do |row|
|
|
print "\t<tr>"
|
|
row.each_with_index do |cell, index|
|
|
print index == 0 ? "<th>#{cell}</th>" : "<td>#{cell}</td>"
|
|
end
|
|
print "</tr>\n"
|
|
end
|
|
puts "</table>"</string>
|
|
<key>input</key>
|
|
<string>selection</string>
|
|
<key>keyEquivalent</key>
|
|
<string>^~@T</string>
|
|
<key>name</key>
|
|
<string>tabs -> table (th left)</string>
|
|
<key>output</key>
|
|
<string>replaceSelectedText</string>
|
|
<key>scope</key>
|
|
<string>text.html</string>
|
|
<key>uuid</key>
|
|
<string>AC460DE9-5703-4FDA-8729-D635BD3F50B3</string>
|
|
</dict>
|
|
</plist>
|