Skip to content

pdf2wiki 0.2.4 — fix remote-convert output paths

Choose a tag to compare

@Sevthered Sevthered released this 23 Jul 14:24

A targeted fix found by the first real end-to-end remote conversion run. No API changes; +1 test
(107 → 108).

pip install --upgrade pdf2wiki    # 0.2.4

Fixed

  • Remote convert produced no output (FAILED pass … no content_list.json). run_mineru handed the
    MinerU subprocess a relative -o/-p, but MinerU runs with a different working directory (the
    stdlib-shadow-safe clean_cwd), so its output landed where pdf2wiki couldn't find it. This only bit
    --remote mode, where --out is passed home-relative (_remote_path strips the leading ~/). The
    local path was unaffected (convert_book already expanduser-es out_root to an absolute path).
    Now the paths handed to MinerU are absolutized with os.path.abspath (idempotent for the local case).
    A regression test reproduces the cwd divergence and locks the fix.

Verified end-to-end on a real GPU box: a remote batch now writes both passes' content_list.json to the
correct tree, produces a clean merged Markdown, and leaves no orphaned GPU job.

Full changelog: CHANGELOG.md ·
PyPI: https://pypi.org/project/pdf2wiki/0.2.4/