Hi zusammen,
ich suche nach einem Weg, meinen Workflow zu vereinfachen.
Bisher exportiere ich meine Dateien aus Ableton Live als Wav, konvertiere sie mit iTunes zu Mp3, ziehe sie in meinen Dropbox-Ordner und kopiere den Public-Link, um ihn per Mail zu versenden. Ich bin schon so weit, dass ein modifiziertes Droplet von Doug's Apple Script das Konvertieren übernimmt und die Datei in meine Public Folder bewegt.
Was ich aber will:
-Auf Knopfdruck nimmt das Script sich die zuletzt modifizierte Datei aus einem vorher festgelegten Ordner.
-Es konvertiert sie zu MP3
-Zielordner ist meine Dropbox-Publicfolder
-Es kopiert den Public Link für mich
-(Es macht eine Mail mit vorher definiertem Empfänger auf und kopiert den Link in den Text)
Vielleicht hat ja ein Applescript-bewanderter Musiker hier das gleiche Problem bei der Zusammenarbeit über das Internet und möchte helfen. So weit bin ich bisher:
ich suche nach einem Weg, meinen Workflow zu vereinfachen.
Bisher exportiere ich meine Dateien aus Ableton Live als Wav, konvertiere sie mit iTunes zu Mp3, ziehe sie in meinen Dropbox-Ordner und kopiere den Public-Link, um ihn per Mail zu versenden. Ich bin schon so weit, dass ein modifiziertes Droplet von Doug's Apple Script das Konvertieren übernimmt und die Datei in meine Public Folder bewegt.
Was ich aber will:
-Auf Knopfdruck nimmt das Script sich die zuletzt modifizierte Datei aus einem vorher festgelegten Ordner.
-Es konvertiert sie zu MP3
-Zielordner ist meine Dropbox-Publicfolder
-Es kopiert den Public Link für mich
-(Es macht eine Mail mit vorher definiertem Empfänger auf und kopiert den Link in den Text)
Vielleicht hat ja ein Applescript-bewanderter Musiker hier das gleiche Problem bei der Zusammenarbeit über das Internet und möchte helfen. So weit bin ich bisher:
Code:
(*
"Drop A Few My Way" for iTunes
written by Doug Adams
dougadams@mac.com
v2.0 oct 1 2009
- universal binary
- serious maintenance updates (last update was 2004!)
v1.0 mar 9 04
initial release
Get more free AppleScripts and info on writing your own
at Doug's AppleScripts for iTunes
http://dougscripts.com/itunes/
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Get a copy of the GNU General Public License by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
or visit http://www.gnu.org/copyleft/gpl.html
*)
property my_title : "Drap A Few My Way"
property enc_list : {"mp3"}
property encoder_possibilities : {".mp3"}
property errTxt : ("(One or more files may not have been converted correctly.)" & return & return)
global newTrack -- reference to converted track
global newFile -- reference to converted file
global backedupEncoder -- stash encoder from Preferences
global targetLocation -- path to folder where converted files will be saved
global new_filename_and_extension -- name created from type of
global encoder_options -- list of encoders
global new_extension -- extension of new file, based on encoder selection
global encoderShortName -- first item of selected encoder to get string to use in dialogs
global err_mess -- mention an error
on run
display dialog "This is a droplet. Drop audio files on this script's icon to convert them." buttons {"OK"} default button 1
return
(* -- debugging
set err_mess to ""
set fs to (choose file) as list
my proceed_(fs)
*)
end run
on open fs
set err_mess to ""
my proceed_(fs)
end open
on proceed_(fs)
-- plural for dialogs
set s to "s"
if (length of fs) is 1 then set s to ""
my init_encoders_()
set selectedEncoder to ((backedupEncoder))
repeat with i from 1 to length of enc_list
if selectedEncoder starts with (item i of enc_list) then
set new_extension to item i of encoder_possibilities
set encoderShortName to first word of selectedEncoder
end if
end repeat
set targetLocation to ("/users/tim/Dropbox/Public/") as text
tell application "iTunes" to set current encoder to encoder selectedEncoder
repeat with f in fs
try -- skip bad files
with timeout of 30000 seconds -- plenty of time
my itunes_convert_(f)
end timeout
on error m number n
-- log (m & return & n) -- debugging
end try
end repeat
tell application "iTunes" to set current encoder to encoder backedupEncoder
-- comment the next 2 lines to keep from being notified
tell me to activate
tell me to display dialog (err_mess & "Done converting audio file" & s & " to " & encoderShortName & ".") buttons {"Thanks"} default button 1 with title my_title giving up after 5
end proceed_
to itunes_convert_(f)
set finfo to get info for f
set new_filename_and_extension to ((text 1 thru -((length of name extension of finfo) + 2) of (name of finfo)) & new_extension)
tell application "iTunes"
try
set newTrack to first item of (convert f)
set newFile to (get location of newTrack) as text
delete newTrack
on error m number n
-- log (m & return & n) -- debugging
set err_mess to errTxt
end try
end tell
-- move to the new location, rename to ensure appended numbers -- if any -- do not stay with the file name
do shell script "mv " & (quoted form of POSIX path of newFile) & " " & (quoted form of POSIX path of (targetLocation & new_filename_and_extension) as text)
-- remove from location in iTunes Media folder if it's there (most likely)
if (f as text) is not (newFile as text) then do shell script "rm " & (quoted form of POSIX path of newFile)
end itunes_convert_
to init_encoders_()
tell application "iTunes"
launch
set encoder_options to (get name of every encoder)
set backedupEncoder to name of current encoder
end tell
end init_encoders_