Source

Open in Textmate (Service) / Open In Textmate.workflow / Contents / document.wflow

Full commit
<?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>AMApplicationBuild</key>
	<string>247.1</string>
	<key>AMApplicationVersion</key>
	<string>2.1.1</string>
	<key>AMDocumentVersion</key>
	<string>2</string>
	<key>actions</key>
	<array>
		<dict>
			<key>action</key>
			<dict>
				<key>AMActionVersion</key>
				<string>1.0</string>
				<key>AMParameterProperties</key>
				<dict>
					<key>enteredText</key>
					<dict/>
				</dict>
				<key>AMProvides</key>
				<dict>
					<key>Container</key>
					<string>List</string>
					<key>Types</key>
					<array>
						<string>com.apple.applescript.text-object</string>
					</array>
				</dict>
				<key>AMRequiredResources</key>
				<array/>
				<key>ActionBundlePath</key>
				<string>/System/Library/Automator/Get Specified Text.action</string>
				<key>ActionName</key>
				<string>Get Specified Text</string>
				<key>ActionParameters</key>
				<dict>
					<key>enteredText</key>
					<string>Enter test text here.
e.g. /Users/matt/document.py</string>
				</dict>
				<key>Application</key>
				<array>
					<string>TextEdit</string>
				</array>
				<key>BundleIdentifier</key>
				<string>com.apple.GetSpecifiedText</string>
				<key>CFBundleVersion</key>
				<string>1.0</string>
				<key>CanShowSelectedItemsWhenRun</key>
				<true/>
				<key>CanShowWhenRun</key>
				<false/>
				<key>Category</key>
				<array>
					<string>AMCategoryText</string>
				</array>
				<key>Class Name</key>
				<string>AMAppleScriptAction</string>
				<key>Disabled</key>
				<true/>
				<key>Keywords</key>
				<array>
					<string>Get</string>
					<string>Text</string>
				</array>
				<key>OutputUUID</key>
				<string>7E4391A5-7650-4CBD-A236-F17A7336C740</string>
				<key>UUID</key>
				<string>4CF0138E-872E-49EC-A39A-B5B87BCAE487</string>
				<key>UnlocalizedApplications</key>
				<array>
					<string>TextEdit</string>
				</array>
				<key>arguments</key>
				<dict>
					<key>0</key>
					<dict>
						<key>default value</key>
						<string></string>
						<key>name</key>
						<string>enteredText</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>0</string>
					</dict>
				</dict>
				<key>isViewVisible</key>
				<true/>
				<key>location</key>
				<string>309.500000:554.000000</string>
				<key>nibPath</key>
				<string>/System/Library/Automator/Get Specified Text.action/Contents/Resources/English.lproj/main.nib</string>
			</dict>
			<key>isViewVisible</key>
			<true/>
		</dict>
		<dict>
			<key>action</key>
			<dict>
				<key>AMAccepts</key>
				<dict>
					<key>Container</key>
					<string>List</string>
					<key>Optional</key>
					<true/>
					<key>Types</key>
					<array>
						<string>com.apple.cocoa.string</string>
					</array>
				</dict>
				<key>AMActionVersion</key>
				<string>2.0.1</string>
				<key>AMParameterProperties</key>
				<dict>
					<key>COMMAND_STRING</key>
					<dict/>
					<key>CheckedForUserDefaultShell</key>
					<dict/>
					<key>inputMethod</key>
					<dict/>
					<key>shell</key>
					<dict/>
					<key>source</key>
					<dict/>
				</dict>
				<key>AMProvides</key>
				<dict>
					<key>Container</key>
					<string>List</string>
					<key>Types</key>
					<array>
						<string>com.apple.cocoa.string</string>
					</array>
				</dict>
				<key>ActionBundlePath</key>
				<string>/System/Library/Automator/Run Shell Script.action</string>
				<key>ActionName</key>
				<string>Run Shell Script</string>
				<key>ActionParameters</key>
				<dict>
					<key>COMMAND_STRING</key>
					<string>import sys, os.path

URL = "txmt://open?line=%s\&amp;url=file://%s"
for f in sys.stdin:
    try:
        line = f.split(', ')[1].split('line ')[1]
        filename = f.split('"')[1]
        if os.path.exists(filename):
            url = URL % (
                line, filename
            )
            os.system('open %s' % url)
    except IndexError:
        if os.path.exists(f):
            url = URL % (1, f)
            os.system('open %s' % url)
</string>
					<key>CheckedForUserDefaultShell</key>
					<true/>
					<key>inputMethod</key>
					<integer>0</integer>
					<key>shell</key>
					<string>/usr/bin/python</string>
					<key>source</key>
					<string></string>
				</dict>
				<key>Application</key>
				<array>
					<string>Automator</string>
				</array>
				<key>BundleIdentifier</key>
				<string>com.apple.RunShellScript</string>
				<key>CFBundleVersion</key>
				<string>2.0.1</string>
				<key>CanShowSelectedItemsWhenRun</key>
				<false/>
				<key>CanShowWhenRun</key>
				<true/>
				<key>Category</key>
				<array>
					<string>AMCategoryUtilities</string>
				</array>
				<key>Class Name</key>
				<string>RunShellScriptAction</string>
				<key>InputUUID</key>
				<string>FFE85E4C-0A61-46A9-917D-AE15E71C2E0C</string>
				<key>Keywords</key>
				<array>
					<string>Shell</string>
					<string>Script</string>
					<string>Command</string>
					<string>Run</string>
					<string>Unix</string>
				</array>
				<key>OutputUUID</key>
				<string>AF714C78-14A7-42D3-9E8B-C22D788891E3</string>
				<key>UUID</key>
				<string>FCFF8F97-B498-43D3-BFE6-F8FA0EFA5421</string>
				<key>UnlocalizedApplications</key>
				<array>
					<string>Automator</string>
				</array>
				<key>arguments</key>
				<dict>
					<key>0</key>
					<dict>
						<key>default value</key>
						<integer>0</integer>
						<key>name</key>
						<string>inputMethod</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>0</string>
					</dict>
					<key>1</key>
					<dict>
						<key>default value</key>
						<string></string>
						<key>name</key>
						<string>source</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>1</string>
					</dict>
					<key>2</key>
					<dict>
						<key>default value</key>
						<false/>
						<key>name</key>
						<string>CheckedForUserDefaultShell</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>2</string>
					</dict>
					<key>3</key>
					<dict>
						<key>default value</key>
						<string></string>
						<key>name</key>
						<string>COMMAND_STRING</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>3</string>
					</dict>
					<key>4</key>
					<dict>
						<key>default value</key>
						<string>/bin/sh</string>
						<key>name</key>
						<string>shell</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>4</string>
					</dict>
				</dict>
				<key>isViewVisible</key>
				<true/>
				<key>location</key>
				<string>309.500000:387.000000</string>
				<key>nibPath</key>
				<string>/System/Library/Automator/Run Shell Script.action/Contents/Resources/English.lproj/main.nib</string>
			</dict>
			<key>isViewVisible</key>
			<true/>
		</dict>
	</array>
	<key>connectors</key>
	<dict>
		<key>7BB5B1CD-7A13-48CF-BAC0-AA0B9A753D50</key>
		<dict>
			<key>from</key>
			<string>4CF0138E-872E-49EC-A39A-B5B87BCAE487 - 4CF0138E-872E-49EC-A39A-B5B87BCAE487</string>
			<key>to</key>
			<string>FCFF8F97-B498-43D3-BFE6-F8FA0EFA5421 - FCFF8F97-B498-43D3-BFE6-F8FA0EFA5421</string>
		</dict>
	</dict>
	<key>state</key>
	<dict>
		<key>AMLogTabViewSelectedIndex</key>
		<integer>0</integer>
		<key>libraryState</key>
		<dict>
			<key>actionsMajorSplitViewState</key>
			<dict>
				<key>expandedPosition</key>
				<real>0.0</real>
				<key>subviewState</key>
				<array>
					<string>0.000000, 0.000000, 381.000000, 515.000000, NO</string>
					<string>0.000000, 516.000000, 381.000000, 239.000000, NO</string>
				</array>
			</dict>
			<key>actionsMinorSplitViewState</key>
			<dict>
				<key>expandedPosition</key>
				<real>0.0</real>
				<key>subviewState</key>
				<array>
					<string>0.000000, 0.000000, 163.000000, 515.000000, NO</string>
					<string>164.000000, 0.000000, 217.000000, 515.000000, NO</string>
				</array>
			</dict>
			<key>variablesMajorSplitViewState</key>
			<dict>
				<key>expandedPosition</key>
				<real>0.0</real>
				<key>subviewState</key>
				<array>
					<string>0.000000, 0.000000, 350.000000, 555.000000, NO</string>
					<string>0.000000, 556.000000, 350.000000, 148.000000, NO</string>
				</array>
			</dict>
			<key>variablesMinorSplitViewState</key>
			<dict>
				<key>expandedPosition</key>
				<real>0.0</real>
				<key>subviewState</key>
				<array>
					<string>0.000000, 0.000000, 163.000000, 555.000000, NO</string>
					<string>164.000000, 0.000000, 186.000000, 555.000000, NO</string>
				</array>
			</dict>
		</dict>
		<key>majorSplitViewState</key>
		<dict>
			<key>expandedPosition</key>
			<real>0.0</real>
			<key>subviewState</key>
			<array>
				<string>0.000000, 0.000000, 381.000000, 800.000000, NO</string>
				<string>382.000000, 0.000000, 619.000000, 800.000000, NO</string>
			</array>
		</dict>
		<key>minorSplitViewState</key>
		<dict>
			<key>expandedPosition</key>
			<real>0.0</real>
			<key>subviewState</key>
			<array>
				<string>0.000000, 0.000000, 619.000000, 609.000000, NO</string>
				<string>0.000000, 619.000000, 619.000000, 162.000000, NO</string>
			</array>
		</dict>
		<key>windowFrame</key>
		<string>{{920, 181}, {1000, 877}}</string>
		<key>workflowViewScrollPosition</key>
		<string>{{0, 0}, {619, 609}}</string>
	</dict>
	<key>workflowMetaData</key>
	<dict>
		<key>serviceInputTypeIdentifier</key>
		<string>com.apple.Automator.text</string>
		<key>serviceOutputTypeIdentifier</key>
		<string>com.apple.Automator.nothing</string>
		<key>workflowTypeIdentifier</key>
		<string>com.apple.Automator.servicesMenu</string>
	</dict>
</dict>
</plist>