feat(pdf): tests pytest + fix bug NameError pour #74
CI / lint (push) Failing after 19s
CI / test (push) Skipped
CI / build (push) Skipped
CI / e2e (push) Skipped
CI / security (push) Successful in 23s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
CI / lint (push) Failing after 19s
CI / test (push) Skipped
CI / build (push) Skipped
CI / e2e (push) Skipped
CI / security (push) Successful in 23s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
- tests/test_pdf.py : 13 tests (100% verts) couvrant : - extract_pdf_text/metadata/toc avec edge cases (corrupt, missing, truncation) - .pdf dans SUPPORTED_EXTENSIONS - _scan_vault() extrait le texte des PDFs (vérifié avec fixture reportlab) - parseur du filtre ext:pdf - backend/pdf_reader.py : fix NameError quand pymupdf est installé (PdfReader n'était déclaré que dans la branche except ImportError) - backend/requirements-test.txt : reportlab pour générer des PDFs de test (devDep only) - README.md + README.fr.md : section 'PDF support' documentée - docs/ROADMAP.md : #74 marqué 'pratiquement complet' avec détail honnête des items livrés vs non - CHANGELOG.md : entrées pour #71 admin (déjà dans commit précédent), #75 I2 et #74
This commit is contained in:
@@ -738,7 +738,15 @@ curl "http://localhost:2020/api/file/Recipes?path=pizza.md"
|
||||
| `ext:<type>` | Filter by file type | `ext:md kubernetes` |
|
||||
| `"exact phrase"` | Phrase search | `tag:"multiple words"` |
|
||||
|
||||
Extension filter examples: `ext:sh` for bash scripts, `ext:py` for Python scripts, `ext:md` for Markdown files.
|
||||
Extension filter examples: `ext:sh` for bash scripts, `ext:py` for Python scripts, `ext:md` for Markdown files, `ext:pdf` for PDF documents (text-extracted content is indexed).
|
||||
|
||||
### PDF support
|
||||
|
||||
PDF files in your vaults are rendered inline in the browser via the native PDF viewer (iframe + `<embed>`).
|
||||
Text is extracted on indexing (pypdf / pymupdf) so PDF content is searchable via the full-text search.
|
||||
Filter with `ext:pdf` to restrict results to PDFs.
|
||||
|
||||
**Limitations:** no OCR (scanned PDFs aren't searchable), no annotation, no editing of the PDF itself.
|
||||
|
||||
Operators are combinable: `tag:linux vault:IT ext:md server web` searches for "server web" in Markdown files of the IT vault with the linux tag.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user