AMApplicationBuild 528 AMApplicationVersion 2.10 AMDocumentVersion 2 actions action AMAccepts Container List Optional Types com.apple.cocoa.path AMActionVersion 1.1.2 AMApplication Finder AMParameterProperties fileNames AMProvides Container List Types com.apple.cocoa.path ActionBundlePath /System/Library/Automator/Get Specified Finder Items.action ActionName Get Specified Finder Items ActionParameters fileNames ~/Documents/git/all-to-md/SUPPLY AGREEMENT as of 4th Feb 2025 2.docx BundleIdentifier com.apple.Automator.SpecifiedFiles CFBundleVersion 1.1.2 CanShowSelectedItemsWhenRun CanShowWhenRun Category AMCategoryFilesAndFolders Class Name SpecifiedFilesAction InputUUID F2C0BBD2-5ED4-4558-A428-93EB713B8828 Keywords File Choose Find Get OutputUUID ACDCFBFA-A60E-4906-BC57-C7C3376F95F2 UUID CC25BC39-428E-414D-9E88-949F159D465C UnlocalizedApplications Finder arguments 0 default value name fileNames required 0 type 0 uuid 0 conversionLabel 0 isViewVisible 1 location 406.000000:360.000000 nibPath /System/Library/Automator/Get Specified Finder Items.action/Contents/Resources/Base.lproj/main.nib isViewVisible 1 action AMAccepts Container List Optional Types com.apple.cocoa.string AMActionVersion 2.0.3 AMApplication Automator AMParameterProperties COMMAND_STRING CheckedForUserDefaultShell inputMethod shell source AMProvides Container List Types com.apple.cocoa.string ActionBundlePath /System/Library/Automator/Run Shell Script.action ActionName Run Shell Script ActionParameters COMMAND_STRING export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" SUPPORTED_EXTENSIONS=( adoc asciidoc asc bib creole csv tsv djot docx epub fb2 htm html xhtml ipynb json tex latex ltx md markdown mkd mdown lhs muse odt opml org pod pptx ris rst rtf t2t textile typ xlsx xml dbk ) is_supported() { local ext="${${1##*.}:l}" for e in "${SUPPORTED_EXTENSIONS[@]}"; do [[ "$e" == "$ext" ]] && return 0 done return 1 } for f in "$@"; do dir=$(dirname "$f") base=$(basename "$f") name="${base%.*}" ext="${${base##*.}:l}" output="$dir/$name.md" if [[ "$ext" == "md" || "$ext" == "markdown" ]]; then osascript -e "display notification \"Already Markdown: $base\" with title \"Convert to Markdown\"" continue fi if ! is_supported "$base"; then osascript -e "display notification \"Unsupported format: .$ext\" with title \"Convert to Markdown\"" continue fi if pandoc "$f" -o "$output" 2>/tmp/pandoc_err; then osascript -e "display notification \"Saved: $name.md\" with title \"Convert to Markdown\" sound name \"Glass\"" else err=$(head -1 /tmp/pandoc_err) osascript -e "display notification \"Error: $err\" with title \"Convert to Markdown\"" fi done CheckedForUserDefaultShell inputMethod 1 shell /bin/zsh source BundleIdentifier com.apple.RunShellScript CFBundleVersion 2.0.3 CanShowSelectedItemsWhenRun CanShowWhenRun Category AMCategoryUtilities Class Name RunShellScriptAction InputUUID B4A77AFE-5A69-4A47-9A73-29F1FD3F3CF2 Keywords Shell Script Command Run Unix OutputUUID C8A9D9E2-1234-4567-8901-ABCDEF012345 UUID A1B2C3D4-E5F6-7890-ABCD-EF1234567890 UnlocalizedApplications Automator arguments 0 default value 0 name inputMethod required 0 type 0 uuid 0 1 default value name CheckedForUserDefaultShell required 0 type 0 uuid 1 2 default value name source required 0 type 0 uuid 2 3 default value name COMMAND_STRING required 0 type 0 uuid 3 4 default value /bin/sh name shell required 0 type 0 uuid 4 isViewVisible location 406.000000:542.000000 nibPath /System/Library/Automator/Run Shell Script.action/Contents/Resources/Base.lproj/main.nib isViewVisible connectors ECA4817A-970E-4276-B8FC-E9D13303C0B2 from CC25BC39-428E-414D-9E88-949F159D465C - CC25BC39-428E-414D-9E88-949F159D465C to A1B2C3D4-E5F6-7890-ABCD-EF1234567890 - A1B2C3D4-E5F6-7890-ABCD-EF1234567890 workflowMetaData applicationBundleID com.apple.finder applicationBundleIDsByPath /System/Library/CoreServices/Finder.app com.apple.finder applicationPath /System/Library/CoreServices/Finder.app applicationPaths /System/Library/CoreServices/Finder.app inputTypeIdentifier com.apple.Automator.fileSystemObject.document outputTypeIdentifier com.apple.Automator.nothing presentationMode 15 processesInput serviceApplicationBundleID com.apple.finder serviceApplicationPath /System/Library/CoreServices/Finder.app serviceInputTypeIdentifier com.apple.Automator.fileSystemObject.document serviceOutputTypeIdentifier com.apple.Automator.nothing serviceProcessesInput systemImageName NSActionTemplate useAutomaticInputType workflowTypeIdentifier com.apple.Automator.servicesMenu