-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from jfding/sync-with-mac-reminders
Sync with mac reminders
- Loading branch information
Showing
7 changed files
with
62 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env osascript | ||
|
||
-- Get the first argument or use default value | ||
on run argv | ||
if (count of argv) is 0 then | ||
set boxname to "today" | ||
else | ||
set boxname to item 1 of argv | ||
end if | ||
|
||
tell application "Reminders" | ||
set todos to do shell script "todor --inbox " & boxname & " list --plain" | ||
if todos is "" then | ||
return | ||
end if | ||
|
||
if not (exists list "Todor") then | ||
make new list with properties {name:"Todor"} | ||
end if | ||
|
||
set mylist to list "Todor" | ||
|
||
tell mylist | ||
set AppleScript's text item delimiters to return | ||
set todoLines to text items of todos | ||
repeat with todo in todoLines | ||
if not (exists reminder todo) then | ||
make new reminder with properties {name:todo, body:""} | ||
end if | ||
end repeat | ||
end tell | ||
end tell | ||
end run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters