分享到博客 onedrive_cli.txt
usage: onedrive-cli [-h] [-c path] [-p] [-i] [-e enc] [--debug]
{auth,quota,recent,info,info_set,link,ls,mkdir,get,put,cp,mv,rm,comments,comment_add,comment_delete,tree}
...
Tool to manipulate OneDrive contents.
optional arguments:
-h, --help show this help message and exit
-c path, --config path
Writable configuration state-file (yaml). Used to
store authorization_code, access and refresh tokens.
Should initially contain at least something like
"{client: {id: xxx, secret: yyy}}". Default: ~/.lcrc
-p, --path Interpret file/folder arguments only as human paths,
not ids (default: guess). Avoid using such paths if
non-unique "name" attributes of objects in the same
parent folder might be used.
-i, --id Interpret file/folder arguments only as ids (default:
guess).
-e enc, --encoding enc
Use specified encoding (example: utf-8) for CLI
input/output. See full list of supported encodings at:
http://docs.python.org/2/library/codecs.html#standard-
encodings . Default behavior is to detect input
encoding via chardet module, if available, falling
back to utf-8 and use terminal encoding for output.
--debug Verbose operation mode.
Supported operations:
{auth,quota,recent,info,info_set,link,ls,mkdir,get,put,cp,mv,rm,comments,comment_add,comment_delete,tree}
auth Perform user authentication.
quota Print quota information.
recent List recently changed objects.
info Display object metadata.
info_set Manipulate object metadata.
link Get a link to a file.
ls List folder contents.
mkdir Create a folder.
get Download file contents.
put Upload a file.
cp Copy file to a folder.
mv Move file to a folder.
rm Remove object (file or folder).
comments Show comments for a file, object or folder.
comment_add Add comment for a file, object or folder.
comment_delete Delete comment from a file, object or folder.
tree Show contents of onedrive (or folder) as a tree of
file/folder names. Note that this operation will have
to (separately) request a listing of every folder
under the specified one, so can be quite slow for
large number of these.