machine_archivist/Scan to Archive.app/Contents/document.wflow
2025-04-06 19:58:31 +02:00

124 lines
4 KiB
XML

<?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>527</string>
<key>AMApplicationVersion</key>
<string>2.10</string>
<key>AMDocumentVersion</key>
<string>2</string>
<key>actions</key>
<array>
<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.applescript.object</string>
</array>
</dict>
<key>AMActionVersion</key>
<string>1.0.2</string>
<key>AMApplication</key>
<array>
<string>Automator</string>
</array>
<key>AMParameterProperties</key>
<dict>
<key>source</key>
<dict/>
</dict>
<key>AMProvides</key>
<dict>
<key>Container</key>
<string>List</string>
<key>Types</key>
<array>
<string>com.apple.applescript.object</string>
</array>
</dict>
<key>ActionBundlePath</key>
<string>/System/Library/Automator/Run AppleScript.action</string>
<key>ActionName</key>
<string>Run AppleScript</string>
<key>ActionParameters</key>
<dict>
<key>source</key>
<string>tell application "Terminal"
-- Check if there are any open windows
if (count of windows) is greater than 0 then
-- Get the position of the first window
set windowPos to position of window 1
-- Use the first window if it's open
set existingWindow to window 1
do script "~/thesis/code/scan.sh; sleep 2; ~/thesis/code/publish.sh; exit" in existingWindow
else
-- If no windows are open, create a new window and set its position to the last window's position
set windowPos to {200, 200} -- Default position if no window was open previously
do script "~/thesis/code/scan.sh; sleep 2; ~/thesis/code/publish.sh; exit"
set position of the front window to windowPos
end if
activate
end tell
delay 3 -- Wait for the scripts to finish executing
tell application "Terminal"
-- Close all Terminal windows
set terminalWindows to every window
repeat with aWindow in terminalWindows
if busy of aWindow is false then
close aWindow
end if
end repeat
end tell</string>
</dict>
<key>BundleIdentifier</key>
<string>com.apple.Automator.RunScript</string>
<key>CFBundleVersion</key>
<string>1.0.2</string>
<key>CanShowSelectedItemsWhenRun</key>
<false/>
<key>CanShowWhenRun</key>
<true/>
<key>Category</key>
<array>
<string>AMCategoryUtilities</string>
</array>
<key>Class Name</key>
<string>RunScriptAction</string>
<key>InputUUID</key>
<string>8C226B47-458F-4409-BF3A-8ABE247C1FF2</string>
<key>Keywords</key>
<array>
<string>Run</string>
</array>
<key>OutputUUID</key>
<string>F5590A01-ECCB-4790-974A-DA4BC1310717</string>
<key>UUID</key>
<string>45370EDA-E9D5-465E-B975-C2D83FE6A8D4</string>
<key>UnlocalizedApplications</key>
<array>
<string>Automator</string>
</array>
<key>arguments</key>
<dict>
<key>0</key>
<dict>
<key>default value</key>
<string>on run {input, parameters}
(* Your script goes here *)
return input
end run</string>
<key>name</key>
<string>source</string>
<key>required</key>
<string>0</string>
<key>type</key>
<string>0</string>
<key>uuid</key>
<string>0</string>
</dict>
</dict>
<key>isViewVisible</key>
<integer>1</integer>
<key>location</key>
<string>631.500000:680.000000</string>
<key>nibPath</key>
<string>/System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib</string>
</dict>
<key>isViewVisible</key>
<integer>1</integer>
</dict>
</array>
<key>connectors</key>
<dict/>
<key>workflowMetaData</key>
<dict>
<key>workflowTypeIdentifier</key>
<string>com.apple.Automator.application</string>
</dict>
</dict>
</plist>