Last active
June 19, 2017 10:35
-
-
Save m4rr/7814db606971c81e1211f9a156b5accb to your computer and use it in GitHub Desktop.
command line calendar
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
import Foundation.NSFileHandle | |
import Darwin.C.stdlib | |
do { | |
let payload = CommandLine.arguments.dropFirst() | |
let task = try EventTask.create(fromOrdered: Array(payload)) | |
let calendar = CalendarController() | |
try calendar.create(event: task) | |
} catch { | |
var stderr = FileHandle.standardError | |
print(error.localizedDescription, to: &stderr) | |
abort() | |
} | |
print("success") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment