.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16. .TH UPLOAD-TO-SHEETS "1" "November 2020" "upload-to-sheets 2.3.3" "User Commands" .SH NAME upload-to-sheets \- publish CSV files to Google Spreadsheet .SH DESCRIPTION usage: upload\-to\-sheets [\-h] [\-\-auth_host_name AUTH_HOST_NAME] .TP [\-\-noauth_local_webserver] [\-\-auth_host_port [AUTH_HOST_PORT [AUTH_HOST_PORT ...]]] [\-\-logging_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [\-\-docid DOCID] [\-\-title DOCTITLE] [\-\-verbose] [\-\-min\-rows MIN_ROWS] [filenames [filenames ...]] .PP Publish a CSV file to a Google Spreadsheet sheet. .PP This is a convenient script to update an existing Google Spreadsheet document with the contents of a CSV file. .PP NOTE: This script replaces and obsoletes 'upload\-csv\-to\-google\-sheet'. .PP For example, this invocation creates a new Google Sheet doc and upload the contents of the CSV files to sheets named 'apples' and 'oranges': .IP upload\-to\-sheets apples.csv oranges.csv .PP You can override the name of the sheets created by appending a colon and the name, like this: .IP upload\-to\-sheets apples.csv:Apples oranges.csv:Oranges .PP If you'd like to upload the sheets in an existing document, provide it as an option: .IP upload\-to\-sheets \fB\-\-docid=\fR"1xcCjHM...j1ubo0Y09DfGn8HRMLY" apples.csv oranges.csv .PP Note that if you do this and there are existing sheets with the same names, e.g. "apples", the contents of these sheets will be replaced by the uploaded contents. All the other sheets will remain untouched. This is designed so that you can manually craft a custom spreadsheet and upload only some of it sheets with contents derived from another program (e.g. Beancount). .PP This script only requires the latest and official Google client API libraries (it does not need gdata nor Python wrappers for sheets). It uses the v4 Sheets API (current as of 2013\-2017\-12\-15). You will need to have an installation of the following libraries for this to work: .IP * google\-api\-python\-client (Google Python client API) * oauth2client * httplib2 .PP Moreover, you will need to enable the Google Sheets API in the developer console and download the Client Secrets that Google provides to ~/.google\-apis.json. (You can override this location with the GOOGLE_APIS environment variable.) .SS "positional arguments:" .TP filenames CSV filenames[:name] to upload. If 'name' is not provided, infer from the filename. .SS "optional arguments:" .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-\-auth_host_name\fR AUTH_HOST_NAME Hostname when running a local web server. .TP \fB\-\-noauth_local_webserver\fR Do not run a local web server. .TP \fB\-\-auth_host_port\fR [AUTH_HOST_PORT [AUTH_HOST_PORT ...]] Port web server should listen on. .TP \fB\-\-logging_level\fR {DEBUG,INFO,WARNING,ERROR,CRITICAL} Set the logging level of detail. .TP \fB\-\-docid\fR DOCID, \fB\-\-doc\fR DOCID, \fB\-\-id\fR DOCID, \fB\-d\fR DOCID Spreadsheets doc id to update .TP \fB\-\-title\fR DOCTITLE, \fB\-t\fR DOCTITLE Set or update the spreadsheet's title .TP \fB\-\-verbose\fR, \fB\-v\fR Print out the log .TP \fB\-\-min\-rows\fR MIN_ROWS Minimum number rows to resize uploaded sheet to. This is useful when another sheet feeds from the uploaded one, which otherwise automatically renumbers its references to rows beyond it if they existed, to avoid most such resizing woes.