Skip to content

Instantly share code, notes, and snippets.

@tschoof
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tschoof/6ed9100fa05e635cadd6 to your computer and use it in GitHub Desktop.
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
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
@tschoof
Copy link
Author

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