Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
AppleScript that passes variables to a script, executes it to generate a podcast-ready mp3
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
Owner

tschoof commented Mar 21, 2015

The encode-podcast.sh I'm referencing is a fork of Marco Arment's

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment