Drive Cli
Inspiration
-
Google Drive has become a vital part of our day to day life. As much as non-programmers use it, so do programmers in several situations, where we need not use git/github.
-
Drive-CLI is a command-line utility for google drive which helps you access, sync, download, upload, etc. directly to your drive without leaving the command-line. The best part being the commands are similar to git CLI so that you can easily remember them 💆
Features
view-files: list your files; filter them by name, type.clone: download file/folder from drive using sharing link or file ID and get it linked.add-remote: upload existing local file to drive and get it linked.cat: view files contents of text format without actually downloading them.rm: remove particular file or folder.ls: list all the files present in the drive of equivalent current directory.status: list changes made to local files since last push or pull.pull: get latest changes from drive to local files.push: push the local changes to drive.
Demo
Installation
- For Usage
#install using pip
$ pip install drive-cli
- For Development
- clone the repo
$ git clone https://github.com/nurdtechie98/drive-cli.git
- get your
client_secret.jsonfrom Oauth. Make sure to enable Drive Api for the project. - rename the client secret to
oauth.jsonand place it in the drive_cli directory. - install the package:
# move into package directory $ cd drive-cli # install package in edit mode $ pip install -e . #note the dot
Usage
Clone
Download a file or folder present in drive using its file id or its sharing link. In case it is a folder it gets tracked.
# using file id note: since it is google doc it will be asked for a choice to select from
$ drive clone 1syTNkfXoc3pzpJSL0Z5LDioTFc46_LjzHjDDUvk90ks
Choose type to export to
(ENTER to select, s to stop):
=> pdf
txt
doc
zip
html
rtf
odt
Preparing: watson script for download
downloading file [####################################] 100%
completed download of watson script
# using file sharing link
$ drive clone https://docs.google.com/document/d/1syTNkfXoc3pzpJSL0Z5LDioTFc46_LjzHjDDUvk90ks
Choose type to export to
(ENTER to select, s to stop):
=> pdf
txt
doc
zip
html
rtf
odt
Preparing: watson script for download
downloading file [####################################] 100%
completed download of watson script
for further in depth documetation checkout our wiki.
Uninstalling
$ pip uninstall drive-cli
Contributing
- We're are open to
enhancements&bug-fixes😄. Take a look here to get started - Feel free to add issues and submit patches
Author
Chirag Shetty - nurdtechie98
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT - see the LICENSE file for details.
Metadata
Release files for drive-cli 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| drive_cli-2.1.0.tar.gz | 16.6 kB | Without provenance | Details for drive_cli-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| drive_cli-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for drive_cli-2.1.0-py3-none-any.whl |
Total release size: 34.2 kB
Release files / drive_cli-2.1.0.tar.gz
| Download URL | drive_cli-2.1.0.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93fc5e28922761a780f103ae54b6be8bb8561a01197ca812ea7bfa618748e02f
|
|
BLAKE2b-256 checksum How to use checksums |
e579ae22b40f7dc63e0517bffe1167a7b503ca9427c20a525bbc4246b9e33c3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Release files / drive_cli-2.1.0-py3-none-any.whl
| Download URL | drive_cli-2.1.0-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ae67c7d038e96a583ab5809dc97ccf92f1f9d2a1aae261e91af7b28e5ee965e
|
|
BLAKE2b-256 checksum How to use checksums |
7cfb42511ddcd446db864af19e04251ccd7fe26b789eb0831799db479fb59914
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Security for drive-cli 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.