Metadata-Version: 2.4
Name: frank-tools
Version: 0.1.0
Summary: A small toolkit with Drive downloads, translation, audio splitting, and an HTTP API.
Author-email: Frank <frank@example.com>
License: Apache-2.0
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.9
Requires-Dist: fastapi
Requires-Dist: requests
Requires-Dist: tqdm
Requires-Dist: uvicorn[standard]
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Description-Content-Type: text/markdown

# Frank tools

Frank tools is a small, production-ready Python toolkit that bundles a few practical utilities:

- Google Drive file downloader that works with share links.
- Lightweight translation helper that wraps the public Google translate endpoint.
- M4B chapter-aware splitter helper for audio workflows.
- HTTP API (FastAPI) exposing health and translation endpoints.
- CLI commands and Docker image for easy usage.

## Installation

```bash
pip install .
```

## CLI usage

- Download from Drive: `frank-tools-drive --link "<drive url>"`
- Translate: `frank-tools-translate --text "Hola" --tl en`
- M4B split helper: `frank-tools-m4b --input book.m4b --chapters chapters.txt --output ./out`
- Central CLI with subcommands: `frank-tools <subcommand>`

## HTTP API

Run locally:

```bash
uvicorn frank_tools.api.app:app --reload
```

Endpoints:

- `GET /health` – health check.
- `POST /translate` – translate a piece of text via the internal translator.

## Development

```bash
python -m venv .venv
source .venv/bin/activate
pip install -e ".[test]"
```

Run tests:

```bash
pytest
```

Build & publish:

```bash
python -m build
twine upload dist/*
```

## Docker

```bash
docker build -t frank-tools .
docker run -p 8000:8000 frank-tools
```

## VS Code tips

- See `.vscode/launch.json` for debugging uvicorn or `pytest -k "pattern"`.
- `.vscode/settings.json` points the Python analysis engine at `src/` to resolve imports.
