Metadata-Version: 2.4
Name: fixm4b
Version: 0.1.3
Summary: Retag converted audiobooks (ID3 / filenames) without re-encoding.
License: MIT
License-File: LICENSE
Author: Brandon Shelley
Author-email: brandon@pacificaviator.co
Requires-Python: >=3.12,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: cachetools (>=5.5.2,<6.0.0)
Requires-Dist: goodscraps (>=0.1.4,<0.2.0)
Requires-Dist: mutagen (>=1.47.0,<2.0.0)
Requires-Dist: pydantic (>=2.11.5,<3.0.0)
Requires-Dist: rapidfuzz (>=3.13.0,<4.0.0)
Requires-Dist: regex (>=2024.11.6,<2025.0.0)
Requires-Dist: requests (>=2.32.3,<3.0.0)
Requires-Dist: requests-cache (>=1.2.1,<2.0.0)
Requires-Dist: tinta (>=1.1.0,<2.0.0)
Requires-Dist: titlecase (>=2.4.1,<3.0.0)
Description-Content-Type: text/markdown

# fixm4b

Retag converted audiobooks (ID3 tags, filenames, companion `.txt`) without re-encoding.
Uses Open Library and optional Goodreads (`goodscraps`) / bookpeek.

## Install

```bash
pip install fixm4b
# or
brew install brandonscript/tap/fixm4b
# or from this checkout
./install.sh
```

```bash
fixm4b --help
fixm4b config new
fixm4b config show
```

## Configuration

Default path: `~/.config/fixm4b/config.toml` (or `$XDG_CONFIG_HOME/fixm4b/config.toml`).

Precedence: CLI flags > environment variables > `config.toml` > built-in defaults.

Useful env vars: `OPEN_LIBRARY_USER_AGENT`, `GOODSCRAPS_USER_AGENT`, `BOOKPEEK`,
`CLEANUP_FILENAMES`, `CLI_CONVERTED_FOLDER`, `CLI_ARCHIVE_FOLDER`, `CLI_INBOX_FOLDER`.

## Development

```bash
poetry install
poetry run pytest
poetry run fixm4b --help
```

## License

MIT


## PyPI releases

GitHub Releases trigger `.github/workflows/publish.yml` (Trusted Publishing).
Configure a PyPI trusted publisher for `brandonscript/fixm4b` (environment `pypi`)
before the first wheel upload succeeds. Until then, install from GitHub or Homebrew.

Bump both `pyproject.toml` and `src/fixm4b/__init__.py` together:

```bash
poetry run python scripts/set_version.py 0.1.3
git add pyproject.toml src/fixm4b/__init__.py
git commit -m "Bump package version"
git push origin main
```

Repository secrets:

- `RELEASE_TOKEN` — fine-grained PAT with **Contents: Read and write** on
  `brandonscript/fixm4b` (so the release event can trigger publish.yml)
- `HOMEBREW_TAP_TOKEN` — fine-grained PAT with **Contents: Read and write** on
  `brandonscript/homebrew-tap`

