Download Google documents to files
Project description
gdoc_down
API and command line program to save Google documents, presentations, and worksheets in a local Google Drive / Backup & Sync directory to to local files.
gdoc_down supports several formats:
CSV (.csv)
EPUB (.epub)
Excel workbook (.xlsx)
HTML (.html)
Image (.png, .jpg, .svg)
LaTeX (.tex)
Open Office document (.odt)
Open Office presentation (.odp)
Open Office workbook (.ods)
Plain text file (.txt)
Portable document format (.pdf)
Powerpoint presentation (.pptx)
Rich text document (.rtf)
TSV (.tsv)
Word document (.docx)
gdoc_down also has special features for handling .gdoc files that contain LaTeX:
gdoc_down ignores all images. This allows the user to place images inside the Google document for convenience and to use \includegraphics to embed images in compile PDF files.
gdoc_down will convert all Google document comments to PDF comments.
gdoc_down ignores all page breaks.
The first time gdoc_down is called, gdoc_down will request access to the user’s Google account. This will create a client.json file in the users home directory (~/.gdoc_down/client.json).
Installation
Latest release from PyPI pip install gdoc_down
Latest revision from GitHub pip install git+https://github.com/KarrLab/gdoc_down.git#egg=gdoc_down
Command line usage
usage: gdoc_down (sub-commands ...) [options ...] {arguments ...} Download a Google document, presentation, or workbook to a local file positional arguments: google_file path to Google document, presentation, or workbook optional arguments: -h, --help show this help message and exit --debug toggle debug output --quiet suppress all output --format FORMAT, -f FORMAT output format (csv, docx, epub, html, jpg, odft, odp, ods, pdf, pptx, png, rtf, svg, tsv, tex, txt, xlsx) --out_path OUT_PATH, -o OUT_PATH path where Google document, presentation, or workbook should be downloaded --extension EXTENSION, -e EXTENSION output extension
Examples
gdoc_down -f docx /path/to/Google \Drive/file.gdoc gdoc_down -f pptx /path/to/Google \Drive/file.gslides gdoc_down -f xlsx /path/to/Google \Drive/file.gsheet
Documentation
Please see the documentation at Read the Docs.
Tests
pytest can be used to run the tests:
pytest tests
Please note that several additional packages are required for testing (see tests/requirements.txt).
License
The example model is released under the MIT license.
Development team
gdoc_down was developed by Jonathan Karr at the Icahn School of Medicine at Mount Sinai in New York, USA.
Questions and comments
Please contact the Jonathan Karr with any questions or comments.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gdoc_down-0.0.8.tar.gz
.
File metadata
- Download URL: gdoc_down-0.0.8.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.23.2 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec753b4a78d1a7ab18be9f095d18b6864764a326891e06a22d46e2187fe8a250 |
|
MD5 | 0b764c5cec30d7042bb730b3a7d64a15 |
|
BLAKE2b-256 | 487b1df21aa9b9f2026bfe4585842a92344733cba2066c1412e7796ec561d083 |
File details
Details for the file gdoc_down-0.0.8-py2.py3-none-any.whl
.
File metadata
- Download URL: gdoc_down-0.0.8-py2.py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.23.2 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 152331f8491718735aaafa48415d73519a1f2654fe88a73c528a5f93a44af1c0 |
|
MD5 | b110bd32ebd5e7129dce50ea6f72e8ea |
|
BLAKE2b-256 | 0c18202d6377b6a162d238c0bfc1a24828511ea0fe4dc24a021696b70676d013 |