.
This commit is contained in:
@@ -511,12 +511,13 @@ def find_title_in_capture_index(docid: str, base_dir: str) -> str | None:
|
||||
return None
|
||||
|
||||
|
||||
def process_file(path: str, out_dir: str, overwrite: bool = False) -> tuple[bool, str]:
|
||||
def process_file(path: str, out_dir: str, overwrite: bool = False, verbose: bool = False) -> tuple[bool, str]:
|
||||
"""Process one JSON file. Returns (success, output_path_or_error)."""
|
||||
base = os.path.basename(path)
|
||||
name, _ = os.path.splitext(base)
|
||||
|
||||
logger.debug(f"Processing file: {path}")
|
||||
if verbose:
|
||||
logger.debug(f"Processing file: {path}")
|
||||
|
||||
# attempt to extract article name for nicer filenames
|
||||
try:
|
||||
@@ -698,8 +699,9 @@ def process_file(path: str, out_dir: str, overwrite: bool = False) -> tuple[bool
|
||||
# could be list or simple string
|
||||
ddx_list = ddx_entry
|
||||
else:
|
||||
logger.debug(f"No cached DDX entry for docid {docid}")
|
||||
logger.debug(f"DDX keys available: {list(DDX.keys())}")
|
||||
if verbose:
|
||||
logger.debug(f"No cached DDX entry for docid {docid}")
|
||||
logger.debug(f"DDX keys available: {list(DDX.keys())}")
|
||||
|
||||
if ddx_list:
|
||||
# render list representation
|
||||
|
||||
Reference in New Issue
Block a user