mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 06:50:53 +00:00
feat(13-logging-foundation): add verbose param to worker function signatures
- run_selection_sync(vault) -> run_selection_sync(vault, verbose=False) - run_index_refresh(vault) -> run_index_refresh(vault, verbose=False) - run_ocr(vault) -> run_ocr(vault, verbose=False) - run_doctor(vault) -> run_doctor(vault, verbose=False) - run_status(vault) -> run_status(vault, verbose=False) - Backward compatible: default False preserves existing call sites
This commit is contained in:
parent
8bae45e301
commit
00692ef667
3 changed files with 5 additions and 5 deletions
|
|
@ -1217,7 +1217,7 @@ def postprocess_ocr_result(vault: Path, key: str, all_results: list[dict]) -> tu
|
|||
fulltext_md_path = str(fulltext_path.resolve())
|
||||
return (page_num, markdown_path, json_path, fulltext_md_path)
|
||||
|
||||
def run_ocr(vault: Path) -> int:
|
||||
def run_ocr(vault: Path, verbose: bool = False) -> int:
|
||||
from paperforge.pdf_resolver import resolve_pdf_path
|
||||
paths = pipeline_paths(vault)
|
||||
cleanup_blocked_ocr_dirs(paths)
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ def check_wikilink_format(vault: Path, paths: dict, add_check) -> None:
|
|||
)
|
||||
|
||||
|
||||
def run_doctor(vault: Path) -> int:
|
||||
def run_doctor(vault: Path, verbose: bool = False) -> int:
|
||||
"""Validate PaperForge Lite setup and report by category.
|
||||
|
||||
Returns:
|
||||
|
|
@ -563,7 +563,7 @@ def _is_junction(path: Path) -> bool:
|
|||
return False
|
||||
|
||||
|
||||
def run_status(vault: Path) -> int:
|
||||
def run_status(vault: Path, verbose: bool = False) -> int:
|
||||
"""Print a compact Lite install/runtime status."""
|
||||
paths = pipeline_paths(vault)
|
||||
cfg = load_vault_config(vault)
|
||||
|
|
|
|||
|
|
@ -808,7 +808,7 @@ def load_control_actions(paths: dict[str, Path]) -> dict[str, dict]:
|
|||
actions[zotero_key] = {'analyze': row.get('analyze', False), 'do_ocr': row.get('do_ocr', False)}
|
||||
return actions
|
||||
|
||||
def run_selection_sync(vault: Path) -> int:
|
||||
def run_selection_sync(vault: Path, verbose: bool = False) -> int:
|
||||
from paperforge.worker.base_views import ensure_base_views
|
||||
from paperforge.worker.ocr import validate_ocr_meta
|
||||
paths = pipeline_paths(vault)
|
||||
|
|
@ -1355,7 +1355,7 @@ def frontmatter_note(entry: dict, existing_text: str='') -> str:
|
|||
def analyze_selected_keys(paths: dict[str, Path]) -> set[str]:
|
||||
return {key for key, row in load_control_actions(paths).items() if row.get('analyze')}
|
||||
|
||||
def run_index_refresh(vault: Path) -> int:
|
||||
def run_index_refresh(vault: Path, verbose: bool = False) -> int:
|
||||
from paperforge.worker.base_views import ensure_base_views
|
||||
from paperforge.worker.ocr import validate_ocr_meta
|
||||
paths = pipeline_paths(vault)
|
||||
|
|
|
|||
Loading…
Reference in a new issue