feat: add rich ui for converting

This commit is contained in:
2026-04-17 19:15:31 -04:00
parent cbb56d0561
commit 832312297c
8 changed files with 694 additions and 27 deletions
+11 -5
View File
@@ -205,10 +205,12 @@ class TestCLI:
"""Test convert command with no papers."""
self.run_paperlib_cmd("init", str(temp_library))
result = self.run_paperlib_cmd("convert", "--library", str(temp_library))
result = self.run_paperlib_cmd(
"convert", "--no-ui", "--library", str(temp_library)
)
assert result.returncode == 0
assert "Complete: 0 successful, 0 failed" in result.stdout
assert "Converted pending: 0 successful, 0 failed" in result.stdout
def test_convert_command_with_papers_no_mineru(self, temp_library, sample_pdf):
"""Test convert command with papers when MinerU is not available."""
@@ -218,11 +220,15 @@ class TestCLI:
"import", "--pdf", str(sample_pdf), "--library", str(temp_library)
)
# Convert (will fail because MinerU command may not be properly set up)
result = self.run_paperlib_cmd("convert", "--library", str(temp_library))
# Convert without UI (will fail because MinerU command may not be properly set up)
result = self.run_paperlib_cmd(
"convert", "--no-ui", "--library", str(temp_library)
)
# Should complete but may have failures due to MinerU setup
assert "Complete:" in result.stdout
assert ("Converted pending:" in result.stdout) or (
"Converting papers" in result.stdout
)
def test_invalid_command(self):
"""Test invalid command."""