Hi, I love the script but it can be tedious to convert the downloaded files. I wrote a apple-script app for mac users to export mp3 files faster and easier. Feel free to post it. 1) Copy and paste the text into Script Editor app. 2) Export as app. 3) Drag the app to the dock for easy drag and drop. 4) Extract downloaded zip and drop the folder on to the app. The app will export the mp3 and move it into the parent directory of the zip file. It will then move the zip file into the extracted folder and send the folder to the trash.
Text to paste:
on open (these_files) -- just use first file if more than one set this_path to (quoted form of basedir(POSIX path of (first item of these_files))) set Zip to text 1 through -3 of this_path & ".zip'" tell application "Terminal" activate do script "cd " & this_path & "; bash " & this_path & "generate.mp3.sh;mv -f *.mp3 ..;mv " & Zip & " " & this_path & "" in window 1 set isBusy to true repeat until isBusy is false tell application "Terminal" tell window 1 set isBusy to busy as boolean --> Test if busy end tell end tell end repeat quit end tell tell application "Finder" to move these_files to the trash end open on basedir(the_path) set last_occurrence to last_offset(the_path, "/") if last_occurrence is equal to 0 then return "." end if if last_occurrence is equal to 1 then return "/" end if return items 1 thru (last_occurrence) of the_path as string end basedir on last_offset(the_text, char) try set len to count of the_text set reversed to reverse of characters of the_text as string set last_occurrence to len - (offset of char in reversed) + 1 if last_occurrence > len then return 0 end if on error return 0 end try return last_occurrence end last_offset
Hi, I love the script but it can be tedious to convert the downloaded files. I wrote a apple-script app for mac users to export mp3 files faster and easier. Feel free to post it.
1) Copy and paste the text into Script Editor app.
2) Export as app.
3) Drag the app to the dock for easy drag and drop.
4) Extract downloaded zip and drop the folder on to the app.
The app will export the mp3 and move it into the parent directory of the zip file. It will then move the zip file into the extracted folder and send the folder to the trash.
Text to paste:
on open (these_files)
-- just use first file if more than one
set this_path to (quoted form of basedir(POSIX path of (first item of these_files)))
set Zip to text 1 through -3 of this_path & ".zip'"
tell application "Terminal"
activate
do script "cd " & this_path & "; bash " & this_path & "generate.mp3.sh;mv -f *.mp3 ..;mv " & Zip & " " & this_path & "" in window 1
set isBusy to true
repeat until isBusy is false
tell application "Terminal"
tell window 1
set isBusy to busy as boolean --> Test if busy
end tell
end tell
end repeat
quit
end tell
tell application "Finder" to move these_files to the trash
end open
on basedir(the_path)
set last_occurrence to last_offset(the_path, "/")
if last_occurrence is equal to 0 then
return "."
end if
if last_occurrence is equal to 1 then
return "/"
end if
return items 1 thru (last_occurrence) of the_path as string
end basedir
on last_offset(the_text, char)
try
set len to count of the_text
set reversed to reverse of characters of the_text as string
set last_occurrence to len - (offset of char in reversed) + 1
if last_occurrence > len then
return 0
end if
on error
return 0
end try
return last_occurrence
end last_offset