Commit b37bebc9 authored by Henry Kautz's avatar Henry Kautz

Cleaned up unused code.

parent 8d9385c4
......@@ -20,23 +20,6 @@ repeat with f in sourceFolders
my myExportPhotoFolder(f, dest)
end repeat
(*
if source is missing value then
tell application "Photos"
repeat with a in top level albums
if ignoreList does not contain name of a then
my myExportPhotoAlbum(a, dest)
end if
end repeat
repeat with f in top level folders
my myExportPhotoFolder(f, dest)
end repeat
end tell
else
my myExportPhotoFolder(source, dest)
end if
*)
display dialog "Finished exporting photo albums"
on myExportPhotoFolder(i, dir)
......@@ -55,7 +38,6 @@ end myExportPhotoFolder
on myExportPhotoAlbum(a, dir)
tell application "Photos"
set subdir to dir & (get name of a)
(* my makeFolder(subdir) *)
with timeout of 1800 seconds
set newfolder to sequentially named export of (get media items of a) separator "-" base name (get name of a) without resulting file references
end timeout
......@@ -125,45 +107,3 @@ on simple_sort(my_list)
return the sorted_list
end simple_sort
on toString(anyObj)
local i, txt, errMsg, orgTids, oName, oId, prefix
set txt to ""
repeat with i from 1 to 2
try
if i is 1 then
if class of anyObj is list then
set {orgTids, AppleScript's text item delimiters} to {AppleScript's text item delimiters, {", "}}
set txt to ("{" & anyObj as string) & "}"
set AppleScript's text item delimiters to orgTids # '
else
set txt to anyObj as string
end if
else
set txt to properties of anyObj as string
end if
on error errMsg
# Trick for records and record-*like* objects:
# We exploit the fact that the error message contains the desired string representation of the record, so we extract it from there. This (still) works as of AS 2.3 (OS X 10.9).
try
set txt to do shell script "egrep -o '\\{.*\\}' <<< " & quoted form of errMsg
end try
end try
if txt is not "" then exit repeat
end repeat
set prefix to ""
if class of anyObj is not in {text, integer, real, boolean, date, list, record} and anyObj is not missing value then
set prefix to "[" & class of anyObj
set oName to ""
set oId to ""
try
set oName to name of anyObj
if oName is not missing value then set prefix to prefix & " name=\"" & oName & "\""
end try
try
set oId to id of anyObj
if oId is not missing value then set prefix to prefix & " id=" & oId
end try
set prefix to prefix & "] "
end if
return prefix & txt
end toString
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment