calendar-assistant 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57a695007c637201348e3d625d20ea076b33a08e5d00cf1a0c8dc2d7e09c68ec
4
- data.tar.gz: 57a2575e0a149d1a9480bf7d3990a412cc8f23dc8409a3ccf33a38f9c044e81f
3
+ metadata.gz: 98a2b95396339756f78030efdc8bab6106b47f9c09f5363d9a7097736fa2e10a
4
+ data.tar.gz: b2ce18e6aceeae81a41975bd9126901aede98b272023d625ef1fe63b59c27264
5
5
  SHA512:
6
- metadata.gz: 5340ebdb6a3dd34bf39315debc91b7f5c1ba05a4915e5991d43aeb7046c949f39b7fb9a7391c8f20e76412f56e1b5de219816f093d2d8ed470d06d9f2304d3a9
7
- data.tar.gz: c0322c182c45fe87d94199219a434db96a9f8b13d702e2b2832b5a846914afb98c29cb669081b6ae4324229412102f48196ce6dde969f331941bd188d4897007
6
+ metadata.gz: 07b2596d086f9d0a7e87545e22ed287488c53935de4cc5e56b6e3578bd7265b1f2bdd14f974f717b0809e404c86fc95100c106664240aac86e812dfd4845cab7
7
+ data.tar.gz: e7bb29fb7dfe084cd30ddb5b339722e6204fa460c895c3c4e67f289cc78e69e321e80c645aa415ce96e90313e7f87cc90cd9a32f39093bc06cfe56c13c330ec4
data/Gemfile CHANGED
@@ -8,4 +8,5 @@ group :optional do
8
8
  gem "autotest"
9
9
  gem "rspec-autotest"
10
10
  gem "test_notifier"
11
+ gem "pry"
11
12
  end
data/README.md CHANGED
@@ -1,32 +1,50 @@
1
-
2
1
  # calendar assistant
3
2
 
4
- A command-line tool to help me manage my Google Calendar.
3
+ A command-line tool to help you manage your Google Calendar.
5
4
 
6
- - book (and re-book) one-on-ones and other meetings automatically
7
- - set up all-day events to let people know your location in the world
8
5
  - easily join the videoconference for your current meeting
6
+ - see yours and others' "availability" suitable for an email response
7
+ - set up all-day events to let people know where you are (for frequent travelers)
8
+ - see views on your calendar events for a date or time range
9
+ - book (and re-book) one-on-ones and other meetings automatically
9
10
 
10
11
  [![Concourse CI](https://ci.nokogiri.org/api/v1/teams/calendar-assistants/pipelines/calendar-assistant/jobs/rake-spec/badge)](https://ci.nokogiri.org/teams/calendar-assistants/pipelines/calendar-assistant)
11
12
  [![Maintainability](https://api.codeclimate.com/v1/badges/3525792e1feeccfd8875/maintainability)](https://codeclimate.com/github/flavorjones/calendar-assistant/maintainability)
12
13
 
13
- ## Usage
14
-
15
- Head to [the quickstart](https://developers.google.com/calendar/quickstart/ruby) to enable the Calendar API for your Google account and create a new "project". Save the project info in `credentials.json`.
16
-
17
- Then run `calendar-assistant authorize PROFILE_NAME` (see below for details).
18
-
19
- Once you're authorized, feel free to delete the `credentials.json` file. You can re-download that info again if you ever need it.
20
-
14
+ <!-- toc -->
15
+
16
+ - [Features](#features)
17
+ * [Pretty Display in Your Terminal](#pretty-display-in-your-terminal)
18
+ * [Human-Friendly Date and Time Specification](#human-friendly-date-and-time-specification)
19
+ * [Human-Friendly Duration Specification](#human-friendly-duration-specification)
20
+ * [Preferences](#preferences)
21
+ - [Setup](#setup)
22
+ * [Installation](#installation)
23
+ * [Set up a Google Cloud Project with API access](#set-up-a-google-cloud-project-with-api-access)
24
+ * [Authorize access to your Google Calendar](#authorize-access-to-your-google-calendar)
25
+ - [Commands](#commands)
26
+ * [`join`: Join a video call attached to a meeting](#join-join-a-video-call-attached-to-a-meeting)
27
+ * [`availability`: Find people's availability for meetings](#availability-find-peoples-availability-for-meetings)
28
+ * [`location-set`: Tell people where you are in the world](#location-set-tell-people-where-you-are-in-the-world)
29
+ * [`location`: View where you're going to be in the world](#location-view-where-youre-going-to-be-in-the-world)
30
+ * [`show`: View your calendar events](#show-view-your-calendar-events)
31
+ * [`config`: View your configuration parameters](#config-view-your-configuration-parameters)
32
+ - [Development](#development)
33
+ * [Tests](#tests)
34
+ * [Generate README](#generate-readme)
35
+ - [References](#references)
36
+ - [License](#license)
37
+
38
+ <!-- tocstop -->
21
39
 
22
40
  ## Features
23
41
 
24
- ### Pretty Display
42
+ ### Pretty Display in Your Terminal
25
43
 
26
- Events are nicely formatted, with faint strikeouts for events you've declined, and some additional attributes listed when present (e.g., "needsAction", "self", "not-busy", "1:1" ...)
44
+ Events are nicely formatted, with faint strikeouts for events you've declined, and some additional attributes listed when present (e.g., "awaiting", "self", "not-busy", "1:1" ...)
27
45
 
28
46
 
29
- ### Date and Time Specification
47
+ ### Human-Friendly Date and Time Specification
30
48
 
31
49
  All dates and times are interpreted by [Chronic](https://github.com/mojombo/chronic) and so can be fuzzy terms like "tomorrow", "tuesday", "next thursday", and "two days from now" as well as specific dates and times.
32
50
 
@@ -38,178 +56,98 @@ For a date range or a datetime range, split the start and end with `..` or `...`
38
56
  Also note that every command will adopt an intelligent default, which is generally "today" or "now".
39
57
 
40
58
 
41
- ### Duration Specification
59
+ ### Human-Friendly Duration Specification
42
60
 
43
61
  Some duration-related preferences are interpreted by [ChronicDuration](https://github.com/henrypoydar/chronic_duration) and so can be terms like "10m", "30 minutes", "four hours", etc.
44
62
 
45
63
 
46
64
  ### Preferences
47
65
 
48
- All tokens and preferences will be stored in `~/.calendar-assistant` which is in TOML format.
66
+ All tokens and preferences will be stored in `~/.calendar-assistant` which is in TOML format for easy editing.
49
67
 
50
68
 
51
- ## Commands
52
-
53
- <pre>
54
- <b>$</b> calendar-assistant help
55
- Commands:
56
- calendar-assistant authorize PROFILE_NAME # create (or validate) a profile named NAME with calendar access
57
- calendar-assistant availability [DATE | DATERANGE | TIMERANGE] # Show your availability for a date or range of dates (default 'today')
58
- calendar-assistant config # Dump your configuration parameters (merge of defaults and overrides from /home/flavorjones/.calendar-assistant)
59
- calendar-assistant help [COMMAND] # Describe available commands or one specific command
60
- calendar-assistant join [TIME] # Open the URL for a video call attached to your meeting at time TIME (default 'now')
61
- calendar-assistant location [DATE | DATERANGE] # Show your location for a date or range of dates (default 'today')
62
- calendar-assistant location-set LOCATION [DATE | DATERANGE] # Set your location to LOCATION for a date or range of dates (default 'today')
63
- calendar-assistant show [DATE | DATERANGE | TIMERANGE] # Show your events for a date or range of dates (default 'today')
69
+ ## Setup
64
70
 
65
- Options:
66
- -h, -?, [--help], [--no-help]
67
- -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
68
- [--debug], [--no-debug] # how dare you suggest there are bugs
69
- </pre>
71
+ ### Installation
70
72
 
73
+ Install the gem: `gem install calendar-assistant`.
71
74
 
72
- ### View your configuration parameters
73
75
 
74
- Calendar Assistant has intelligent defaults, which can be overridden in the TOML file `~/.calendar-assistant`, and further overridden via command-line parameters. Sometimes it's nice to be able to see what defaults Calendar Assistant is using:
76
+ ### Set up a Google Cloud Project with API access
75
77
 
76
78
  <pre>
77
- <b>$</b> calendar-assistant help config
78
79
  Usage:
79
- calendar-assistant config
80
+ calendar-assistant setup
80
81
 
81
82
  Options:
82
83
  -h, -?, [--help], [--no-help]
83
- -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
84
84
  [--debug], [--no-debug] # how dare you suggest there are bugs
85
85
 
86
- Dump your configuration parameters (merge of defaults and overrides from /home/flavorjones/.calendar-assistant)
87
- </pre>
88
-
89
- The output is TOML, which is suitable for dumping into `~/.calendar-assistant` and editing.
90
-
91
- <pre>
92
- <b>$</b> calendar-assistant config
86
+ Description:
87
+ This command will walk you through setting up a Google Cloud Project, enabling the Google Calendar
88
+ API, and saving the credentials necessary to access the API on behalf of users.
93
89
 
94
- [settings]
95
- end-of-day = "6pm"
96
- meeting-length = "30m"
97
- profile = "work"
98
- start-of-day = "9am"
90
+ If you already have downloaded client credentials, you don't need to run this command. Instead,
91
+ rename the downloaded JSON file to `/home/user/.calendar-assistant.client`
99
92
  </pre>
100
93
 
101
94
 
102
95
  ### Authorize access to your Google Calendar
103
96
 
104
97
  <pre>
105
- <b>$</b> calendar-assistant help authorize
106
98
  Usage:
107
99
  calendar-assistant authorize PROFILE_NAME
108
100
 
109
101
  Options:
110
102
  -h, -?, [--help], [--no-help]
111
- -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
112
103
  [--debug], [--no-debug] # how dare you suggest there are bugs
113
104
 
114
105
  Description:
115
- Create and authorize a named profile (e.g., "work", "home", "me@example.com") to access your calendar.
116
-
117
- When setting up a profile, you'll be asked to visit a URL to authenticate, grant authorization, and generate and persist an access token.
106
+ Create and authorize a named profile (e.g., "work", "home", "flastname@company.tld") to access your
107
+ calendar.
118
108
 
119
- In order for this to work, you'll need to follow the instructions at this URL first:
109
+ When setting up a profile, you'll be asked to visit a URL to authenticate, grant authorization, and
110
+ generate and persist an access token.
120
111
 
121
- > https://developers.google.com/calendar/quickstart/ruby
122
-
123
- Namely, the prerequisites are:
124
- 1. Turn on the Google API for your account
125
- 2. Create a new Google API Project
126
- 3. Download the configuration file for the Project, and name it as `credentials.json`
112
+ In order for this to work, you'll need to have set up your API client credentials. Run
113
+ `calendar-assistant help setup` for instructions.
127
114
  </pre>
128
115
 
129
- This command will generate a URL which you should load in your browser while logged in as the Google account you wish to authorize. Generate a token, and paste the token back into `calendar-assistant`.
130
-
131
- Your access token will be stored in `~/.calendar-assistant` in the `[tokens]` section.
132
116
 
133
-
134
- ### Display your calendar events
117
+ ## Commands
135
118
 
136
119
  <pre>
137
- <b>$</b> calendar-assistant help show
138
- Usage:
139
- calendar-assistant show [DATE | DATERANGE | TIMERANGE]
120
+ Commands:
121
+ calendar-assistant authorize PROFILE_NAME # create (or validate) a profil...
122
+ calendar-assistant availability [DATE | DATERANGE | TIMERANGE] # Show your availability for a ...
123
+ calendar-assistant config # Dump your configuration param...
124
+ calendar-assistant help [COMMAND] # Describe available commands o...
125
+ calendar-assistant join [TIME] # Open the URL for a video call...
126
+ calendar-assistant location [DATE | DATERANGE] # Show your location for a date...
127
+ calendar-assistant location-set LOCATION [DATE | DATERANGE] # Set your location to LOCATION...
128
+ calendar-assistant setup # Link your local calendar-assi...
129
+ calendar-assistant show [DATE | DATERANGE | TIMERANGE] # Show your events for a date o...
130
+ calendar-assistant version # Display the version of calend...
140
131
 
141
132
  Options:
142
- -c, [--commitments], [--no-commitments] # only show events that you've accepted with another person
143
- -h, -?, [--help], [--no-help]
144
- -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
145
- [--debug], [--no-debug] # how dare you suggest there are bugs
146
-
147
- Show your events for a date or range of dates (default 'today')
148
- </pre>
149
-
150
- For example: display all events scheduled for tomorrow:
151
-
152
- <pre>
153
- <b>$</b> calendar-assistant show --profile=work 2018-10-01
154
- <i>me@example.com (all times in America/New_York)
155
- </i>
156
- 2018-10-01 <b> | 🗺 Mines of Moria </b><i> (not-busy, self)</i>
157
- <strike>2018-10-01 03:30 - 05:00 | Generate enterprise portals </strike>
158
- <strike>2018-10-01 07:30 - 08:30 | Incentivize wireless functionalities </strike>
159
- <strike>2018-10-01 07:30 - 08:30 | Brand end-to-end action-items </strike>
160
- 2018-10-01 08:00 - 09:00<b> | Grow web-enabled synergies </b><i> (recurring, self)</i>
161
- 2018-10-01 09:00 - 10:30<b> | Disintermediate integrated web services </b><i> (self)</i>
162
- 2018-10-01 10:30 - 10:55<b> | Architect sticky synergies </b><i> (1:1, recurring)</i>
163
- 2018-10-01 11:00 - 11:30<b> | Leverage out-of-the-box supply-chains </b><i> (recurring)</i>
164
- 2018-10-01 11:30 - 12:00<b> | Architect dot-com portals </b><i> (1:1, recurring)</i>
165
- <strike>2018-10-01 11:50 - 12:00 | Grow out-of-the-box convergence </strike>
166
- 2018-10-01 12:00 - 12:30<b> | Morph leading-edge experiences </b><i> (self)</i>
167
- <strike>2018-10-01 12:15 - 12:30 | Revolutionize innovative communities </strike>
168
- <strike>2018-10-01 12:30 - 13:30 | Evolve mission-critical e-services </strike>
169
- 2018-10-01 12:30 - 13:30<b> | Embrace world-class e-tailers </b><i> (recurring)</i>
170
- 2018-10-01 13:30 - 14:50<b> | Deliver out-of-the-box infomediaries </b><i> (self)</i>
171
- <strike>2018-10-01 13:30 - 14:30 | Transform user-centric e-tailers </strike>
172
- 2018-10-01 15:00 - 15:30<b> | Aggregate magnetic e-business </b><i> (1:1)</i>
173
- 2018-10-01 16:00 - 17:00<b> | Leverage turn-key e-tailers </b><i> (1:1, recurring)</i>
174
- 2018-10-01 16:45 - 17:00<b> | Monetize real-time interfaces </b><i> (recurring)</i>
175
- 2018-10-01 17:00 - 17:30<b> | Generate out-of-the-box technologies </b><i> (recurring)</i>
176
- 2018-10-01 17:30 - 17:55<b> | Strategize enterprise communities </b><i> (1:1, recurring)</i>
177
- <strike>2018-10-01 18:00 - 20:30 | Redefine 24/365 infrastructures </strike>
178
- <strike>2018-10-01 18:30 - 19:00 | Innovate vertical e-business </strike>
179
- <strike>2018-10-01 19:00 - 19:30 | Repurpose seamless deliverables </strike>
180
- </pre>
181
-
182
- Display _only_ the commitments I have to other people using the `-c` option:
183
-
184
- <pre>
185
- <b>$</b> calendar-assistant show -c 2018-10-01
186
- <i>me@example.com (all times in America/New_York)
187
- </i>
188
- 2018-10-01 10:30 - 10:55<b> | Exploit b2b synergies </b><i> (1:1, recurring)</i>
189
- 2018-10-01 11:00 - 11:30<b> | Reinvent customized systems </b><i> (recurring)</i>
190
- 2018-10-01 11:30 - 12:00<b> | Incentivize visionary users </b><i> (1:1, recurring)</i>
191
- 2018-10-01 12:30 - 13:30<b> | Engineer robust roi </b><i> (recurring)</i>
192
- 2018-10-01 15:00 - 15:30<b> | Exploit next-generation content </b><i> (1:1)</i>
193
- 2018-10-01 16:00 - 17:00<b> | Integrate sticky platforms </b><i> (1:1, recurring)</i>
194
- 2018-10-01 16:45 - 17:00<b> | Enhance intuitive portals </b><i> (recurring)</i>
195
- 2018-10-01 17:00 - 17:30<b> | Reinvent viral platforms </b><i> (recurring)</i>
196
- 2018-10-01 17:30 - 17:55<b> | Incubate magnetic interfaces </b><i> (1:1, recurring)</i>
133
+ -h, -?, [--help], [--no-help]
134
+ [--debug], [--no-debug] # how dare you suggest there are bugs
197
135
  </pre>
198
136
 
199
137
 
200
- ### Join a video call attached to a meeting
138
+ ### `join`: Join a video call attached to a meeting
201
139
 
202
140
  <pre>
203
- <b>$</b> calendar-assistant help join
204
141
  Usage:
205
142
  calendar-assistant join [TIME]
206
143
 
207
144
  Options:
208
- [--join], [--no-join] # launch a browser to join the video call URL
209
- # Default: true
210
- -h, -?, [--help], [--no-help]
211
- -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
212
- [--debug], [--no-debug] # how dare you suggest there are bugs
145
+ [--join], [--no-join] # launch a browser to join the video call URL
146
+ # Default: true
147
+ -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
148
+ [--local-store=FILENAME] # Load events from a local file instead of Google Calendar
149
+ -h, -?, [--help], [--no-help]
150
+ [--debug], [--no-debug] # how dare you suggest there are bugs
213
151
 
214
152
  Open the URL for a video call attached to your meeting at time TIME (default 'now')
215
153
  </pre>
@@ -218,33 +156,39 @@ Some examples:
218
156
 
219
157
  <pre>
220
158
  <b>$</b> calendar-assistant join
221
- 2018-09-28 11:30 - 12:00 | Status Meeting (recurring)
222
- https://pivotal.zoom.us/j/ABC90210
223
- # ... and opens the URL, which is associated with an event happening now
224
-
225
- <b>$</b> calendar-assistant join work --no-join 11:30
226
- 2018-09-28 11:30 - 12:00 | Status Meeting (recurring)
227
- https://pivotal.zoom.us/j/ABC90210
228
- # ... and does not open the URL
159
+ <i>me@example.com</i>
160
+
161
+ 2018-10-01 11:30 - 12:00<b> | Facilitate customized web-readiness </b><i> (1:1, recurring)</i>
162
+
163
+ https://pivotal.zoom.us/j/ABC90210 <i># ... and opens the videoconference URL</i>
164
+
165
+
166
+ <b>$</b> calendar-assistant join work 11:30 --no-join
167
+ <i>me@example.com</i>
168
+
169
+ 2018-10-01 11:30 - 12:00<b> | Facilitate customized web-readiness </b><i> (1:1, recurring)</i>
170
+
171
+ https://pivotal.zoom.us/j/ABC90210 <i># ... and does not open the URL</i>
229
172
  </pre>
230
173
 
231
174
 
232
- ### Find your availability for meetings
175
+ ### `availability`: Find people's availability for meetings
233
176
 
234
177
  This is useful for emailing people your availability. It only considers `accepted` meetings when determining busy/free.
235
178
 
236
179
  <pre>
237
- <b>$</b> calendar-assistant help availability
238
180
  Usage:
239
181
  calendar-assistant availability [DATE | DATERANGE | TIMERANGE]
240
182
 
241
183
  Options:
242
- -l, [--meeting-length=LENGTH] # [default 30m] find chunks of available time at least as long as LENGTH (which is a ChronicDuration string like '30m' or '2h')
243
- -s, [--start-of-day=TIME] # [default 9am] find chunks of available time after TIME (which is a Chronic string like '9am' or '14:30')
244
- -e, [--end-of-day=TIME] # [default 6pm] find chunks of available time before TIME (which is a Chronic string like '9am' or '14:30')
245
- -h, -?, [--help], [--no-help]
246
- -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
247
- [--debug], [--no-debug] # how dare you suggest there are bugs
184
+ -l, [--meeting-length=LENGTH] # [default 30m] find chunks of available time at least as long as LENGTH (which is a ChronicDuration string like '30m' or '2h')
185
+ -s, [--start-of-day=TIME] # [default 9am] find chunks of available time after TIME (which is a BusinessTime string like '9am' or '14:30')
186
+ -e, [--end-of-day=TIME] # [default 6pm] find chunks of available time before TIME (which is a BusinessTime string like '9am' or '14:30')
187
+ -a, [--attendees=ATTENDEE1[,ATTENDEE2[,...]]] # [default 'me'] people (email IDs) to whom this command will be applied
188
+ -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
189
+ [--local-store=FILENAME] # Load events from a local file instead of Google Calendar
190
+ -h, -?, [--help], [--no-help]
191
+ [--debug], [--no-debug] # how dare you suggest there are bugs
248
192
 
249
193
  Show your availability for a date or range of dates (default 'today')
250
194
  </pre>
@@ -253,72 +197,93 @@ Show your availability for a date or range of dates (default 'today')
253
197
  For example: show me my available time over a chunk of time:
254
198
 
255
199
  <pre>
256
- <b>$</b> calendar-assistant avail 2018-10-02..2018-10-04
257
- <i>me@example.com
258
- - all times in America/New_York
259
- - looking for blocks at least 30 mins long
260
- </i>
261
- <b>Availability on Tuesday, October 2:
200
+ <b>$</b> calendar-assistant avail 2018-11-05..2018-11-07
201
+ <i>me@example.com</i>
202
+ <i>- looking for blocks at least 30 mins long</i>
203
+ <i>- between 9am and 6pm in America/New_York</i>
204
+
205
+ <b>Availability on Monday, November 5:
262
206
  </b>
263
- 11:25am - 12:00pm
264
- 1:30pm - 3:00pm
265
- 3:30pm - 4:00pm
207
+ 9:00am - 10:00am EST<i> (1h)</i>
208
+ 1:30pm - 2:30pm EST<i> (1h)</i>
209
+ 3:30pm - 5:00pm EST<i> (1h 30m)</i>
210
+ • 5:30pm - 6:00pm EST<i> (30m)</i>
266
211
 
267
- <b>Availability on Wednesday, October 3:
212
+ <b>Availability on Tuesday, November 6:
268
213
  </b>
269
- 9:00am - 10:30am
270
- 11:00am - 1:30pm
271
- • 1:55pm - 2:30pm
272
- • 2:55pm - 3:30pm
214
+ 9:00am - 4:30pm EST<i> (7h 30m)</i>
215
+ 4:50pm - 6:00pm EST<i> (1h 10m)</i>
273
216
 
274
- <b>Availability on Thursday, October 4:
217
+ <b>Availability on Wednesday, November 7:
275
218
  </b>
276
- 10:55am - 1:00pm
219
+ 9:00am - 2:30pm EST<i> (5h 30m)</i>
220
+ • 5:30pm - 6:00pm EST<i> (30m)</i>
221
+ </pre>
222
+
223
+
224
+ You can also find times when multiple people are available:
225
+
226
+ <pre>
227
+ <b>$</b> calendar-assistant avail 2018-11-05..2018-11-07 -a me@example.com,other@example.com
228
+ <i>me@example.com, other@example.com</i>
229
+ <i>- looking for blocks at least 30 mins long</i>
230
+ <i>- between 9am and 6pm in America/New_York</i>
231
+ <i>- between 9am and 6pm in America/Los_Angeles</i>
232
+
233
+ <b>Availability on Monday, November 5:
234
+ </b>
235
+ • 4:30pm - 5:00pm EST / 1:30pm - 2:00pm PST<i> (30m)</i>
236
+
237
+ <b>Availability on Tuesday, November 6:
238
+ </b>
239
+ • 12:00pm - 4:30pm EST / 9:00am - 1:30pm PST<i> (4h 30m)</i>
240
+ • 4:50pm - 6:00pm EST / 1:50pm - 3:00pm PST<i> (1h 10m)</i>
241
+
242
+ <b>Availability on Wednesday, November 7:
243
+ </b>
244
+ • 12:00pm - 2:30pm EST / 9:00am - 11:30am PST<i> (2h 30m)</i>
277
245
  </pre>
278
246
 
279
247
 
280
248
  You can also set start and end times for the search, which is useful when looking for overlap with another time zone:
281
249
 
282
250
  <pre>
283
- <b>$</b> calendar-assistant avail 2018-10-02..2018-10-04 -s 12pm -e 7pm
284
- <i>me@example.com
285
- - all times in America/New_York
286
- - looking for blocks at least 30 mins long
287
- </i>
288
- <b>Availability on Tuesday, October 2:
251
+ <b>$</b> calendar-assistant avail 2018-11-05..2018-11-07 -s 12pm -e 7pm
252
+ <i>me@example.com</i>
253
+ <i>- looking for blocks at least 30 mins long</i>
254
+ <i>- between 12pm and 7pm in America/New_York</i>
255
+
256
+ <b>Availability on Monday, November 5:
289
257
  </b>
290
- 11:25am - 12:00pm
291
- 1:30pm - 3:00pm
292
- 3:30pm - 4:00pm
293
- • 6:25pm - 7:00pm
258
+ 1:30pm - 2:30pm EST<i> (1h)</i>
259
+ 3:30pm - 5:00pm EST<i> (1h 30m)</i>
260
+ 5:30pm - 7:00pm EST<i> (1h 30m)</i>
294
261
 
295
- <b>Availability on Wednesday, October 3:
262
+ <b>Availability on Tuesday, November 6:
296
263
  </b>
297
- 11:00am - 1:30pm
298
- 1:55pm - 2:30pm
299
- • 2:55pm - 3:30pm
300
- • 6:00pm - 7:00pm
264
+ 12:00pm - 4:30pm EST<i> (4h 30m)</i>
265
+ 4:50pm - 7:00pm EST<i> (2h 10m)</i>
301
266
 
302
- <b>Availability on Thursday, October 4:
267
+ <b>Availability on Wednesday, November 7:
303
268
  </b>
304
- 10:55am - 1:00pm
305
- 6:00pm - 7:00pm
269
+ 12:00pm - 2:30pm EST<i> (2h 30m)</i>
270
+ 5:30pm - 7:00pm EST<i> (1h 30m)</i>
306
271
  </pre>
307
272
 
308
273
 
309
- ### Tell people where you are at in the world
274
+ ### `location-set`: Tell people where you are in the world
310
275
 
311
276
  Declare your location as an all-day non-busy event:
312
277
 
313
278
  <pre>
314
- <b>$</b> calendar-assistant help location-set
315
279
  Usage:
316
280
  calendar-assistant location-set LOCATION [DATE | DATERANGE]
317
281
 
318
282
  Options:
319
- -h, -?, [--help], [--no-help]
320
- -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
321
- [--debug], [--no-debug] # how dare you suggest there are bugs
283
+ -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
284
+ [--local-store=FILENAME] # Load events from a local file instead of Google Calendar
285
+ -h, -?, [--help], [--no-help]
286
+ [--debug], [--no-debug] # how dare you suggest there are bugs
322
287
 
323
288
  Set your location to LOCATION for a date or range of dates (default 'today')
324
289
  </pre>
@@ -328,39 +293,39 @@ Set your location to LOCATION for a date or range of dates (default 'today')
328
293
  Some examples:
329
294
 
330
295
  <pre>
331
- # create an event titled `🗺 WFH` for today
296
+ <i># create an event titled `🗺 WFH` for today</i>
332
297
  <b>$</b> calendar-assistant location set -p home WFH
333
298
  <b>Created:</b>
334
299
  2018-09-03 | <b>🗺 WFH</b> (not-busy, self)
335
300
 
336
- # create an event titled `🗺 OOO` for tomorrow
301
+ <i># create an event titled `🗺 OOO` for tomorrow</i>
337
302
  <b>$</b> calendar-assistant location-set OOO tomorrow
338
303
  <b>Created:</b>
339
304
  2018-09-04 | <b>🗺 OOO</b> (not-busy, self)
340
305
 
341
- # create an event titled `🗺 Spring One` on the days of that conference
306
+ <i># create an event titled `🗺 Spring One` on the days of that conference</i>
342
307
  <b>$</b> calendar-assistant location-set "Spring One" 2018-09-24...2018-09-27
343
308
  <b>Created:</b>
344
309
  2018-09-24 - 2018-09-27 | <b>🗺 Spring One</b> (not-busy, self)
345
310
 
346
- # create a vacation event for next week
311
+ <i># create a vacation event for next week</i>
347
312
  <b>$</b> calendar-assistant location-set "Vacation!" "next monday ... next week friday"
348
313
  <b>Created:</b>
349
314
  2018-09-10 - 2018-09-14 | <b>🗺 Vacation!</b> (not-busy, self)
350
315
  </pre>
351
316
 
352
317
 
353
- ### Look up where you're going to be
318
+ ### `location`: View where you're going to be in the world
354
319
 
355
320
  <pre>
356
- <b>$</b> calendar-assistant help location
357
321
  Usage:
358
322
  calendar-assistant location [DATE | DATERANGE]
359
323
 
360
324
  Options:
361
- -h, -?, [--help], [--no-help]
362
- -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
363
- [--debug], [--no-debug] # how dare you suggest there are bugs
325
+ -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
326
+ [--local-store=FILENAME] # Load events from a local file instead of Google Calendar
327
+ -h, -?, [--help], [--no-help]
328
+ [--debug], [--no-debug] # how dare you suggest there are bugs
364
329
 
365
330
  Show your location for a date or range of dates (default 'today')
366
331
  </pre>
@@ -371,18 +336,131 @@ For example:
371
336
  <b>$</b> calendar-assistant location "2018-09-24...2018-09-28"
372
337
  <i>me@example.com (all times in America/New_York)
373
338
  </i>
374
- 2018-09-24 - 2018-09-27 <b> | 🗺 Grey Mountains </b><i> (not-busy, self)</i>
375
- 2018-09-28 <b> | 🗺 Dorwinion </b><i> (not-busy, self)</i>
339
+ 2018-09-24 - 2018-09-28 <b> | 🗺 Rivendell</b><i> (not-busy)</i>
340
+ 2018-09-28 <b> | 🗺 Bywater</b><i> (not-busy)</i>
341
+ </pre>
342
+
343
+
344
+ ### `show`: View your calendar events
345
+
346
+ <pre>
347
+ Usage:
348
+ calendar-assistant show [DATE | DATERANGE | TIMERANGE]
349
+
350
+ Options:
351
+ -c, [--commitments], [--no-commitments] # only show events that you've accepted with another person
352
+ -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
353
+ [--local-store=FILENAME] # Load events from a local file instead of Google Calendar
354
+ -a, [--attendees=ATTENDEE1[,ATTENDEE2[,...]]] # [default 'me'] people (email IDs) to whom this command will be applied
355
+ -h, -?, [--help], [--no-help]
356
+ [--debug], [--no-debug] # how dare you suggest there are bugs
357
+
358
+ Show your events for a date or range of dates (default 'today')
359
+ </pre>
360
+
361
+ For example: display all events scheduled for tomorrow:
362
+
363
+ <pre>
364
+ <b>$</b> calendar-assistant show 2018-10-01
365
+ <i>me@example.com (all times in America/New_York)
366
+ </i>
367
+ <strike>2018-10-01 03:30 - 05:00 | Maximize open-source markets</strike>
368
+ <strike>2018-10-01 07:30 - 08:30 | Incentivize innovative web services</strike>
369
+ <strike>2018-10-01 07:30 - 08:30 | Reinvent 24/7 niches</strike>
370
+ 2018-10-01 10:30 - 10:55<b> | Engineer collaborative roi</b><i> (1:1, recurring)</i>
371
+ 2018-10-01 11:00 - 11:30<b> | Implement one-to-one schemas</b><i> (recurring)</i>
372
+ 2018-10-01 11:30 - 12:00<b> | Empower extensible vortals</b><i> (1:1, recurring)</i>
373
+ <strike>2018-10-01 11:50 - 12:00 | Synthesize web-enabled niches</strike>
374
+ 2018-10-01 12:00 - 12:30<b> | Facilitate open-source infomediaries</b><i> (self)</i>
375
+ <strike>2018-10-01 12:15 - 12:30 | Iterate scalable partnerships</strike>
376
+ <strike>2018-10-01 12:30 - 13:30 | Unleash web-enabled content</strike>
377
+ 2018-10-01 12:30 - 13:30<b> | Exploit collaborative web services</b><i> (recurring)</i>
378
+ 2018-10-01 13:30 - 14:50<b> | Streamline back-end deliverables</b><i> (self)</i>
379
+ <strike>2018-10-01 13:30 - 14:30 | Innovate dot-com architectures</strike>
380
+ 2018-10-01 15:00 - 15:30<b> | Optimize robust paradigms</b><i> (1:1)</i>
381
+ 2018-10-01 16:00 - 17:00<b> | Brand 24/365 web services</b><i> (1:1, recurring)</i>
382
+ 2018-10-01 16:45 - 17:00<b> | Extend vertical applications</b><i> (recurring)</i>
383
+ 2018-10-01 17:00 - 17:30<b> | Monetize one-to-one roi</b><i> (recurring)</i>
384
+ 2018-10-01 17:30 - 17:55<b> | Target transparent e-tailers</b><i> (1:1, recurring)</i>
385
+ <strike>2018-10-01 18:00 - 20:30 | Maximize value-added vortals</strike>
386
+ <strike>2018-10-01 18:30 - 19:00 | Whiteboard rich applications</strike>
387
+ <strike>2018-10-01 19:00 - 19:30 | Scale cross-platform portals</strike>
388
+ 2018-10-01 <b> | 🗺 Wilderland</b><i> (not-busy)</i>
376
389
  </pre>
377
390
 
391
+ Display _only_ the commitments I have to other people using the `-c` option:
392
+
393
+ <pre>
394
+ <b>$</b> calendar-assistant show -c 2018-10-01
395
+ <i>me@example.com (all times in America/New_York)
396
+ </i>
397
+ 2018-10-01 10:30 - 10:55<b> | Engineer collaborative roi</b><i> (1:1, recurring)</i>
398
+ 2018-10-01 11:00 - 11:30<b> | Implement one-to-one schemas</b><i> (recurring)</i>
399
+ 2018-10-01 11:30 - 12:00<b> | Empower extensible vortals</b><i> (1:1, recurring)</i>
400
+ 2018-10-01 12:30 - 13:30<b> | Exploit collaborative web services</b><i> (recurring)</i>
401
+ 2018-10-01 15:00 - 15:30<b> | Optimize robust paradigms</b><i> (1:1)</i>
402
+ 2018-10-01 16:00 - 17:00<b> | Brand 24/365 web services</b><i> (1:1, recurring)</i>
403
+ 2018-10-01 16:45 - 17:00<b> | Extend vertical applications</b><i> (recurring)</i>
404
+ 2018-10-01 17:00 - 17:30<b> | Monetize one-to-one roi</b><i> (recurring)</i>
405
+ 2018-10-01 17:30 - 17:55<b> | Target transparent e-tailers</b><i> (1:1, recurring)</i>
406
+ 2018-10-01 <b> | 🗺 Wilderland</b><i> (not-busy)</i>
407
+ </pre>
408
+
409
+
410
+ ### `config`: View your configuration parameters
411
+
412
+ Calendar Assistant has intelligent defaults, which can be overridden in the TOML file `~/.calendar-assistant`, and further overridden via command-line parameters. Sometimes it's nice to be able to see what defaults Calendar Assistant is using:
413
+
414
+ <pre>
415
+ Usage:
416
+ calendar-assistant config
417
+
418
+ Options:
419
+ -h, -?, [--help], [--no-help]
420
+ [--debug], [--no-debug] # how dare you suggest there are bugs
421
+
422
+ Dump your configuration parameters (merge of defaults and overrides from /home/user/.calendar-assistant)
423
+ </pre>
424
+
425
+ The output is TOML, which is suitable for dumping into `~/.calendar-assistant` and editing.
426
+
427
+ <pre>
428
+ <b>$</b> calendar-assistant config
429
+
430
+ [settings]
431
+ end-of-day = "6pm"
432
+ meeting-length = "30m"
433
+ profile = "work"
434
+ start-of-day = "9am"
435
+ </pre>
436
+
437
+ ## Development
438
+
439
+ ### Tests
440
+
441
+ ```bash
442
+ gem install bundler
443
+ bundle install
444
+
445
+ rake spec
446
+ ```
447
+
448
+ ### Generate README
449
+
450
+ * Requires npm to be installed
451
+ * Will use a fixture file rather than connecting to a remote calendar. Fixtures can be updated/regenerated in [generate-fixtures](generate-fixtures) script
452
+
453
+ ```bash
454
+ ./generate-readme
455
+ ```
378
456
 
379
457
  ## References
380
458
 
381
459
  Google Calendar Concepts: https://developers.google.com/calendar/concepts/
382
460
 
383
- Google's API docs: https://www.rubydoc.info/github/google/google-api-ruby-client/Google/Apis/CalendarV3
461
+ Google Calendar API Reference: https://developers.google.com/calendar/v3/reference/
384
462
 
385
- Recurrence: https://github.com/seejohnrun/ice_cube
463
+ Google Calendar Ruby Client Docs: https://www.rubydoc.info/github/google/google-api-ruby-client/Google/Apis/CalendarV3
386
464
 
387
465
 
388
466
  ## License