Reads Google Sheets from Google Drive and creates events to Google Calendar.
Run bundle install
to install all prerequisities.
- Download OAuth 2.0 JSON credential file from Google Developers Console and save it to
client_secret.json
. - Copy
config.json.template
toconfig.json
. - Modify
config.json
according to your needs.
Run ruby run.rb
Credentials will be asked and they will be stored to credentials
directory, so next time they will not be asked.
It's a good idea to make backup from config.json
and credentials/
(into Dropbox for example).
After you have credentials/token.yaml
and config.json
set up:
$ docker build -t sheet-to-cal .
If you have anacron installed (like in Ubuntu), you can create a following script to /etc/cron.weekly/sheet-to-cal
:
#!/bin/sh
set -e
cd INSTALLATION_DIRECTORY
./run_docker.sh 2>&1 /tmp/sheet-to-cal.log
The script writes log file /tmp/sheet-to-cal.log
.
You can test if running the script works by sudo anacron -d -n -f
.
- Add
gem 'pry-byebug'
toGemfile
- Run
bundle install
- Add
require 'pry'
to Ruby file to be debugged - Add
binding.pry
to wanted line in Ruby file