{% extends "base.html" %} {% from "_help.html" import info %} {% block title %}Repair — Paperful{% endblock %} {% block body_attrs %}{% if poll_run %} data-poll-run="{{ poll_run }}"{% endif %}{% endblock %} {% block content %}

Repair

Cleanup for the collection in the header chip. Always Preview first — that writes a plan and does not change Zotero. Apply runs the last successful preview for that tool. Several of these can merge or rewrite library items.

{% if error == 'collection' %}
Pick a collection in the chip first.
{% endif %} {% if error and error != 'collection' %}
{{ error }}
{% endif %} {% if run_rec %}

Last run

The most recent Repair job. Apply stays disabled until a Preview for that same tool finishes successfully.

Last run: {{ run_rec.verb }} — {{ run_rec.status }}{% if run_rec.error %} — {{ run_rec.error }}{% endif %}

{% if run_rec.summary %}
{{ run_rec.summary }}
{% endif %}
{% endif %} {% for q in queues %}

{{ q.verb }}

{% if q.verb == 'lint' %}

Read-only check of identifiers, URLs, and attachment health. Preview writes a report; it never changes the library.

{% elif q.verb == 'screen' %}

Screen for retractions, optional PubPeer comments, and PPS-style tortured-phrase fingerprints in PDF text. Preview writes a report. Apply adds a parent tag and child note — not a misconduct finding.

{% elif q.verb == 'fix-metadata' %}

Fill missing title, date, venue, and DOI from Crossref and OpenAlex. Paperful never rewrites metadata during a Grab — this is the write path. Preview proposes patches; Apply writes them.

{% elif q.verb == 'dedupe' %}

Find duplicate items (same DOI, or same title+year, or grey-literature matches) and propose merges. Title+year merges are off unless you opt in — they can join different papers with similar titles.

{% elif q.verb == 'versions' %}

Find preprint vs published pairs and propose moving the published PDF onto the keeper item. Preview first; Apply performs the moves.

{% elif q.verb == 'attachments' %}

Fix broken PDF links, merge duplicate files on one item, rename attachments, or convert linked URLs into stored files (personal libraries only).

{% elif q.verb == 'ocr' %}

Run OCR on scanned PDFs that have no selectable text. Optional Attach writes the searchable file back to Zotero.

{% endif %} {% if q.files %}
Queued files ({{ q.files|length }})
{% endif %}

Preview / apply {{ info("Preview is the dry-run. Apply writes the last successful preview for this tool into Zotero or onto disk.") }}

{% if q.verb == 'fix-metadata' %} {% endif %} {% if q.verb == 'dedupe' %} {% endif %} {% if q.verb == 'attachments' %} {% endif %} {% if q.verb == 'ocr' %} {% endif %} {{ info("Run a dry-run and write the plan. Nothing in Zotero changes until Apply.") }}
{% if q.verb != 'lint' and run_rec and run_rec.verb == q.verb and run_rec.review_token and run_rec.status == 'done' %}
{{ info("Write the last successful preview for this tool. This can merge items or rewrite metadata.") }}
{% elif q.verb == 'lint' %}

Lint is read-only; Preview writes the report.

{% endif %}
{% endfor %} {% endblock %}