Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add commands for cplutil

  • Loading branch information...
commit b874d0931d72132824f7133040f34f3c9fffe559 1 parent 63d188d
Tom Robinson authored committed
View
19 Commands/Convert plist to 280N.tmCommand
@@ -0,0 +1,19 @@
+<?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>cplutil -c 280north1 -o /dev/stdout /dev/stdin
+</string>
+ <key>input</key>
+ <string>selection</string>
+ <key>name</key>
+ <string>Convert plist to 280N</string>
+ <key>output</key>
+ <string>replaceSelectedText</string>
+ <key>uuid</key>
+ <string>8554E13D-6022-4A58-927A-3C8C9B07D2AF</string>
+</dict>
+</plist>
View
28 Commands/Convert plist to XML.tmCommand
@@ -0,0 +1,28 @@
+<?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># based on XML tidy command
+
+if [[ "$TM_SOFT_TABS" = "YES" ]];
+ then export XMLLINT_INDENT=`ruby -e"print(' ' * ${TM_TAB_SIZE})"`
+ else export XMLLINT_INDENT=$'\t'
+fi
+result=`cplutil -c xml1 -o /dev/stdout /dev/stdin | xmllint --format - 2&gt;&amp;1`
+if [[ $? &gt; 0 ]];
+ then exit_show_tool_tip "Errors: $result"
+ else echo "$result"
+fi</string>
+ <key>input</key>
+ <string>selection</string>
+ <key>name</key>
+ <string>Convert plist to XML</string>
+ <key>output</key>
+ <string>replaceSelectedText</string>
+ <key>uuid</key>
+ <string>8A07EC81-0C48-43B3-A264-BC28B35340EB</string>
+</dict>
+</plist>
View
5 info.plist
@@ -18,6 +18,9 @@
<string>56674E30-87CD-4958-A9DC-D6DBDD5EEC7B</string>
<string>05516B4A-B2A1-4464-93BF-19EECFF26E49</string>
<string>C5A588E2-1155-4F30-A023-4CF862AA3F74</string>
+ <string>------------------------------------</string>
+ <string>8A07EC81-0C48-43B3-A264-BC28B35340EB</string>
+ <string>8554E13D-6022-4A58-927A-3C8C9B07D2AF</string>
</array>
<key>submenus</key>
<dict>
@@ -164,6 +167,8 @@
<string>9BABD784-3DBE-4DA3-8A70-4E32FC7FDBB8</string>
<string>0B77AF3E-D6F4-4201-AFA9-BD6003E5F44B</string>
<string>EC56EC3D-E3F8-46A4-BEFD-B8934962B1E9</string>
+ <string>8A07EC81-0C48-43B3-A264-BC28B35340EB</string>
+ <string>8554E13D-6022-4A58-927A-3C8C9B07D2AF</string>
</array>
<key>uuid</key>
<string>DB312A5F-F277-4C72-A6F7-39C9FBF6CC75</string>
Please sign in to comment.
Something went wrong with that request. Please try again.