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
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable the Google Drive API
- Create OAuth 2.0 credentials (Desktop app)
- Download the credentials JSON file
- 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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
804751b46eb13537086065b994ecd3277389be1dc57ecb7deefbd9ca8b57211d
|
|
| MD5 |
94fbfb9ff41d54bd1c4e945d28ba4d0d
|
|
| BLAKE2b-256 |
0b5915df775f689b71fc1864996e9a8e5c8ee0f8a417c98ccfe675ee51ead502
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51c498c4ca02cb2004d7af096462b2a6caa1af9aa7a9fe204278de4fd1ae76e2
|
|
| MD5 |
de529ae8b30a57e68bdf3ffc9f2a14c9
|
|
| BLAKE2b-256 |
1db4751b7472e83df62ee64549500173cbf7180f7a6878c99bb08bd98191ed57
|