Metadata-Version: 2.4
Name: downdocs
Version: 0.1.0
Summary: CLI tool to download Google Docs from stdin
Project-URL: Homepage, https://github.com/ebinesh25/download-google-docs
Project-URL: Repository, https://github.com/ebinesh25/download-google-docs.git
Project-URL: Issues, https://github.com/ebinesh25/download-google-docs/issues
Author-email: Ebinesh <ebinesh2511@gmail.com>
License: MIT
License-File: LICENSE
Keywords: cli,download,gdocs,google-docs,google-drive
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Requires-Dist: google-api-python-client
Requires-Dist: google-auth
Requires-Dist: google-auth-oauthlib
Description-Content-Type: text/markdown

# downdocs

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

## Installation

```bash
pip install downdocs
```

## Setup

1. Go to [Google Cloud Console](https://console.cloud.google.com/)
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

```bash
# 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](LICENSE) for details.
