-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEvernoteGatherToday.applescript
59 lines (54 loc) · 1.59 KB
/
EvernoteGatherToday.applescript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
tell application "Evernote"
my set_reminder(notes of notebook "inbox")
my move_to_today(notes of notebook "inbox")
my move_to_todo(notes of notebook "inbox")
end tell
tell application "Evernote"
my move_to_today(find notes "tag:_tomorrow")
end tell
tell application "Evernote"
set day_of_week to weekday of (current date)
if day_of_week is Monday then
my move_to_today(find notes "tag:_nextWeek")
else if day_of_week is Tuesday then
my move_to_today(find notes "tag:_tuesday")
else if day_of_week is Wednesday then
my move_to_today(find notes "tag:_wednesday")
else if day_of_week is Thursday then
my move_to_today(find notes "tag:_thursday")
else if day_of_week is Friday then
my move_to_today(find notes "tag:_friday")
else if day_of_week is Saturday then
my move_to_today(find notes "tag:_nextWeekend")
else if day_of_week is Sunday then
my move_to_today(find notes "tag:_sunday")
end if
end tell
on set_reminder(matches)
tell application "Evernote"
if ((count of matches) > 0) then
repeat with theNote in matches
if not (exists reminder order of theNote) then
set the reminder order of theNote to current date
end if
end repeat
end if
end tell
end set_reminder
on move_to_today(matches)
tell application "Evernote"
if ((count of matches) > 0) then
set today_tag to tag named "_today"
assign today_tag to matches
end if
end tell
end move_to_today
on move_to_todo(matches)
tell application "Evernote"
if ((count of matches) > 0) then
repeat with match in matches
move match to notebook "ToDo"
end repeat
end if
end tell
end move_to_todo