merge: chore/cleanup-remove-bloat-and-secrets into main
This commit is contained in:
commit
bde2f3a97d
1173 changed files with 437609 additions and 0 deletions
20
scripts/check_pdf_titles.py
Normal file
20
scripts/check_pdf_titles.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Check titles of downloaded PDFs."""
|
||||
|
||||
import os
|
||||
|
||||
import fitz
|
||||
|
||||
papers_dir = "/root/backend/data/papers"
|
||||
for pid in ["2208.00613", "2106.09489", "2204.09632"]:
|
||||
path = os.path.join(papers_dir, f"{pid}.pdf")
|
||||
try:
|
||||
doc = fitz.open(path)
|
||||
text = doc[0].get_text()[:500]
|
||||
print(f"\n=== {pid} ===")
|
||||
for line in text.split("\n")[:10]:
|
||||
if line.strip():
|
||||
print(f" {line.strip()}")
|
||||
doc.close()
|
||||
except Exception as e:
|
||||
print(f" ERROR: {e}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue