relink_html
Connects each evidence card in an HTML summary to your own local PDFs, adding an "Open PDF" button at the cited passage and writing a private, openable copy beside the original.
Instructions
Give a reader links from a summary or embedded HTML file (from summarize_ledger or
embed_ledger, e.g. one a co-author sent) to their own PDFs in folder (best: a sources/
folder of only the cited PDFs named <citation key>.pdf, kept out of version control;
never a whole library) or in a link_map (a .private.json file as for resolve_links).
Records are read
from the data the file carries, sources matched as in resolve_links, and each evidence card
gets a "Your copy" line with an "Open PDF" button opening the PDF at the passage's page, or else
at the cited page, and, where the map gives an open link, an "Open in library" button
with the page appended (?page=N).
Writes <name>.private.html next to the original (a rerun replaces a copy it wrote, no
other file) and never changes
the original. The copy is marked private in its name, title and a banner, and is not indexed:
tell the user it links to files on this computer and must not be shared or published; they
share the original instead. Links are relative when the PDFs are inside the copy's folder
(so a team sharing that folder can open them), absolute file:// links otherwise; they work
when the copy is opened from disk, not from a website. Returns record ids by status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | ||
| folder | No | ||
| link_map | No | ||
| bibliography | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |