aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Rasmussen2015-05-23 14:54:55 +0200
committerPetter Rasmussen2015-05-23 14:54:55 +0200
commitcc867e0f5ef61f7384326eeb9846fe0205176c3b (patch)
treed5397e284e04d3f417e984bcc3330a833213cc4e
parentb1cbd4b5447d34b940fa88322aae0e40c4323632 (diff)
downloadgdrive-cc867e0f5ef61f7384326eeb9846fe0205176c3b.tar.bz2
Update options. Add download doc example.
-rw-r--r--README.md67
1 files changed, 37 insertions, 30 deletions
diff --git a/README.md b/README.md
index 4063173..4d4a1d2 100644
--- a/README.md
+++ b/README.md
@@ -33,47 +33,50 @@ If you want to compile from source you need the go toolchain: http://golang.org/
#### Options
Global options:
- -a, --advanced Advanced Mode -- lets you specify your own oauth client id and secret on setup
- -c, --config Set application path where config and token is stored. Defaults to ~/.gdrive
- -v, --version Print version
- -h, --help Show this help
+ -a, --advanced Advanced Mode -- lets you specify your own oauth client id and secret on setup
+ -c, --config Set application path where config and token is stored. Defaults to ~/.gdrive
+ -v, --version Print version
+ -h, --help Show this help
Verbs:
delete:
- -i, --id File Id (*)
+ -i, --id File Id (*)
download:
- -i, --id File Id (*)
- -s, --stdout Write file content to stdout
- --pop Download latest file, and remove it from google drive
+ -i, --id File Id (*)
+ --format Download file in a specified format (needed for google docs)
+ -s, --stdout Write file content to stdout
+ --force Overwrite existing file
+ --pop Download latest file, and remove it from google drive
folder:
- -t, --title Folder to create (*)
- -p, --parent Parent Id of the folder
- --share Share created folder
+ -t, --title Folder to create (*)
+ -p, --parent Parent Id of the folder
+ --share Share created folder
info:
- -i, --id File Id (*)
+ -i, --id File Id (*)
list:
- -m, --max Max results
- -t, --title Title filter
- -q, --query Query (see https://developers.google.com/drive/search-parameters)
- -s, --shared Show shared status (Note: this will generate 1 http req per file)
- -n, --noheader Do not show the header
+ -m, --max Max results
+ --include-docs Include google docs in listing
+ -t, --title Title filter
+ -q, --query Query (see https://developers.google.com/drive/search-parameters)
+ -s, --shared Show shared status (Note: this will generate 1 http req per file)
+ -n, --noheader Do not show the header
share:
- -i, --id File Id (*)
+ -i, --id File Id (*)
unshare:
- -i, --id File Id (*)
+ -i, --id File Id (*)
upload:
- -f, --file File or directory to upload (*)
- -s, --stdin Use stdin as file content (*)
- -t, --title Title to give uploaded file. Defaults to filename
- -p, --parent Parent Id of the file
- --share Share uploaded file
- --mimetype The MIME type (default will try to figure it out)
- --convert File will be converted to Google Docs format
- -C, --chunksize Set chunk size in bytes. Minimum is 262144, default is 4194304. Recommended to be a power of two.
+ -f, --file File or directory to upload (*)
+ -s, --stdin Use stdin as file content (*)
+ -t, --title Title to give uploaded file. Defaults to filename
+ -p, --parent Parent Id of the file
+ --share Share uploaded file
+ --mimetype The MIME type (default will try to figure it out)
+ --convert File will be converted to Google Docs format
+ -C, --chunksize Set chunk size in bytes. Minimum is 262144, default is 4194304. Recommended to be a power of two.
url:
- -i, --id File Id (*)
- -p, --preview Generate preview url (default)
- -d, --download Generate download url
+ -i, --id File Id (*)
+ -p, --preview Generate preview url (default)
+ -d, --download Generate download url
## Examples
###### List files
@@ -101,6 +104,10 @@ If you want to compile from source you need the go toolchain: http://golang.org/
$ drive download --id 0B3X9GlR6EmbnenBYSFI4MzN0d2M
Downloaded 'drive-freebsd-amd64' at 2 MB/s, total 5 MB
+###### Download google doc as docx
+ $ drive download -i 1ooNQwHdIRNcm-boOU7RVH8mQKhoOJ8rgABWBXleytg0 --format docx
+ Downloaded 'testdoc.docx' at 4.3 KB/s, total 4.3 KB
+
###### Share a file
$ drive share --id 0B3X9GlR6EmbnOVRQN0t6RkxVQk0
File 'drive-windows-amd64.exe' is now readable by everyone @ https://drive.google.com/uc?id=0B3X9GlR6EmbnOVRQN0t6RkxVQk0