{% extends "base.html" %} {% from "_help.html" import info %} {% from "_icon_btn.html" import icon_button %} {% from "_job_status.html" import job_status %} {% block title %}Library — Paperful{% endblock %} {% block body_attrs %}{% if request.query_params.get('run') %} data-poll-run="{{ request.query_params.get('run') }}"{% endif %}{% endblock %} {% block content %} {% macro collection_line(node) %} {{ node.name }} {{ node.item_count }} {{ node.missing_pdf }} {% endmacro %} {% macro collection_nodes(nodes) %} {% for node in nodes %} {% if node.children %}
{{ collection_line(node) }}
{{ collection_nodes(node.children) }}
{% else %}
{{ collection_line(node) }}
{% endif %} {% endfor %} {% endmacro %}

Library

{{ library_label }} collections. The target icon sets the collection chip in the header — Wanted, Discover, Ask, Index, and Briefs all follow that chip. Missing PDF is how many items in that collection still have no stored file.

{% if error %}
{{ error }}
{% endif %} {{ job_status(metrics_job, label='Citation counts') }}

Collections

{% if collections_checked_at %}Counted {{ collections_checked_at|int }}{% endif %} {{ info("Item and missing-PDF counts are cached for ten minutes because counting a large library is slow. Refresh after you change the library in Zotero.") }}

Click a name to expand nested collections. Item counts include subcollections. Set scope on the collection you actually want to work on, not only the parent folder; you land on Wanted for that collection.

{% if collection_tree %}
{{ collection_nodes(collection_tree) }}
{% else %}

No collections loaded.

{% endif %}
{% if prefs.collection and library_pagination.total %}

Items in {{ prefs.collection }}

{{ info("Looks up OpenAlex (then Crossref) citation counts for this collection and stores them under state/metrics/. Tick Write notes in Zotero to create or update one tagged child note per item (visible in the Zotero item pane). Does not write Extra or parent tags. Skip rows fetched within [metrics].stale_days.") }}
{{ library_pagination.range_start }}–{{ library_pagination.range_end }} of {{ library_pagination.total }} {% if library_pagination.sort and library_pagination.sort != 'year' %} {% endif %} {% if library_pagination.prev_url %} Previous {% endif %} Page {{ library_pagination.page }} / {{ library_pagination.page_count }} {% if library_pagination.next_url %} Next {% endif %}

Items currently in the collection chip. PDF yes means the library already has a stored file. Citations come from the last Refresh citations (OpenAlex, then Crossref). Open Detail for the summary, if one exists.

{% for row in items %} {% endfor %}
Items in {{ prefs.collection }}
Title {% if library_pagination.sort == 'citations' %}Year{% else %}Year{% endif %} {% if library_pagination.sort == 'citations' %}Citations{% else %}Citations{% endif %} PDF Summary Detail
{{ row.title }} {{ row.year or '' }} {% if row.cited_by_count is not none %}{{ row.cited_by_count }}{% else %}—{% endif %} {% if row.has_pdf %}yes{% else %}no{% endif %} {% if row.has_summary %}yes{% else %}—{% endif %} {{ icon_button('Detail', 'detail', drawer='lib-' ~ row.key) }}
{% elif prefs.collection %}

No items loaded for this collection.

{% else %}

Set a collection chip to list items here.

{% endif %} {% endblock %}