Created
December 14, 2012 14:55
-
-
Save gms8994/4285989 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| tell application "Calendar" | |
| tell calendar "Calendar" | |
| set theStartDate to ((current date) - 1 * days) | |
| set time of theStartDate to 1 * hours | |
| set theEndDate to (current date) | |
| set time of theEndDate to 1 * hours | |
| set theEventListString to "" | |
| set theEventList to every event where start date > theStartDate and end date < theEndDate | |
| repeat with theEvent in theEventList | |
| set theSummary to summary of theEvent | |
| set theEventStart to start date of theEvent | |
| set theEventStart to time string of theEventStart | |
| set theEventEnd to end date of theEvent | |
| set theEventEnd to time string of theEventEnd | |
| set theEventListString to theEventListString & "* **[#calendar]** " & theEventStart & " " & theEventEnd & " " & theSummary & " | |
| " | |
| end repeat | |
| copy theEventListString to stdout | |
| end tell | |
| end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment