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

Mirror

The on-disk copy of the library under out/. Sync updates that folder from Zotero. Snapshot writes a full dump of the current collection. Restore creates missing Zotero items from disk — it never overwrites items that already exist. Always Preview before Apply.

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

Last run

The most recent Mirror job. Apply stays disabled until a Preview for that same action 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 %}

Open out/ on this machine to browse the files. Restore creates missing items only.

Actions

Each action is Preview (count and plan) then Apply (write). PDFs lazy copies a file the first time Paperful needs it. all copies every PDF now. none stores metadata only.

{% for verb in verbs %}

{{ verb }} {% if verb == 'sync' %} {{ info("Bring out/ up to date with Zotero. Reads what changed since the last refresh. Will refuse if most mirrored items are missing from this library, unless you tick Accept gone.") }} {% elif verb == 'snapshot' %} {{ info("Write a full dump of the current collection into out/. Heavier than Sync. Needs the collection chip.") }} {% elif verb == 'restore' %} {{ info("Create Zotero items that exist on disk but not in the library. Never overwrites an item that is already there. Needs the collection chip.") }} {% elif verb == 'cache clean' %} {{ info("Delete throwaway PDFs under state/pdf-cache/. Library files in out/ are not touched.") }} {% endif %}

{% if verb == 'sync' %}

Use this after Zotero has changed. Leave Accept gone off unless you are sure this is the same library — otherwise Paperful will refuse rather than mark hundreds of papers as gone.

{% elif verb == 'snapshot' %}

A full export of the collection chip into out/. Choose how PDFs are copied before you Preview.

{% elif verb == 'restore' %}

Puts missing items back into Zotero from out/. Existing items are left alone.

{% elif verb == 'cache clean' %}

Removes temporary download files. Safe for the library; you may have to re-fetch a PDF later.

{% endif %}
{% if verb in ['sync', 'snapshot'] %} {% endif %} {% if verb == 'sync' %} {% endif %} {{ info("Count what would change. Reads the library; writes nothing until Apply.") }}
{% if run_rec and run_rec.verb == verb and run_rec.review_token and run_rec.status == 'done' %}
{{ info("Write the last successful preview for this action.") }}
{% endif %}
{% endfor %}
{% endblock %}