Last active
August 29, 2015 14:17
-
-
Save tschoof/6ed9100fa05e635cadd6 to your computer and use it in GitHub Desktop.
AppleScript that passes variables to a script, executes it to generate a podcast-ready mp3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set title to text returned of (display dialog "Episode Title?" default answer "Episodentitel") as string | |
set summary to text returned of (display dialog "Description?" default answer "Interessante Beschreibung") as string | |
tell application "Finder" | |
set theFile to (get selection) as alias | |
set theFile to (POSIX path of theFile) as string | |
end tell | |
set theLameCommand to ("/bin/bash /path/to/encode-podcast.sh -t \"" & title & "\" -s \"" & summary & "\" \"" & theFile & "\"") | |
tell application "Terminal" | |
activate | |
delay 1 | |
tell application "System Events" | |
keystroke "n" using {command down} | |
keystroke theLameCommand | |
keystroke (key code 36) - Return Key | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The encode-podcast.sh I'm referencing is a fork of Marco Arment's