Skip to content

"CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/

Python

Update calibre/agent-harness/cli_anything/calibre/core/formats.py

orgleaf176f2f2e7738
diff --git a/calibre/agent-harness/cli_anything/calibre/core/formats.py b/calibre/agent-harness/cli_anything/calibre/core/formats.py
index 25e6bc509..6214c9aab 100644
--- a/calibre/agent-harness/cli_anything/calibre/core/formats.py
+++ b/calibre/agent-harness/cli_anything/calibre/core/formats.py
@@ -110,9 +110,9 @@ def convert_format(
output_fmt = output_fmt.upper()
with tempfile.TemporaryDirectory() as tmpdir:
- # Export the book to get the source file
+ # Export only the target book and requested input format to get the source file
export_result = run_calibredb(
- ["export", "--to-dir", tmpdir, str(book_id)],
+ ["export", "--to-dir", tmpdir, "--formats", input_fmt, str(book_id)],
library_path=library_path,
)