BookFusion sync integration for CWA — wrapper image + sidecar (no fork required) #1301
Fguarien
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @crocodilestick and CWA community,
I built a small integration that adds a Sync to BookFusion button (single / multi-select / all) to the CWA library and book-detail pages, without forking CWA.
Repos :
calibre-web-automated-bookfusion(wrapper image) +FGU-bookfusion(sidecar).Architecture
FROM crocodilestick/calibre-web-automated:dev+ a Flask blueprint, JS bundle, CSS overlay.cps/main.pyis patched at build time on a stable anchor (switch_themeregistration line) — no CWA file overwritten, so the image rebases trivially on a new CWA release./bookfusion/api/*to the sidecar (kept on the Docker network only — never exposed on the host).after_app_requesthook injects the bootstrap<script>only into HTML responses to admin users; non-admin pages are byte-identical.Plays nice with CWAs security
current_user.role_admin()gate (with aBOOKFUSION_ALLOWED_USERNAMESenv override for OAuth setups that strip the admin role)X-CSRFTokenBattle-tested
Running for 2 weeks on a 1500-book library. Sync all finishes in ~1h with
BOOKFUSION_UPLOAD_THREADS=4. Already-synced books with unchanged metadata are skipped (digest comparison) so reruns are nearly free.Happy to open a PR on CWA itself if theres interest in shipping this as an opt-in feature gated by an env var. Otherwise it lives as an ecosystem project. Curious about reactions / suggestions — and let me know if youd like the PR.
— Fred
Beta Was this translation helpful? Give feedback.
All reactions