Skip to content

Commit

Permalink
delimiter added to hathi report
Browse files Browse the repository at this point in the history
  • Loading branch information
klinga committed May 13, 2024
1 parent a9e4f17 commit 6cf2e2d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions google_books/hathi_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,25 @@ def parse_hathi_processing_report(fh: str) -> None:
for line in file.readlines():
if "new cid =" in line:
cid = find_cid(line)
save2csv(f"files/out/hathi-{date}-success.csv", [cid])
save2csv(f"files/out/hathi-{date}-success.csv", ",", [cid])
elif line.startswith("WARNING: .b"):
bibno = find_bibno(line)
if "OCLC number found in unspecified 035$" in line:
save2csv(
f"files/out/hathi-{date}-unspecified-oclc.csv",
",",
[bibno],
)
elif "no OCLC number in record" in line:
save2csv(
f"files/out/hathi-{date}-missing-oclc.csv",
",",
[bibno],
)
elif line.startswith("ERROR"):
bibno = find_bibno(line)
err_msg = find_err_msg(line)
save2csv(f"files/out/hathi-{date}-errors.csv", [bibno, err_msg])
save2csv(f"files/out/hathi-{date}-errors.csv", "'", [bibno, err_msg])


def google_reconciliation_to_barcodes_lst(fh: str) -> list[str]:
Expand Down

0 comments on commit 6cf2e2d

Please sign in to comment.