FGU-bookfusion/tests
Claude 22950370de
Add HTTP companion, CWA button userscript and Docker deploy
Lets users trigger BookFusion sync directly from the Calibre-Web-Automated UI
without modifying CWA itself, and ships a ready-to-run Docker service.

- http_api (FastAPI): REST endpoints mirroring the MCP tools
  (/api/books, /api/books/{id}/sync, /api/limits, ...) with optional
  X-Auth-Token and CORS configurable via env vars. Also serves the
  Tampermonkey userscript at /bookfusion-sync.user.js and a minimal
  landing page at /.
- web/bookfusion-sync.user.js: Tampermonkey userscript that detects
  CWA book detail URLs (/book/<id>) and injects a "Sync to BookFusion"
  button with live status (on BookFusion / not yet / error).
- __main__: new `bookfusion-http` entry point running uvicorn on
  BOOKFUSION_HTTP_HOST:BOOKFUSION_HTTP_PORT (default 0.0.0.0:8765).
- pyproject: add fastapi + uvicorn deps, force-include the web/ assets
  in the wheel so they're present after `pip install`.
- deploy/: Dockerfile, docker-compose.yml, .env.example and a
  step-by-step README for dropping the stack on
  /Volumes/docker/calibre-web-automated/bookfusion-mcp/.
- tests/test_http_api.py: smoke coverage of /healthz, /api/books,
  the userscript route, the landing page and token auth.
2026-04-14 12:43:21 +00:00
..
__init__.py Add BookFusion MCP server for Calibre / Calibre-Web-Automated 2026-04-14 12:19:55 +00:00
test_bookfusion_api.py Add BookFusion MCP server for Calibre / Calibre-Web-Automated 2026-04-14 12:19:55 +00:00
test_calibre_library.py Add BookFusion MCP server for Calibre / Calibre-Web-Automated 2026-04-14 12:19:55 +00:00
test_http_api.py Add HTTP companion, CWA button userscript and Docker deploy 2026-04-14 12:43:21 +00:00