Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tijn/today
What's on the agenda for ... ? Today reads google calendar for today's events and posts it to your company's HipChat.
https://github.com/tijn/today
Last synced: 6 days ago
JSON representation
What's on the agenda for ... ? Today reads google calendar for today's events and posts it to your company's HipChat.
- Host: GitHub
- URL: https://github.com/tijn/today
- Owner: tijn
- Created: 2014-07-26T21:03:01.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-21T09:42:48.000Z (almost 10 years ago)
- Last Synced: 2024-04-21T03:59:46.163Z (7 months ago)
- Language: Ruby
- Homepage:
- Size: 420 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Today
## What?
Shout out on Hipchat what's on a google calendar for today
![Today in HipChat Screenshot](screenshot.png)## Huh? Why?
At our office, every day is different. You never know who you can expect to see there. Some collegues will visit clients, others are doing part time academic work, someone could have a day off or maybe working from home... you get the gist. This little project grew out of the need to be informed about how many people one can expect to see at the office.
Obviously we jot this all this information down in a calendar but I'm too lazy for looking that thing up every day. I simply want an app to shout it at me on HipChat while I have breakfast.
## How can I have this too?
You need a YAML file with your config, something like this:
```yaml
in_and_out:
calendar_url: {{your calendar as xml}}
hipchat_token: {{a token for HipChat}}
hipchat_room: {{the room in which you want to read your msg}}
another_calendar:
hipchat_room: {{your calendar as xml}}
hipchat_token: {{a token for HipChat}}
hipchat_room: {{the room in which you want to read your msg}}
```You may specify as many configs as you want.
Google might give you a URL which ends in `/basic`. This version of your calendar contains no start or end times. Change `/basic` into `/full` for a version that does. (Google why didn't you tell me? It took me ages to figure this out!)
Then you feed this config to the script to see if it works:
```sh
bin/today_on_hipchat < my_superawesome_configuration.yml
```And you set up the obvious cron job for it.
## Example Cron-job
A typical use would be to call Today in a daily cron-job.
You can use the script below as a starting point.
(mainly useful to see how to use rbenv with this)```sh
#!/bin/shexport PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
TZ=Europe/Amsterdam bin/today_on_hipchat < config.yml
```Use the TZ environment variable to set the time zone for displaying times.