Skip to main content

CLI tool to download Google Docs from stdin

Project description

downdocs

A CLI tool to download Google Docs from stdin. Pipe Google Doc IDs and download them as DOCX, TXT, or Markdown files.

Installation

pip install downdocs

Setup

  1. Go to Google Cloud Console
  2. Create a new project or select existing one
  3. Enable the Google Drive API
  4. Create OAuth 2.0 credentials (Desktop app)
  5. Download the credentials JSON file
  6. Save it to ~/.config/downloadDocs/credentials.json

Usage

# Pipe document IDs to download
echo "1ABC...xyz" | downdocs

# Specify output directory
echo "1ABC...xyz" | downdocs --out ./my-docs

# Download as Markdown
echo "1ABC...xyz" | downdocs --format md

# Download multiple docs
cat doc_ids.txt | downdocs --format docx --out ./downloads

Options

Option Default Description
--out ./docs Output directory
--format docx Download format (docx, txt, md)
--token ~/.config/downloadDocs/token.json Path to token.json
--credentials ~/.config/downloadDocs/credentials.json Path to credentials.json

Getting Document IDs

Google Doc IDs are the part of the URL between /d/ and /edit:

https://docs.google.com/document/d/1ABC123xyz/edit
                           ^^^^^^^^^^
                           Document ID

License

MIT License - see LICENSE for details.

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

downdocs-0.1.0.tar.gz (44.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

downdocs-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file downdocs-0.1.0.tar.gz.

File metadata

  • Download URL: downdocs-0.1.0.tar.gz
  • Upload date:
  • Size: 44.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for downdocs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 804751b46eb13537086065b994ecd3277389be1dc57ecb7deefbd9ca8b57211d
MD5 94fbfb9ff41d54bd1c4e945d28ba4d0d
BLAKE2b-256 0b5915df775f689b71fc1864996e9a8e5c8ee0f8a417c98ccfe675ee51ead502

See more details on using hashes here.

File details

Details for the file downdocs-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: downdocs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for downdocs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51c498c4ca02cb2004d7af096462b2a6caa1af9aa7a9fe204278de4fd1ae76e2
MD5 de529ae8b30a57e68bdf3ffc9f2a14c9
BLAKE2b-256 1db4751b7472e83df62ee64549500173cbf7180f7a6878c99bb08bd98191ed57

See more details on using hashes here.

Supported by

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