docCLI
docCLI copied to clipboard
A command line interface for Google docs/drive/sheets
docCLI
A command line interface for Google Docs/Drive/Sheets.
What can it do?
- Open Google Docs/Drive/Sheets in your browser.
- Open a Google Docs/Drive/Sheets file in your browser.
- Download Google Docs/Drive/Sheets files to your current directory.
- Upload a file to Google Docs/Drive/Sheets.
- Open a local copy of a Google Docs file in your favorite command line editor.
How do I get it?
pip install docCLI if python3 is your only installation.
python3 -m pip install docCLI if you have multiple installations
Alternatively:
Download this repo and run the setup.py
Python 3.x (including 3.7a) supported
Usage:
All scripts contain a help option. Use [SCRIPT] --help to access it. The
base commands are docs drive and sheets.
Docs:
docsto open the Google Docs page.docs [FILENAME]to open (in your web browser) a Google Docs file that is in your drive.docs [FILENAME] -dto download the Document from your Google Drive.docs [FILENAME] -e [EDITOR]downloads then opens the local copy in the editor provided. Defaults to the EDITOR env variable and if that is not found it defaults to vim.
Drive:
driveto open your Google Drive page.drive [FILENAME]to open a file in your Google Drive.drive [FILENAME] -dto download the file specified to your current directory.drive -u [FILENAME]to upload a file from your directory to Google Drive.
Sheets:
sheetsto open the Google Sheets page.sheets [FILENAME]to open a spreadsheet in your web browser.sheets [FILENAME] -d --ext [EXTENSION]to download the spreadsheet. --ext specifies the extension defaults to .csv
TODO:
- python2.7 compatibility
- Improve developer documentation with more details
- Increase unit test coverage
- Implement updating of files after editing locally
- Callback to handle a file from drive after its been downloaded. e.g. playing a .mp3 after it has been downloaded
Developer Documentation:
If you want to generate the documentation yourself install sphinx and run
make html in the docs directory.