Sheetq requires Ruby 2.3 or newer.
$ gem install sheetq
$ gem install bundler
$ mkdir /path/to/install/sheetq
$ cd /path/to/install/
$ bundle init
$ echo 'gem "sheetq"' >> Gemfile
$ bundle install --path=vendor/bundle --binstubs=exe
$ export PATH=/path/to/install/sheetq/exe:$PATH
- Get OAuth CLIENT_ID/CLIENT_SECRET
Visit https://console.developers.google.com and follow the instruction. Googling ‘Creating a Google API Console project and client ID’ would help.
- Create app config file interactively
$ sheetq init Creating ~/.config/sheetq/config.yml ... Get your CLIENT_ID/CLIENT_SECRET at https://console.developers.google.com Googling 'Creating a Google API Console project and client ID' would help. CLIENT_ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com CLIENT_SECRET: xxxxxxxxxxxxxxxxxxxxxxxx Gmail address: xxxxxxxxxxx@xxxxx.xxx DEFAULT_SHEET_ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Making config directory ~/.config/sheetq ... create /Users/nom/.config/sheetq Making cache directory ~/.cache/sheetq ... exist Ignore /Users/nom/.cache/sheetq Copying file(s) into ~/.config/sheetq/config.yml ... exist Ignore ~/.config/sheetq ok copy /Users/nom/.config/sheetq/config.yml done.
- Grant OAuth access to Google (browser will be invoked)
$ sheetq auth Authenticating xxxxxxxxxxxxxxx@gmail.com... Enter the resulting code: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
If you want to add another account, try
sheetq auth --user=another_account
. - Check your sheet
$ sheetq show 'Class Data!A2:E' Alexandra,Female,4. Senior,CA,English Andrew,Male,1. Freshman,SD,Math Anna,Female,1. Freshman,NC,English :