AMApplicationBuild 509 AMApplicationVersion 2.10 AMDocumentVersion 2 actions action AMAccepts Container List Optional Types com.apple.applescript.object AMActionVersion 1.0 AMApplication Automator AMParameterProperties source AMProvides Container List Types com.apple.applescript.object ActionBundlePath /System/Library/Automator/Run JavaScript.action ActionName Run JavaScript ActionParameters source // To make this work as a keyboard shortcut see: // https://apple.stackexchange.com/a/276839 function run(input, parameters) { var out = []; var a = input[0].split("\n"); var chords = null; var chordsWidth = 0; for (var i = 0; i < a.length; i++) { var l = a[i].replace(/\s+$/, ''); if (l.length == 0) { chords = null; out.push(""); continue; } if (chords == null) { chords = []; var re = /[\w#]+/g; while ((match = re.exec(l)) != null) { chords.push(match); } chordsWidth = l.length; } else { l = l.padEnd(chordsWidth, ' '); for (var j = chords.length - 1; j >= 0; j--) { var c = chords[j]; l = [l.slice(0, c.index), "^{" + c[0] + "}", l.slice(c.index)].join(''); } out.push(l + ' \\\\'); chords = null; } } return out.join("\n"); } BundleIdentifier com.apple.Automator.RunJavaScript CFBundleVersion 1.0 CanShowSelectedItemsWhenRun CanShowWhenRun Category AMCategoryUtilities Class Name RunJavaScriptAction InputUUID 555334C7-BCA3-4076-93AF-83AFBC032149 Keywords Run JavaScript OutputUUID 49501A03-B942-40B3-B7FF-F8FCAB781925 UUID DF3317F5-9683-4C3A-A867-C4ADAD810C4D UnlocalizedApplications Automator arguments 0 default value function run(input, parameters) { // Your script goes here return input; } name source required 0 type 0 uuid 0 isViewVisible 1 location 533.250000:548.000000 nibPath /System/Library/Automator/Run JavaScript.action/Contents/Resources/Base.lproj/main.nib isViewVisible 1 connectors workflowMetaData applicationBundleIDsByPath applicationPaths inputTypeIdentifier com.apple.Automator.text outputTypeIdentifier com.apple.Automator.text presentationMode 11 processesInput 0 serviceInputTypeIdentifier com.apple.Automator.text serviceOutputTypeIdentifier com.apple.Automator.text serviceProcessesInput 0 systemImageName NSActionTemplate useAutomaticInputType 0 workflowTypeIdentifier com.apple.Automator.servicesMenu