diff --git a/README.md b/README.md index 7b46b44..ae6ced0 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,84 @@ [license]: https://github.com/nukokusa/koyomi/blob/master/LICENSE Koyomi is a simple schedule client for Google Calendar. + +## Usage + +``` +Usage: koyomi + +Flags: + -h, --help Show context-sensitive help. + --credential="credential.json" JSON credential file for access to calendar + --loglevel="INFO" Logging level: DEBUG, INFO, WARN, ERROR + -v, --version Show Version + +Commands: + list --calendar-id=STRING --start-time=STRING --end-time=STRING + List events + + create --calendar-id=STRING --start-time=STRING --end-time=STRING + Creates an event + + update --calendar-id=STRING --event-id=STRING + Updates an event + + delete --calendar-id=STRING --event-id=STRING + Deletes an event +``` + +### List Events + +``` +Usage: koyomi list --calendar-id=STRING --start-time=STRING --end-time=STRING + +List events + +Flags: + --calendar-id=STRING Calendar identifier + -s, --start-time=STRING The start time of the event + -e, --end-time=STRING The end time of the event +``` + +### Creates an Event + +``` +Usage: koyomi create --calendar-id=STRING --start-time=STRING --end-time=STRING + +Creates an event + +Flags: + --calendar-id=STRING Calendar identifier + --summary=STRING Title of the event + --description=STRING Descriptuon of the event + -s, --start-time=STRING The start time of the event + -e, --end-time=STRING The end time of the event +``` + +### Updates an Event + +``` +Usage: koyomi update --calendar-id=STRING --event-id=STRING + +Updates an event + +Flags: + --calendar-id=STRING Calendar identifier + --event-id=STRING Identifier of the event + --summary=STRING Title of the event + --description=STRING Description of the event + -s, --start-time=STRING The start time of the event + -e, --end-time=STRING The end time of the event +``` + +### Deletes an Event + +``` +Usage: koyomi delete --calendar-id=STRING --event-id=STRING + +Deletes an event + +Flags: + --calendar-id=STRING Calendar identifier + --event-id=STRING Identifier of the event +``` diff --git a/go.mod b/go.mod index a6d06b9..e88627a 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/nukokusa/koyomi go 1.20 require ( + github.com/Songmu/flextime v0.1.0 github.com/alecthomas/kong v0.7.1 github.com/google/go-cmp v0.5.9 github.com/hashicorp/logutils v1.0.0 diff --git a/go.sum b/go.sum index a41dae5..dbce09a 100644 --- a/go.sum +++ b/go.sum @@ -6,6 +6,8 @@ cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGB cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Songmu/flextime v0.1.0 h1:sss5IALl84LbvU/cS5D1cKNd5ffT94N2BZwC+esgAJI= +github.com/Songmu/flextime v0.1.0/go.mod h1:ofUSZ/qj7f1BfQQ6rEH4ovewJ0SZmLOjBF1xa8iE87Q= github.com/alecthomas/assert/v2 v2.1.0 h1:tbredtNcQnoSd3QBhQWI7QZ3XHOVkw1Moklp2ojoH/0= github.com/alecthomas/kong v0.7.1 h1:azoTh0IOfwlAX3qN9sHWTxACE2oV8Bg2gAwBsMwDQY4= github.com/alecthomas/kong v0.7.1/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U=