{% extends "base.html" %} {% from "components/help_macros.html" import tooltip, help_panel, help_step, help_tip, help_card %} {% block title %}Research Library{% endblock %} {% block extra_head %} {% endblock %} {% block content %}

Research Library

{{ stats.total_pdfs }} PDFs {{ stats.total_size_mb|round(1) }} MB {{ storage_path|truncate(30) }}
Storage Mode: {% if shared_library %} Shared Library {% else %} Private Library {% endif %}
{{ tooltip("PDF Storage:", "Database: Encrypted, most secure. Filesystem: Unencrypted files on disk - use only if you need external tool access. Text Only: Smallest footprint, no original PDFs kept.") }} {% if pdf_storage_mode == 'database' %} {% elif pdf_storage_mode == 'filesystem' %} {% else %} {% endif %}
{% call help_panel('library-how', 'How the Research Library Works', icon='book', collapsed=true, dismissible=true) %}
{{ help_step(1, "Research Sources", "When you run research, all discovered sources (PDFs, papers, articles) are automatically tracked.") }} {{ help_step(2, "Download to Library", "Use 'Get All Research PDFs' to download PDFs from tracked sources. Use 'Text Only' for just searchable text.") }} {{ help_step(3, "Organize with Collections", "Create collections to group documents by topic. The Library shows all documents; Collections are custom groupings.") }} {{ help_step(4, "Search via RAG", "Index collections to enable semantic search. When researching, select a collection as your search engine to search your documents.") }}
{{ help_card("Database Storage", "PDFs encrypted in your database. Most secure and portable.", icon="database", variant="success") }} {{ help_card("Filesystem Storage", "PDFs stored on disk. Faster for large files but unencrypted.", icon="hdd", variant="warning") }} {{ help_card("Text Only", "Only extracted text is stored. Smallest footprint, no PDF viewing.", icon="file-alt", variant="neutral") }}
{{ help_tip("Tip: Use 'Sync Library' after moving or deleting files manually to update the database.") }} {% endcall %}
{% for doc in documents %}
{% if doc.is_arxiv %} arXiv {% elif doc.is_pubmed %} PubMed {% elif doc.file_type == 'pdf' %} {% else %} {% endif %}
{% if doc.has_pdf %} View PDF {% endif %} {% if doc.has_text_db %} View Text {% endif %} {% if doc.has_rag_indexed %} RAG Indexed {% endif %} {% if not doc.has_pdf and not doc.has_text_db %}
Not Downloaded
{% endif %}

{{ doc.document_title or doc.file_name }}

{% if doc.authors %}

{{ doc.authors|join(', ')|truncate(50) }}

{% endif %}
{% endfor %}
{% if total_pages > 1 and documents %} {% set filter_params = "" %} {% if request.args.get('collection') %}{% set filter_params = filter_params ~ "&collection=" ~ (request.args.get('collection') | urlencode) %}{% endif %} {% if request.args.get('research') %}{% set filter_params = filter_params ~ "&research=" ~ (request.args.get('research') | urlencode) %}{% endif %} {% if request.args.get('domain') %}{% set filter_params = filter_params ~ "&domain=" ~ (request.args.get('domain') | urlencode) %}{% endif %} {% if request.args.get('date') %}{% set filter_params = filter_params ~ "&date=" ~ (request.args.get('date') | urlencode) %}{% endif %} {% endif %} {% if not documents %}
{% if selected_domain or selected_research or selected_collection %}

No documents match the current filters

Try changing or clearing your collection, domain, or research filters

Clear All Filters {% else %}

No documents in your library yet

{% if not enable_pdf_storage %}

PDF storage is set to Text Only mode.

Choose how to store your research PDFs:

  • Database (Recommended): PDFs encrypted in your personal database. Secure, portable, isolated per-user.
  • Filesystem: Faster for large files, but stored unencrypted on disk.
  • Text Only: Current mode - only extracted text is stored.

Text content is always stored encrypted in your personal database.

{% else %}

Start downloading PDFs from your research to build your library

{% endif %} {% endif %}
{% endif %}

PDF Viewer

Text Viewer

{% include 'components/storage_mode_modal.html' %} {% include "components/delete_confirmation_modal.html" %} {% endblock %}