document_sorter/README_V1_4.md
2026-09-16 13:10:15 +02:00

42 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Quick Sorter v1.4 – focused content-reading upgrade
Changes from v1.3:
- Document extraction failures are no longer silent. The GUI shows a **Content** status such as `docx:1834`, `missing:python-docx`, or `pdf:no-text-or-scan`.
- DOCX extraction reads document metadata, normal paragraphs, **tables**, headers, and footers. This matters for Ablaufpläne and forms whose useful text often lives in tables.
- PDF: metadata + first 3 text pages.
- XLSX: sheet names + first rows of first 2 sheets.
- PPTX support via `python-pptx`.
- ODT support via `odfpy`.
- The LLM now extracts structured semantic fields: topic, subtopic, document type, detail, version. Python builds the final filename deterministically from those fields.
- Generic filenames with no readable content are capped below auto-confirm confidence instead of guessed confidently.
## Recommended packages inside your pyenv virtualenv
```bash
python -m pip install python-docx pypdf openpyxl python-pptx odfpy pillow
```
No `--break-system-packages` is needed inside a proper virtualenv.
Check what this exact Python environment can read:
```bash
python quick_sorter.py --check-deps
```
(`dummy` is ignored when `--check-deps` is used, but the positional argument is still required by argparse in v1.4.)
## Best first test
Start the app against the test copy and select only `2026-08-21_Ablaufplan.docx`.
After **Analyse selected**, inspect the new `Content` and `Semantic` columns.
If the content reader works and the document actually contains the event name, you should see something like:
- Content: `docx:...`
- Semantic: `cafe-bach / bach-voices / ablaufplan`
- Destination: `Cafe_Bach/Veranstaltungen`
- Name: `2026-08-21_cafe-bach_bach-voices_ablaufplan.docx`
If Content says `missing:python-docx`, install `python-docx` in the active virtualenv.
If Content says `docx:no-text`, the file may use unsupported drawing/textbox content; that is a separate extraction case to add only if needed.