from src import *
def process_pdf(pdf_path, cfg=None):
    """Generate viewer page for a single PDF."""
    cfg = cfg or SiteConfig()
    url = get_viewer_page(pdf_path, cfg=cfg)
    print("wrote viewer → {}".format(url))
    return url

pdf_path = "/run/user/1000/gvfs/sftp:host=192.168.1.100,user=solcatcher/srv/media/thedailydialectics/scripts/build_pdf_repo/test_pdfs/ch102practiceexam2/ch102practiceexam2.pdf"
process_pdf(pdf_path)
