document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. on run {inputFile, parameters}
  2.     set theFile to inputFile as text
  3.     set theSlug to (find text "\\\\:([A-Za-z]+)[0-9]{1,3}.aif" in theFile using "\\\\1" with regexp and string result)
  4.     set theNumber to (find text "\\\\:[A-Za-z]+([0-9]{1,3}).aif" in theFile using "\\\\1" with regexp and string result)
  5.     set theResultPath to (find text "(.*?).aif" in theFile using "\\\\1" with regexp and string result)
  6.    
  7.     set theSuggestion to "Enter Podcast Name"
  8.     if theSlug is "theincomparable" then set theSuggestion to "The Incomparable"
  9.     if theSlug is "tpk" then set theSuggestion to "Total Party Kill"
  10.     if theSlug is "tvtm" then set theSuggestion to "TV Talk Machine"
  11.     if theSlug is "teevee" then set theSuggestion to "TeeVee"
  12.     if theSlug is "rocketsurgery" then
  13.         set theSuggestion to "The Incomparable"
  14.         set theSlug to "theincomparable-rocketsurgery"
  15.     end if
  16.     if theSlug is "oldmovieclub" then
  17.         set theSuggestion to "The Incomparable"
  18.         set theSlug to "theincomparable-oldmovieclub"
  19.     end if
  20.    
  21.     set theShow to text returned of (display dialog "What show?" default answer theSuggestion) as string
  22.    
  23.     set theShowNumber to text returned of (display dialog "What episode?" default answer theNumber) as string
  24.    
  25.     set theEpisodeTitle to text returned of (display dialog "What episode title?" default answer "Episode Title") as string
  26.    
  27.     set theEpisodeSummary to text returned of (display dialog "What\'s the description?" default answer "Enter Description") as string
  28.    
  29.     if theSlug is "tpk" then
  30.         set monomode to "s"
  31.         set quality to "128"
  32.     else
  33.         set monomode to "m"
  34.         set quality to "64"
  35.     end if
  36.    
  37.     set theLameCommand to ("/usr/local/bin/lame --noreplaygain --cbr -h -b " & quality & " --resample 44.1 -m " & monomode & " --tt \\"" & theShowNumber & ": " & theEpisodeTitle & "\\" --tc \\"" & theEpisodeSummary & "\\" --ta \\"The Incomparable\\" --tl \\"" & theShow & "\\" --ty `date \'+%Y\'` --ti \\"${HOME}/Dropbox/Logo - The Incomparable/logo-" & theSlug & ".jpg\\" --add-id3v2 \\"" & (POSIX path of theFile) & "\\" \\"${HOME}/Desktop/" & theSlug & theNumber & ".mp3\\"")
  38.    
  39.     do shell script theLameCommand
  40.    
  41. end run
');