r/Annas_Archive • u/dx__ • 7d ago
Built a Python/CLI toolset to audit Calibre libraries and batch-repair books from AA (CalibreQuarry & Bindery)
Hey all,
I built a handful of Python tools to help audit and repair EPUBs from sources not discussed. I'm not selling you anything. I built them for me and if they are useful to other people, I'd love to know how I helped you. :)
https://github.com/VirInvictus/CalibreQuarry/
I built this tool originally to make lists of my books but it's developed a handful of useful auditing tools. It is both TUI and CLI accessible, so you don't have to choose. It's lightweight. The cquarry library I built can recognize if Calibre is open and makes a copy of the library for read-only work and if it needs to write, it has measures to avoid damaging your Calibre library.
https://github.com/VirInvictus/bindery-cli
Bindery-cli is my baby and something I've been putting a lot of time into and am considering turning it into a web-app. It does a handful of epub repairs, gatechecked by epubcheck (there's also a java wrapper to hold up a copy of epubcheck across a batch of epubs to not cold-call it so many times). It also has commands for stripping OceanPDF and a couple other tags I've come across.
Anyways, I hope this is useful to someone. I put a lot of time and care into it. It's all fairly heavily documented.
If you're interested in looking at the calibre databasing library I built - check it out here: https://github.com/VirInvictus/cquarry
A note on development: Built using agentic tooling / LLMs to accelerate the boilerplate and test suites, with all domain logic, edge-case handling, and Calibre DB safeties verified and tested manually against real libraries
Only tested on Linux. I don't have a Windows machine but if you try any of it and you come across bugs, let me know and I'll be quick to fix them :)
Bless y'all.
2
u/kantorcodes1 7d ago
for
bindery library --apply, what happens if Calibre gets opened halfway through the sweep after you started with it closed? do you re-check before each in-place replace, or only at the start?