calendar-assistant 0.1.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 72759e81d1f7e1a67ae2efcc7cbf1f3698c8d62262e68e7fc53cad7362f5311f
4
+ data.tar.gz: 0e14e1c2793340d7ead49349e116fad4da8f67e9ca87e2c22d3ad88088d20cc6
5
+ SHA512:
6
+ metadata.gz: 5e7ec4c110239ae51755851c694d421575ace9ab0c9c04ab3e79cde8729815bd65d87bedb4570f02ac751d91439db7dbce7b5af4800177ec30ab1c01d4f9b279
7
+ data.tar.gz: b9a362d7a750b767fb39d2d9f76dd0f758d0de23b8ddaf3d4b7e4759c71624febc699c25617ec5b058b788433754bf07bc6e0931511a9d9504fcd4957f06da8e
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
data/NOTICE ADDED
@@ -0,0 +1,13 @@
1
+ Copyright (c) 2018-Present Mike Dalessio, All Rights Reserved.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
@@ -0,0 +1,410 @@
1
+
2
+ # calendar assistant
3
+
4
+ A command-line tool to help me manage my Google Calendar.
5
+
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
+ - easily join the videoconference for your current meeting
9
+
10
+ [![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
+ [![Maintainability](https://api.codeclimate.com/v1/badges/3525792e1feeccfd8875/maintainability)](https://codeclimate.com/github/flavorjones/calendar-assistant/maintainability)
12
+
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
+
21
+
22
+ ## Features
23
+
24
+ ### Pretty Display
25
+
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" ...)
27
+
28
+
29
+ ### Date and Time Specification
30
+
31
+ 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
+
33
+ For a date range or a datetime range, split the start and end with `..` or `...` (with or without spaces) like:
34
+
35
+ * "tomorrow ... three days from now"
36
+ * "2018-09-24..2018-09-27".
37
+
38
+ Also note that every command will adopt an intelligent default, which is generally "today" or "now".
39
+
40
+
41
+ ### Duration Specification
42
+
43
+ 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
+
45
+
46
+ ### Preferences
47
+
48
+ All tokens and preferences will be stored in `~/.calendar-assistant` which is in TOML format.
49
+
50
+
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')
64
+
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
+
70
+
71
+ </pre>
72
+
73
+
74
+ ### View your configuration parameters
75
+
76
+ 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:
77
+
78
+ <pre>
79
+ <b>$</b> calendar-assistant help config
80
+ Usage:
81
+ calendar-assistant config
82
+
83
+ Options:
84
+ -h, -?, [--help], [--no-help]
85
+ -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
86
+ [--debug], [--no-debug] # how dare you suggest there are bugs
87
+
88
+ Dump your configuration parameters (merge of defaults and overrides from /home/flavorjones/.calendar-assistant)
89
+
90
+ </pre>
91
+
92
+ The output is TOML, which is suitable for dumping into `~/.calendar-assistant` and editing.
93
+
94
+ <pre>
95
+ <b>$</b> calendar-assistant config
96
+
97
+ [settings]
98
+ end-of-day = "6pm"
99
+ meeting-length = "30m"
100
+ profile = "work"
101
+ start-of-day = "9am"
102
+
103
+ </pre>
104
+
105
+
106
+ ### Authorize access to your Google Calendar
107
+
108
+ <pre>
109
+ <b>$</b> calendar-assistant help authorize
110
+ Usage:
111
+ calendar-assistant authorize PROFILE_NAME
112
+
113
+ Options:
114
+ -h, -?, [--help], [--no-help]
115
+ -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
116
+ [--debug], [--no-debug] # how dare you suggest there are bugs
117
+
118
+ Description:
119
+ Create and authorize a named profile (e.g., "work", "home", "flastname@company.tld") to access your calendar.
120
+
121
+ When setting up a profile, you'll be asked to visit a URL to authenticate, grant authorization, and generate and persist an access token.
122
+
123
+ In order for this to work, you'll need to follow the instructions at this URL first:
124
+
125
+ > https://developers.google.com/calendar/quickstart/ruby
126
+
127
+ Namely, the prerequisites are:
128
+ 1. Turn on the Google API for your account
129
+ 2. Create a new Google API Project
130
+ 3. Download the configuration file for the Project, and name it as `credentials.json`
131
+
132
+ </pre>
133
+
134
+ 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`.
135
+
136
+ Your access token will be stored in `~/.calendar-assistant` in the `[tokens]` section.
137
+
138
+
139
+ ### Display your calendar events
140
+
141
+ <pre>
142
+ <b>$</b> calendar-assistant help show
143
+ Usage:
144
+ calendar-assistant show [DATE | DATERANGE | TIMERANGE]
145
+
146
+ Options:
147
+ -c, [--commitments], [--no-commitments] # only show events that you've accepted with another person
148
+ -h, -?, [--help], [--no-help]
149
+ -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
150
+ [--debug], [--no-debug] # how dare you suggest there are bugs
151
+
152
+ Show your events for a date or range of dates (default 'today')
153
+
154
+ </pre>
155
+
156
+ For example: display all events scheduled for tomorrow:
157
+
158
+ <pre>
159
+ <b>$</b> calendar-assistant show --profile=work 2018-10-01
160
+ <i>mdalessio@pivotal.io (all times in America/New_York)
161
+ </i>
162
+ 2018-10-01 <b> | 🗺 NJ</b><i> (not-busy, self)</i>
163
+ <strike>2018-10-01 03:30 - 05:00 | INTERNATIONAL COFFEE DAYYYYYYYY</strike>
164
+ <strike>2018-10-01 07:30 - 08:30 | Lunch and -GDPR</strike>
165
+ <strike>2018-10-01 07:30 - 08:30 | Lunch & Learn</strike>
166
+ 2018-10-01 08:00 - 09:00<b> | Commuting/Email</b><i> (recurring, self)</i>
167
+ 2018-10-01 09:00 - 10:30<b> | None</b><i> (self)</i>
168
+ 2018-10-01 10:30 - 10:55<b> | Mike D / Stev 1:1</b><i> (1:1, recurring)</i>
169
+ 2018-10-01 11:00 - 11:30<b> | Dublin Office Status Meeting</b><i> (recurring)</i>
170
+ 2018-10-01 11:30 - 12:00<b> | Mike/Rupa 1:1</b><i> (1:1, recurring)</i>
171
+ <strike>2018-10-01 11:50 - 12:00 | Reminder: CF Standup prep (recurring)</strike>
172
+ 2018-10-01 12:00 - 12:30<b> | Lunch</b><i> (self)</i>
173
+ <strike>2018-10-01 12:15 - 12:30 | CF NYC Standup (recurring)</strike>
174
+ <strike>2018-10-01 12:30 - 13:30 | Office Events Retro</strike>
175
+ 2018-10-01 12:30 - 13:30<b> | Global Director's Check-In</b><i> (recurring)</i>
176
+ 2018-10-01 13:30 - 14:50<b> | proactivity</b><i> (self)</i>
177
+ <strike>2018-10-01 13:30 - 14:30 | Psychological Safety Workshop (Session 1)</strike>
178
+ 2018-10-01 15:00 - 15:30<b> | Matthew/Mike</b><i> (1:1)</i>
179
+ 2018-10-01 16:00 - 17:00<b> | Mike/Ryan T. 1:1</b><i> (1:1, recurring)</i>
180
+ 2018-10-01 16:45 - 17:00<b> | Manager Initiative check-in</b><i> (recurring)</i>
181
+ 2018-10-01 17:00 - 17:30<b> | CF Security Council Sync</b><i> (recurring)</i>
182
+ 2018-10-01 17:30 - 17:55<b> | Mike / Dieu 1:1</b><i> (1:1, recurring)</i>
183
+ <strike>2018-10-01 18:00 - 20:30 | Steak!</strike>
184
+ <strike>2018-10-01 18:30 - 19:00 | SF CF Directors / HR Bi-weekly (recurring)</strike>
185
+ <strike>2018-10-01 19:00 - 19:30 | CF SF Manager Sit Down (recurring)</strike>
186
+
187
+
188
+ </pre>
189
+
190
+ Display _only_ the commitments I have to other people using the `-c` option:
191
+
192
+ <pre>
193
+ <b>$</b> calendar-assistant show -c 2018-10-01
194
+ <i>mdalessio@pivotal.io (all times in America/New_York)
195
+ </i>
196
+ 2018-10-01 10:30 - 10:55<b> | Mike D / Stev 1:1</b><i> (1:1, recurring)</i>
197
+ 2018-10-01 11:00 - 11:30<b> | Dublin Office Status Meeting</b><i> (recurring)</i>
198
+ 2018-10-01 11:30 - 12:00<b> | Mike/Rupa 1:1</b><i> (1:1, recurring)</i>
199
+ 2018-10-01 12:30 - 13:30<b> | Global Director's Check-In</b><i> (recurring)</i>
200
+ 2018-10-01 15:00 - 15:30<b> | Matthew/Mike</b><i> (1:1)</i>
201
+ 2018-10-01 16:00 - 17:00<b> | Mike/Ryan T. 1:1</b><i> (1:1, recurring)</i>
202
+ 2018-10-01 16:45 - 17:00<b> | Manager Initiative check-in</b><i> (recurring)</i>
203
+ 2018-10-01 17:00 - 17:30<b> | CF Security Council Sync</b><i> (recurring)</i>
204
+ 2018-10-01 17:30 - 17:55<b> | Mike / Dieu 1:1</b><i> (1:1, recurring)</i>
205
+
206
+
207
+ </pre>
208
+
209
+
210
+ ### Join a video call attached to a meeting
211
+
212
+ <pre>
213
+ <b>$</b> calendar-assistant help join
214
+ Usage:
215
+ calendar-assistant join [TIME]
216
+
217
+ Options:
218
+ [--join], [--no-join] # launch a browser to join the video call URL
219
+ # Default: true
220
+ -h, -?, [--help], [--no-help]
221
+ -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
222
+ [--debug], [--no-debug] # how dare you suggest there are bugs
223
+
224
+ Open the URL for a video call attached to your meeting at time TIME (default 'now')
225
+
226
+ </pre>
227
+
228
+ Some examples:
229
+
230
+ <pre>
231
+ <b>$</b> calendar-assistant join
232
+ 2018-09-28 11:30 - 12:00 | Status Meeting (recurring)
233
+ https://pivotal.zoom.us/j/ABC90210
234
+ # ... and opens the URL, which is associated with an event happening now
235
+
236
+ <b>$</b> calendar-assistant join work --no-join 11:30
237
+ 2018-09-28 11:30 - 12:00 | Status Meeting (recurring)
238
+ https://pivotal.zoom.us/j/ABC90210
239
+ # ... and does not open the URL
240
+ </pre>
241
+
242
+
243
+ ### Find your availability for meetings
244
+
245
+ This is useful for emailing people your availability. It only considers `accepted` meetings when determining busy/free.
246
+
247
+ <pre>
248
+ <b>$</b> calendar-assistant help availability
249
+ Usage:
250
+ calendar-assistant availability [DATE | DATERANGE | TIMERANGE]
251
+
252
+ Options:
253
+ -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')
254
+ -s, [--start-of-day=TIME] # [default 9am] find chunks of available time after TIME (which is a Chronic string like '9am' or '14:30')
255
+ -e, [--end-of-day=TIME] # [default 6pm] find chunks of available time before TIME (which is a Chronic string like '9am' or '14:30')
256
+ -h, -?, [--help], [--no-help]
257
+ -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
258
+ [--debug], [--no-debug] # how dare you suggest there are bugs
259
+
260
+ Show your availability for a date or range of dates (default 'today')
261
+
262
+ </pre>
263
+
264
+
265
+ For example: show me my available time over a chunk of time:
266
+
267
+ <pre>
268
+ <b>$</b> calendar-assistant avail 2018-10-02..2018-10-04
269
+ <i>mdalessio@pivotal.io
270
+ - all times in America/New_York
271
+ - looking for blocks at least 30 mins long
272
+ </i>
273
+ <b>Availability on Tuesday, October 2:
274
+ </b>
275
+ • 11:25am - 12:00pm
276
+ • 1:30pm - 3:00pm
277
+ • 3:30pm - 4:00pm
278
+
279
+ <b>Availability on Wednesday, October 3:
280
+ </b>
281
+ • 9:00am - 10:30am
282
+ • 11:00am - 1:30pm
283
+ • 1:55pm - 2:30pm
284
+ • 2:55pm - 3:30pm
285
+
286
+ <b>Availability on Thursday, October 4:
287
+ </b>
288
+ • 10:55am - 1:00pm
289
+
290
+
291
+ </pre>
292
+
293
+
294
+ You can also set start and end times for the search, which is useful when looking for overlap with another time zone:
295
+
296
+ <pre>
297
+ <b>$</b> calendar-assistant avail 2018-10-02..2018-10-04 -s 12pm -e 7pm
298
+ <i>mdalessio@pivotal.io
299
+ - all times in America/New_York
300
+ - looking for blocks at least 30 mins long
301
+ </i>
302
+ <b>Availability on Tuesday, October 2:
303
+ </b>
304
+ • 11:25am - 12:00pm
305
+ • 1:30pm - 3:00pm
306
+ • 3:30pm - 4:00pm
307
+ • 6:25pm - 7:00pm
308
+
309
+ <b>Availability on Wednesday, October 3:
310
+ </b>
311
+ • 11:00am - 1:30pm
312
+ • 1:55pm - 2:30pm
313
+ • 2:55pm - 3:30pm
314
+ • 6:00pm - 7:00pm
315
+
316
+ <b>Availability on Thursday, October 4:
317
+ </b>
318
+ • 10:55am - 1:00pm
319
+ • 6:00pm - 7:00pm
320
+
321
+
322
+ </pre>
323
+
324
+
325
+ ### Tell people where you are at in the world
326
+
327
+ Declare your location as an all-day non-busy event:
328
+
329
+ <pre>
330
+ <b>$</b> calendar-assistant help location-set
331
+ Usage:
332
+ calendar-assistant location-set LOCATION [DATE | DATERANGE]
333
+
334
+ Options:
335
+ -h, -?, [--help], [--no-help]
336
+ -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
337
+ [--debug], [--no-debug] # how dare you suggest there are bugs
338
+
339
+ Set your location to LOCATION for a date or range of dates (default 'today')
340
+
341
+ </pre>
342
+
343
+ **Note** that you can only be in one place at a time, so existing location events may be modified or deleted when new overlapping events are created.
344
+
345
+ Some examples:
346
+
347
+ <pre>
348
+ # create an event titled `🗺 WFH` for today
349
+ <b>$</b> calendar-assistant location set -p home WFH
350
+ <b>Created:</b>
351
+ 2018-09-03 | <b>🗺 WFH</b> (not-busy, self)
352
+
353
+ # create an event titled `🗺 OOO` for tomorrow
354
+ <b>$</b> calendar-assistant location-set OOO tomorrow
355
+ <b>Created:</b>
356
+ 2018-09-04 | <b>🗺 OOO</b> (not-busy, self)
357
+
358
+ # create an event titled `🗺 Spring One` on the days of that conference
359
+ <b>$</b> calendar-assistant location-set "Spring One" 2018-09-24...2018-09-27
360
+ <b>Created:</b>
361
+ 2018-09-24 - 2018-09-27 | <b>🗺 Spring One</b> (not-busy, self)
362
+
363
+ # create a vacation event for next week
364
+ <b>$</b> calendar-assistant location-set "Vacation!" "next monday ... next week friday"
365
+ <b>Created:</b>
366
+ 2018-09-10 - 2018-09-14 | <b>🗺 Vacation!</b> (not-busy, self)
367
+ </pre>
368
+
369
+
370
+ ### Look up where you're going to be
371
+
372
+ <pre>
373
+ <b>$</b> calendar-assistant help location
374
+ Usage:
375
+ calendar-assistant location [DATE | DATERANGE]
376
+
377
+ Options:
378
+ -h, -?, [--help], [--no-help]
379
+ -p, [--profile=PROFILE] # the profile you'd like to use (if different from default)
380
+ [--debug], [--no-debug] # how dare you suggest there are bugs
381
+
382
+ Show your location for a date or range of dates (default 'today')
383
+
384
+ </pre>
385
+
386
+ For example:
387
+
388
+ <pre>
389
+ <b>$</b> calendar-assistant location "2018-09-24...2018-09-28"
390
+ <i>mdalessio@pivotal.io (all times in America/New_York)
391
+ </i>
392
+ 2018-09-24 - 2018-09-27 <b> | 🗺 Spring One @ DC</b><i> (not-busy, self)</i>
393
+ 2018-09-28 <b> | 🗺 NJ</b><i> (not-busy, self)</i>
394
+
395
+
396
+ </pre>
397
+
398
+
399
+ ## References
400
+
401
+ Google Calendar Concepts: https://developers.google.com/calendar/concepts/
402
+
403
+ Google's API docs: https://www.rubydoc.info/github/google/google-api-ruby-client/Google/Apis/CalendarV3
404
+
405
+ Recurrence: https://github.com/seejohnrun/ice_cube
406
+
407
+
408
+ ## License
409
+
410
+ See files `LICENSE` and `NOTICE` in this repository.