Installation
- On Ubuntu or Linux Mint :
Authorization
- The first time you access the service you need to Authorise the googlecli
- Run the following command
- You will then be prompted for your email address and a browser will open asking for Authorization from this computer
- Enter the provided browser Authorization code to the CLI
- After this your Google Docs will be listed
- You can grep on the list command e.g.
- Other Unix commands can be used in a similar way
- Once the Authorization has occurred you can review the config file :
- Example configuration file :
[DOCS]
spreadsheet_format = xls
format = txt
spreadsheet_editor = openoffice.org
presentation_format = ppt
presentation_editor = openoffice.org
document_format = txt
drawing_format = png
skip_auth = True
user = cwishaw@example.com
[CALENDAR]
fields = title,when
[GENERAL]
regex = True
url_field = site
missing_field_value = N/A
fields = title,url-site
cap_results = False
max_retries = 2
hostid = example@computername
retry_delay = 0.5
date_print_format = %b %d %H:%M
[YOUTUBE]
max_results = 50
[CONTACTS]
fields = name,email
Set Vim as Default Editor
- Update [DOCS] section with line in red
editor = vim
spreadsheet_format = xls
format = txt
spreadsheet_editor = openoffice.org
presentation_format = ppt
presentation_editor = openoffice.org
document_format = txt
drawing_format = png
skip_auth = True
user = cwishaw@example.com
- Open a Google Doc e.g.
- Edit and save it as normal
- View in Google Doc's
Alias Setup
- It can be useful to have some alias setup e.g.
alias glist='google docs list'
- Command examples
$ gvi "Hello Google Docs"
Further References
No comments:
Post a Comment