Skip to main content

Download Google documents to files

Project description

PyPI package Documentation Test results Test coverage Code analysis License Analytics

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

gdoc_down-0.0.9.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

gdoc_down-0.0.9-py2.py3-none-any.whl (9.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file gdoc_down-0.0.9.tar.gz.

File metadata

  • Download URL: gdoc_down-0.0.9.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for gdoc_down-0.0.9.tar.gz
Algorithm Hash digest
SHA256 8a6c6df27226677f8ea1cface23863be10f3f677234edb0f9b8aad11b09d13b8
MD5 e88832048411db6fc42ca3c64bc90673
BLAKE2b-256 00a5e1e55c913f0a3d17b54b8417c77e2c794a93e5e274155499bbab1421514e

See more details on using hashes here.

File details

Details for the file gdoc_down-0.0.9-py2.py3-none-any.whl.

File metadata

  • Download URL: gdoc_down-0.0.9-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for gdoc_down-0.0.9-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b4e43b4cf2fd8908c8df7848e8d20b8391f7e0423a33097b68c6933b05a338a9
MD5 c653f8fe71b690ec1f6057c4d946e3ef
BLAKE2b-256 41902e77076bf130b5e90fafa04cc28c8ac659245f5178232cc4b63d5c5db20c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page