text
stringlengths
0
15.7k
source
stringlengths
6
112
gif jpg png Image_Files
Desktop_Sweeper.applescript
rtf rtfd RTF_Files
Desktop_Sweeper.applescript
scpt Script_Files
Desktop_Sweeper.applescript
sit zip Compressed_Archives
Desktop_Sweeper.applescript
txt Text_Files
Desktop_Sweeper.applescript
textClipping Clipping_Files
Desktop_Sweeper.applescript
webarchive Web_Archives
Desktop_Sweeper.applescript
webbookmark webloc Web_Bookmarks
Desktop_Sweeper.applescript
worksheet BBEdit_Worksheets
Desktop_Sweeper.applescript
set desktopFolder to path to desktop folder
Desktop_Sweeper.applescript
set cleanupFolder to ("" & (path to documents folder) & "Sweep Desktop:")
Desktop_Sweeper.applescript
alias cleanupFolder
Desktop_Sweeper.applescript
do shell script "mkdir " & (quoted form of (POSIX path of cleanupFolder))
Desktop_Sweeper.applescript
set usefileExtFilters to do shell script "sed -E 's![ ]{5,}! !' <<< " & quoted form of fileExtFilters
Desktop_Sweeper.applescript
tell desktop
Desktop_Sweeper.applescript
repeat with i in (paragraphs of usefileExtFilters)
Desktop_Sweeper.applescript
set _temp to {words of first text item, last text item} of contents of i
Desktop_Sweeper.applescript
set itemsToMove to (items whose kind is not "Volume" and name is not in exlusionList and ¬
Desktop_Sweeper.applescript
name does not start with "Cleaned-" and name extension is in (item 1 of _temp) and ¬
Desktop_Sweeper.applescript
label index is not in {2, 6, 7}) as alias list
Desktop_Sweeper.applescript
if itemsToMove ≠ {} then
Desktop_Sweeper.applescript
set end of cleanList to {File_List:itemsToMove, Sub_Folder:item 2 of _temp}
Desktop_Sweeper.applescript
set itemsToMove to (folders whose kind is not "Volume" and name is not in exlusionList and ¬
Desktop_Sweeper.applescript
name does not start with "Cleaned-" and label index is not in {2, 6, 7}) as alias list
Desktop_Sweeper.applescript
set end of cleanList to {File_List:itemsToMove, Sub_Folder:"Folders"}
Desktop_Sweeper.applescript
if cleanList ≠ {} then
Desktop_Sweeper.applescript
set dateTimeString to do shell script "date \"+%Y%m%d-%H%M%S\""
Desktop_Sweeper.applescript
set newFolderName to "Cleaned-" & dateTimeString
Desktop_Sweeper.applescript
set newFolder to make new folder at (cleanupFolder as alias) with properties {name:newFolderName}
Desktop_Sweeper.applescript
set label index of newFolder to 2
Desktop_Sweeper.applescript
set _alias to make alias to newFolder at it
Desktop_Sweeper.applescript
set label index of _alias to 2
Desktop_Sweeper.applescript
repeat with ndx in cleanList
Desktop_Sweeper.applescript
set _folder to (make new folder at newFolder with properties {name:Sub_Folder of ndx}) as alias
Desktop_Sweeper.applescript
move File_List of ndx to _folder
Desktop_Sweeper.applescript
set _folder to (make new folder at newFolder with properties {name:"Miscellaneous_Files"}) as alias
Desktop_Sweeper.applescript
move itemsToMove to _folder
Desktop_Sweeper.applescript
open newFolder
Desktop_Sweeper.applescript
tell application "Finder"'s front window to if its bounds ≠ {0, 44, 844, 1196} ¬
Desktop_Sweeper.applescript
then set its bounds to {0, 44, 844, 1196}
Desktop_Sweeper.applescript
tell current application to set dDlg to display dialog e with title "ERROR!" buttons {"Cancel", "Copy", "OK"} default button "OK"
Desktop_Sweeper.applescript
set url_list to URL of every document
Save Safari URLs.applescript
write url_list to open_file starting at eof
Save Safari URLs.applescript
tell OmnifocusSync
Omnifocus2SyncEvernote.applescript
set success to SyncEvernote() of OmnifocusSync
Omnifocus2SyncEvernote.applescript
display notification "OmnifocusSyncEvernote Completed." with title "Omnifocus2 Sync" subtitle "Sync to Evernote"
Omnifocus2SyncEvernote.applescript
script EvernoteNote
Omnifocus2SyncEvernote.applescript
on findReminderNote(andFilter)
Omnifocus2SyncEvernote.applescript
set filteredNotes to findENNotes("reminderOrder:* -reminderDoneTime:* " & andFilter)
Omnifocus2SyncEvernote.applescript
return filteredNotes
Omnifocus2SyncEvernote.applescript
end findReminderNote
Omnifocus2SyncEvernote.applescript
on findToDoNote(andFilter)
Omnifocus2SyncEvernote.applescript
set filteredNotes to findENNotes("todo:false -todo:true " & andFilter)
Omnifocus2SyncEvernote.applescript
end findToDoNote
Omnifocus2SyncEvernote.applescript
on findENNotes(filter)
Omnifocus2SyncEvernote.applescript
set filteredNotes to find notes filter
Omnifocus2SyncEvernote.applescript
end findENNotes
Omnifocus2SyncEvernote.applescript
on addTagsToNotes(ennotes, tagStrList)
Omnifocus2SyncEvernote.applescript
if length of tagStrList > 0 then
Omnifocus2SyncEvernote.applescript
set tagList to {}
Omnifocus2SyncEvernote.applescript
repeat with t in tagStrList
Omnifocus2SyncEvernote.applescript
if (not (tag named t exists)) then
Omnifocus2SyncEvernote.applescript
make tag with properties {name:t}
Omnifocus2SyncEvernote.applescript
set the end of tagList to tag t
Omnifocus2SyncEvernote.applescript
assign tagList to ennotes
Omnifocus2SyncEvernote.applescript
end addTagsToNotes
Omnifocus2SyncEvernote.applescript
script OmnifocusTask
Omnifocus2SyncEvernote.applescript
on createOmnifocusTaskInInbox(taskName, taskNote, startDate, endDate, flags)
Omnifocus2SyncEvernote.applescript
if (startDate is missing value) then
Omnifocus2SyncEvernote.applescript
if (endDate is missing value) then
Omnifocus2SyncEvernote.applescript
set endDate to current date
Omnifocus2SyncEvernote.applescript
set t to make new inbox task with properties {name:taskName, note:taskNote, defer date:startDate, creation date:current date, due date:endDate, flagged:flags}
Omnifocus2SyncEvernote.applescript
end createOmnifocusTaskInInbox
Omnifocus2SyncEvernote.applescript
script OmnifocusSync
Omnifocus2SyncEvernote.applescript
property completedTagName : "didFinishAddOF2" as text
Omnifocus2SyncEvernote.applescript
on SyncEvernote()
Omnifocus2SyncEvernote.applescript
tell EvernoteNote
Omnifocus2SyncEvernote.applescript
set r to findReminderNote("-tag:" & completedTagName) of EvernoteNote
Omnifocus2SyncEvernote.applescript
createTaskFromNotes(r, {completedTagName})
Omnifocus2SyncEvernote.applescript
set t to findToDoNote("-tag:" & completedTagName) of EvernoteNote
Omnifocus2SyncEvernote.applescript
createTaskFromNotes(t, {completedTagName})
Omnifocus2SyncEvernote.applescript
if length of r > 0 then set success to true
Omnifocus2SyncEvernote.applescript
if length of t > 0 then set success to true
Omnifocus2SyncEvernote.applescript
end SyncEvernote
Omnifocus2SyncEvernote.applescript
on createTaskFromNotes(ennotes, tagnames)
Omnifocus2SyncEvernote.applescript
if (not (ennotes is missing value)) then
Omnifocus2SyncEvernote.applescript
if class of ennotes = class of {} then
Omnifocus2SyncEvernote.applescript
ennotes = {ennotes}
Omnifocus2SyncEvernote.applescript
if length of ennotes > 0 then
Omnifocus2SyncEvernote.applescript
createOmnifocusToDoFromNotes(ennotes)
Omnifocus2SyncEvernote.applescript
addTagsToNotes(ennotes, tagnames) of EvernoteNote
Omnifocus2SyncEvernote.applescript
end createTaskFromNotes
Omnifocus2SyncEvernote.applescript
on createOmnifocusToDoFromNotes(ennotes)
Omnifocus2SyncEvernote.applescript
repeat with n in ennotes
Omnifocus2SyncEvernote.applescript
set t to title of n
Omnifocus2SyncEvernote.applescript
set h to note link of n & (ASCII character (10)) & (ASCII character (10)) & HTML content of n
Omnifocus2SyncEvernote.applescript
set s to current date
Omnifocus2SyncEvernote.applescript
set e to reminder time of n
Omnifocus2SyncEvernote.applescript
tell OmnifocusTask
Omnifocus2SyncEvernote.applescript
createOmnifocusTaskInInbox(t, h, s, e, false) of OmnifocusTask
Omnifocus2SyncEvernote.applescript