mirror of
https://github.com/kennethreitz-archive/kHTML.tmbundle.git
synced 2026-06-05 23:40:19 +00:00
32 lines
884 B
Plaintext
Executable File
32 lines
884 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 { |cell| print "<td>#{cell}</td>" }
|
|
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</string>
|
|
<key>output</key>
|
|
<string>replaceSelectedText</string>
|
|
<key>scope</key>
|
|
<string>text.html</string>
|
|
<key>uuid</key>
|
|
<string>8B7C5284-8665-408A-9EA5-469503B7EE54</string>
|
|
</dict>
|
|
</plist>
|