Getting designers to be organised...not that impossible

I needed to devise a method  in which to unify the way my motion graphics team worked. Everyone had their own folder structure and system of naming their files. I needed to create order from the chaos.

So I designed a 'project creator' in Apple Script. I really liked the way I could have this utility up in the top corner of the screen, where it is easy for the designer to click on it.

It asks the user a simple set of questions. What is the project called? What channel is it for? Is it a promo, imaging project or a toolkit?

The result is a folder structure that is created on the users work drive, with a consistent naming scheme and all the relevant folders that are needed. The project folder is always prefixed with the date of creation. It helps to organise the project chronologically and to find old projects months after you have finished with it.

I found Apple Script to be quite a different language to code in comparison to other languages. It has a unique syntax that is supposedly easier for humans to read. I am not convinced of that, but I still loved using it and because of it being so closely tied to the operating system, it makes it very powerful. It reminds me of using AREXX on my Amiga computers back in the nineties. Now that was a fantastic computer and the scripting integration was top notch, but that is a story for another day.

Below is the script I made. It is my first time in Apple Script, so you experienced coders out there might have a few things to say, and I do welcome all comments.

-- setting the variables

set theProject to ""
set theChannel to ""
set theType to ""
set theTypePrime to "00_Created Toolkits"
set toolkitType to ""
set theIcon to 0
set theDate to current date
set theDay to ""
set theMonth to ""
set theYear to ""
set theProjectname to ""
set theDisk to "WASD"
set Synology to "Synology"
set etvtoolkitPreset to "Toolkit:03 Toolkits_e.tv:14e_022_TE:14e_022_TE_V06.aep"
set etvprimePreset to "Synology:00 Toolkit Templates:Endboards Template:20150319_TE_Template_V04.aep"
set combosPreset to "Synology:00 Toolkit Templates:Combos_Template:Combos_Template.aep"
set nextupPreset to "Synology:00 Toolkit Templates:Next Up Template:Next Up Template V06.aep"
set strapPreset to "Synology:00 Toolkit Templates:Straps_Template:Strap Template_V01.aep"
set mctoolkitPreset to "Toolkit:03 Toolkits_Multichannel:021_MC_Topical Endboards_V12:021_Topical Endboards_V13.aep"
set ebtoolkitPreset to "Toolkit:03 Toolkits_eBotswana:eB_022_TE_Flattened HD_V02:eB_022_TE_Flattened HD_V02.aep"
set etvtoolkitFile to "14e_022_TE_V06.aep"
set etvprimeFile to "20150319_TE_Template_V04.aep"
set mctoolkitFile to "021_Topical Endboards_V13.aep"
set ebtoolkitFile to "eB_022_TE_Flattened HD_V02.aep"
set combosFile to "Combos_Template.aep"
set nextupFile to "Next Up Template V06.aep"
set strapFile to "Strap Template_V01.aep"
set newPath to ""
set newName to ""

-- converting the date into a usable string

if day of theDate < 10 then
set the theDay to "0" & day of theDate
else
set theDay to day of theDate
end if

if ((month of theDate) * 1) < 10 then
set the theMonth to "0" & (month of theDate) * 1
else
set theMonth to (month of theDate) * 1
end if

if ((year of theDate) * 1) > 10 then
set the theYear to (year of theDate) * 1 as string
else
set theYear to (year of theDate) * 1 as string
end if

-- asking the questions

display dialog "What is the project name?" default answer theProject with icon theIcon
set theProject to text returned of result

choose from list {"Multichannel", "e.tv", "eKasi+", "eMovies+", "eAfrica+", "eToonz+", "BeatLab", "OpenView HD", "eNCA", "eAfrica", "eBotswana", "eGhana", "Miscellaneous"} with prompt "What channel is this for?"
set theChannel to result as text

display dialog "Is this a promo, toolkit or an imaging project?" buttons {"promo", "imaging", "toolkits"}
if button returned of result = "promo" then
set theType to "Promos" as text
else if button returned of result = "imaging" then
set theType to "Channel Imaging" as text
else
set theType to "00_Created Toolkits" as text
end if

if theType = "00_Created Toolkits" then
set toolkitType to choose from list {"nextup", "combo", "endboard daytime", "endboard primetime", "strap"} with prompt "Is this toolkit a nextup, combo or an endboard?"
if toolkitType contains "nextup" then
set theType to "00_Created Next ups" as text
else if toolkitType contains "combo" then
set theType to "00_Created combos" as text
else if toolkitType contains "endboard daytime" then
set theType to "00_Created Toolkits" as text
else if toolkitType contains "endboard primetime" then
set theType to "00_Created Toolkits Prime" as text
else if toolkitType contains "strap" then
set theType to "00_Created Straps" as text
end if
end if
-- creating the full project name and make folders for Imaging

if theType = "Channel Imaging" then
set theProjectname to theYear & theMonth & theDay & "_" & theProject
tell application "Finder"
if not (exists folder theType of disk theDisk) then
make new folder of disk theDisk with properties {name:theType}
end if
end tell

tell application "Finder"
if not (exists folder theChannel of folder theType of disk theDisk) then
make new folder at folder theType of disk theDisk with properties {name:theChannel}
end if
(*-- set the colour of the folder
if theChannel = "e.tv" then
set label index of result to 2
else if theChannel = "eKasi+" then
set label index of result to 6
else if theChannel = "eMovies+" then
set label index of result to 5
else if theChannel = "eAfrica+" then
set label index of result to 1
else if theChannel = "eNCA" then
set label index of result to 4
else if theChannel = "eToonz+" then
set label index of result to 3
end if
*)
end tell

tell application "Finder"
make new folder at folder theChannel of folder theType of disk theDisk with properties {name:theProjectname}
make new folder at folder theProjectname of folder theChannel of folder theType of disk theDisk with properties {name:"01 Documents"}
make new folder at folder theProjectname of folder theChannel of folder theType of disk theDisk with properties {name:"02 Reference"}
make new folder at folder theProjectname of folder theChannel of folder theType of disk theDisk with properties {name:"03 External Elements"}
make new folder at folder theProjectname of folder theChannel of folder theType of disk theDisk with properties {name:"04 Internal Elements"}
make new folder at folder theProjectname of folder theChannel of folder theType of disk theDisk with properties {name:"05 Photoshop"}
make new folder at folder theProjectname of folder theChannel of folder theType of disk theDisk with properties {name:"06 Illustrator"}
make new folder at folder theProjectname of folder theChannel of folder theType of disk theDisk with properties {name:"07 After Effects"}
make new folder at folder theProjectname of folder theChannel of folder theType of disk theDisk with properties {name:"08 Cinema 4D"}
make new folder at folder theProjectname of folder theChannel of folder theType of disk theDisk with properties {name:"09 Flash"}
make new folder at folder theProjectname of folder theChannel of folder theType of disk theDisk with properties {name:"10 Premiere"}
make new folder at folder theProjectname of folder theChannel of folder theType of disk theDisk with properties {name:"11 Test Renders"}
make new folder at folder theProjectname of folder theChannel of folder theType of disk theDisk with properties {name:"12 Approvals"}
make new folder at folder theProjectname of folder theChannel of folder theType of disk theDisk with properties {name:"13 Process Renders"}
make new folder at folder theProjectname of folder theChannel of folder theType of disk theDisk with properties {name:"14 Final Renders"}
make new folder at folder theProjectname of folder theChannel of folder theType of disk theDisk with properties {name:"15 Trash"}

end tell

-- creating the full project name and make folders for Toolkits daytime

else if theType = "00_Created Toolkits" then
set theProjectname to theYear & theMonth & theDay & "_TE_" & theChannel & "_" & theProject
tell application "Finder"
if not (exists folder theType of disk Synology) then
make new folder of disk Synology with properties {name:theType}
end if
end tell

tell application "Finder"
make new folder at folder theType of disk Synology with properties {name:theProjectname}
-- set the colour of the folder
if theChannel = "e.tv" then
set label index of result to 2
else if theChannel = "eKasi+" then
set label index of result to 6
else if theChannel = "eMovies+" then
set label index of result to 5
else if theChannel = "eAfrica+" then
set label index of result to 1
else if theChannel = "eNCA" then
set label index of result to 4
else if theChannel = "eToonz+" then
set label index of result to 3
else if theChannel = "BeatLab" then
set label index of result to 7
end if
make new folder at folder theProjectname of folder theType of disk Synology with properties {name:"Finals"}
if theChannel = "e.tv" then
copy file etvtoolkitPreset to folder theProjectname of folder theType of disk Synology
set newPath to Synology & ":" & theType & ":" & theProjectname & ":" & etvtoolkitFile
set newName to theProjectname & ".aep"
set the name of file newPath to newName
else if theChannel = "eBotswana" then
copy file ebtoolkitPreset to folder theProjectname of folder theType of disk Synology
set newPath to Synology & ":" & theType & ":" & theProjectname & ":" & ebtoolkitFile
set newName to theProjectname & ".aep"
set the name of file newPath to newName
else
copy file mctoolkitPreset to folder theProjectname of folder theType of disk Synology
set newPath to Synology & ":" & theType & ":" & theProjectname & ":" & mctoolkitFile
set newName to theProjectname & ".aep"
set the name of file newPath to newName
end if

end tell

-- creating the full project name and make folders for Toolkits primetime

else if theType = "00_Created Toolkits Prime" then
set theProjectname to theYear & theMonth & theDay & "_EB_" & theChannel & "_" & theProject
tell application "Finder"
if not (exists folder theTypePrime of disk Synology) then
make new folder of disk Synology with properties {name:theTypePrime}
end if
end tell

tell application "Finder"
make new folder at folder theTypePrime of disk Synology with properties {name:theProjectname}
set label index of result to 5
make new folder at folder theProjectname of folder theTypePrime of disk Synology with properties {name:"Finals"}
copy file etvprimePreset to folder theProjectname of folder theTypePrime of disk Synology
set newPath to Synology & ":" & theTypePrime & ":" & theProjectname & ":" & etvprimeFile
set newName to theProjectname & ".aep"
set the name of file newPath to newName


end tell


-- creating the full project name and make folders for Nextups

else if theType = "00_Created Next ups" then
set theProjectname to theYear & theMonth & theDay & "_NU_" & theChannel & "_" & theProject
tell application "Finder"
if not (exists folder theType of disk Synology) then
make new folder of disk Synology with properties {name:theType}
end if
end tell

tell application "Finder"
make new folder at folder theType of disk Synology with properties {name:theProjectname}
make new folder at folder theProjectname of folder theType of disk Synology with properties {name:"Finals"}
copy file nextupPreset to folder theProjectname of folder theType of disk Synology
set newPath to Synology & ":" & theType & ":" & theProjectname & ":" & nextupFile
set newName to theProjectname & ".aep"
set the name of file newPath to newName
end tell



-- creating the full project name and make folders for Combos

else if theType = "00_Created combos" then
set theProjectname to theYear & theMonth & theDay & "_CB_" & theChannel & "_" & theProject
tell application "Finder"
if not (exists folder theType of disk Synology) then
make new folder of disk Synology with properties {name:theType}
end if
end tell

tell application "Finder"
make new folder at folder theType of disk Synology with properties {name:theProjectname}
make new folder at folder theProjectname of folder theType of disk Synology with properties {name:"Finals"}
copy file combosPreset to folder theProjectname of folder theType of disk Synology
set newPath to Synology & ":" & theType & ":" & theProjectname & ":" & combosFile
set newName to theProjectname & ".aep"
set the name of file newPath to newName
end tell


-- creating the full project name and make folders for Straps

else if theType = "00_Created Straps" then
set theProjectname to theYear & theMonth & theDay & "_ST_" & theChannel & "_" & theProject
tell application "Finder"
if not (exists folder theType of disk Synology) then
make new folder of disk Synology with properties {name:theType}
end if
end tell

tell application "Finder"
make new folder at folder theType of disk Synology with properties {name:theProjectname}
make new folder at folder theProjectname of folder theType of disk Synology with properties {name:"Finals"}
copy file strapPreset to folder theProjectname of folder theType of disk Synology
set newPath to Synology & ":" & theType & ":" & theProjectname & ":" & strapFile
set newName to theProjectname & ".aep"
set the name of file newPath to newName
end tell



-- creating the full project name and make folders for Promos

else if theType = "Promos" then
set theProjectname to theYear & theMonth & theDay & "_" & theChannel & "_" & theProject
tell application "Finder"
if not (exists folder theType of disk theDisk) then
make new folder of disk theDisk with properties {name:theType}
end if
end tell

tell application "Finder"
make new folder at folder theType of disk theDisk with properties {name:theProjectname}
(*-- set the colour of the folder
if theChannel = "e.tv" then
set label index of result to 2
else if theChannel = "eKasi+" then
set label index of result to 6
else if theChannel = "eMovies+" then
set label index of result to 5
else if theChannel = "eAfrica+" then
set label index of result to 1
else if theChannel = "eNCA" then
set label index of result to 4
else if theChannel = "eToonz+" then
set label index of result to 3
end if
*)

make new folder at folder theProjectname of folder theType of disk theDisk with properties {name:"01 Documents"}
make new folder at folder theProjectname of folder theType of disk theDisk with properties {name:"02 Reference"}
make new folder at folder theProjectname of folder theType of disk theDisk with properties {name:"03 External Elements"}
make new folder at folder theProjectname of folder theType of disk theDisk with properties {name:"04 Internal Elements"}
make new folder at folder theProjectname of folder theType of disk theDisk with properties {name:"05 Photoshop"}
make new folder at folder theProjectname of folder theType of disk theDisk with properties {name:"06 Illustrator"}
make new folder at folder theProjectname of folder theType of disk theDisk with properties {name:"07 After Effects"}
make new folder at folder theProjectname of folder theType of disk theDisk with properties {name:"08 Cinema 4D"}
make new folder at folder theProjectname of folder theType of disk theDisk with properties {name:"09 Flash"}
make new folder at folder theProjectname of folder theType of disk theDisk with properties {name:"10 Premiere"}
make new folder at folder theProjectname of folder theType of disk theDisk with properties {name:"11 Test Renders"}
make new folder at folder theProjectname of folder theType of disk theDisk with properties {name:"12 Approvals"}
make new folder at folder theProjectname of folder theType of disk theDisk with properties {name:"13 Process Renders"}
make new folder at folder theProjectname of folder theType of disk theDisk with properties {name:"14 Final Renders"}
make new folder at folder theProjectname of folder theType of disk theDisk with properties {name:"15 Trash"}

end tell
end if