Skip to content

nomlab/sheetq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sheetq – Google Spreadsheet CLI client.

Installation

Sheetq requires Ruby 2.3 or newer.

Install using gem (Currently not work)

$ gem install sheetq

Install in sandbox

$ 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

Setup

  1. 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.

  2. 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.
        
  3. 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.

  4. 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
    :
        

About

Google Sheets CLI client for nomlab users

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published