mirror of
https://github.com/napnap75/multiarch-docker-images.git
synced 2026-11-12 00:52:11 +01:00
feat: enhance PDF text extraction and add maintenance features
- Refactor text extraction functions to extract text from all pages instead of just the first page. - Implement logging for better debugging during file operations. - Add a new maintenance page with options to rebuild the database and run consistency checks. - Update styles for maintenance actions and improve UI elements. - Remove obsolete rebuild database functionality from the main interface.
This commit is contained in:
@@ -37,7 +37,7 @@ import requests
|
||||
# Add parent directory to path for imports
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from app.extractor import extract_first_page_text
|
||||
from app.extractor import extract_document_text
|
||||
from app.sidecar import (
|
||||
Sidecar,
|
||||
SidecarStatus,
|
||||
@@ -826,7 +826,7 @@ class Importer:
|
||||
|
||||
# Update sidecar
|
||||
sidecar.sha256 = sha256
|
||||
sidecar.extracted_text = extract_first_page_text(pdf_bytes)
|
||||
sidecar.extracted_text = extract_document_text(pdf_bytes)
|
||||
|
||||
# Write sidecar
|
||||
sidecar_key = get_sidecar_key(target_key)
|
||||
|
||||
Reference in New Issue
Block a user