Configuration (config.toml)¶
Copy config.minimal.toml for a first run (email, paths, open-access sources)
or config.example.toml for the full file. Both are tracked; config.toml is not.
Docker: prefer relative out_dir / state_dir ("out" / "state"). Paths
with ~/… expand to the container user’s home (not the Compose /data mount),
so host session login and docker compose run will disagree about where
cookies live. paperful doctor ambers when that happens.
Grey literature and no-DOI items — Unpaywall and most DOI sources cannot
resolve PrepCom papers, many DOALOS/UN docs, or undocs without a DOI. direct
uses declarative grey playbooks (rewrite / scrape / synthesize). Grey-lit
packs: UNGA/undocs · BBNJ/DOALOS · ISA (plus FAO/OECD/IEA/WHO examples). Add
your own hosts in config.toml. Skip-host URLs (YouTube, Scholar, …) still
synthesize from Extra/title when a playbook matches. Then htmlpdf can print
DOI-less document / report pages. Otherwise the manifest records
no_identifier. See Grey literature playbooks
and architecture.
Key |
Default |
Meaning |
|---|---|---|
|
|
Contact address for Unpaywall, Crossref, and NCBI. OpenAlex ignores |
|
|
Library adapter. |
|
|
Elsevier OAuth app from dev.mendeley.com/myapps.html. Or |
|
|
Must match the app. Host-only ( |
|
(none) |
Path to the |
|
|
PDF tree; manifest, patches, PDF cache, run reports, and write key |
|
|
|
|
|
Where the readable lines go: where a PDF came from, which duplicate to keep, and why a snowball hit belongs. |
|
|
Source order; |
|
|
Check library DOIs against Crossref/OpenAlex before fetching; may swap DOI in memory for that run. |
|
|
Title similarity below this marks a library DOI as suspect (eligible for in-memory swap). API failure is |
|
|
CORE API bearer token; empty skips the |
|
|
Campus proxy prefix ending in |
|
|
Compat Netscape dump after |
|
|
Compat Netscape dump after |
|
|
Load the packaged ocean/governance example pack |
|
(none) |
Directory of extra pack |
|
(none) |
User rewrite/scrape/synthesize rules; same |
|
built-in list |
Hostnames tried in order |
|
|
Random pause (seconds) before each Sci-Hub / EZProxy / htmlpdf page fetch |
|
|
Parallel workers for open-access sources (Scholar, EZProxy, htmlpdf, and Sci-Hub are serial) |
|
|
Smaller downloads are rejected as error pages |
|
|
Title-similarity threshold for accepting a title→DOI match (Crossref, then OpenAlex, then Semantic Scholar) |
|
|
Network failures before a Sci-Hub mirror is skipped for the run |
|
|
Skip sources that look inapplicable from item metadata; use |
|
|
Block-like failures (CAPTCHA, rate limits) before a source is skipped for the rest of the run |
|
|
Attach into Zotero after download ( |
|
|
Name shown in Zotero’s authorisation dialog |
|
Chrome-like string |
HTTP |
Leave ezproxy_base empty (or remove ezproxy from sources) if you do not
use a library proxy. Google Scholar is off until you add scholar to
sources (and usually run session login scholar). Sci-Hub is off until
you add "scihub" to sources or pass --scihub — see Sci-Hub.
Items dated after 2021 are not sent to Sci-Hub; a --year-from past that
year drops it from the run list.
Set source_routing = false (or pass --try-all) when Zotero fields are
untrustworthy and you want every configured source tried anyway.
Run configs (profiles)¶
A profile stores one SCOPE plus the fetch/write flags you would otherwise repeat on the command line. It is not a grey-lit playbook and not a pack. Full recipes: Workflows.
Term |
Meaning |
|---|---|
Profile / run config |
Named SCOPE + policy ( |
|
|
|
Open-access sources only (the default list without |
|
OA + EZProxy; no Scholar, no Sci-Hub. Same names as the default |
Playbook |
Grey-lit URL → PDF rule |
Pack |
Witness of one executed sequence under |
Snowball profile |
|
Where files live. Beside config.toml:
[profiles.<name>]tables in that fileprofiles/<name>.tomlin the same directory (overlay: file wins per key)
Relative profiles/ follows the config file, including Compose /data.
Profiles are not written under state/ (that tree is backup-excluded).
Precedence for paperful all and paperful profile show:
Builtin
allpolicy when the profile omits a key: stepsgaps,run,lint,fix-metadata,summarize;try_all,retry_failed,upgrade_linked, andapplytrue[profiles.*]profiles/<name>.toml--profileor-f/--run-configExplicit CLI flags
A bare paperful run --profile does not inherit the builtin all flags.
Omitted try_all stays off unless the profile sets it.
TOML key |
CLI |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
profile save NAME writes profiles/NAME.toml from the flags on that
invocation (plus --profile / -f if you are copying one). It refuses to
overwrite unless --force. It does not edit config.toml.
[profiles.bbnj-journal]
description = "BBNJ journal articles 2021–2026"
collections = ["BBNJ"]
types = ["journalArticle"]
year_from = 2021
year_to = 2026
try_all = true
retry_failed = true
upgrade_linked = true
apply = true
Grey literature playbooks¶
Host-specific PDF rules are data, not forever-hardcoded Python. Kinds:
Kind |
When |
Example |
|---|---|---|
|
Zero-fetch URL → PDF ( |
FAO |
|
Prefer matching hrefs on that host’s HTML landing |
OECD |
|
Extra/title (or skip-host URL + Extra) → PDF URL |
UN document symbol → undocs |
The packaged file
paperful/data/grey_playbooks_ocean.toml
is an ocean/governance example pack — grey-lit packs UNGA/undocs ·
BBNJ/DOALOS · ISA, plus FAO/OECD/IEA/WHO examples — on by default via
grey_playbooks_builtin = true. Optionally set grey_playbooks_dir = "packs"
to load every *.toml in that directory (same schema). Merge order: builtin →
dir packs → inline [[grey_playbooks]] (same name replaces earlier entries).
PMC / arXiv / HAL stay as core OA rewrites, not playbooks. See
architecture § Grey literature for hosts
and symbol patterns. If you use the optional Docker image, put packs next to
config under /data (see Docker).
grey_playbooks_builtin = true
grey_playbooks_dir = "packs"
[[grey_playbooks]]
name = "my_org"
kind = "rewrite"
hosts = ["example.org"]
url_re = '(?i)example\\.org/docs/(?P<code>[a-z0-9]+)/?'
pdf_template = "https://example.org/docs/{code}/{code}.pdf"
LLM (optional, local-first)¶
Off by default. Install extras: uv sync --extra llm (LiteLLM for paid APIs),
uv sync --extra browser-agent (Python 3.11+ only, for the browser_agent run
lane and recover). Setup
walkthrough, model advice, Docker networking, and troubleshooting: LLM.
Table / key |
Default |
Role |
|---|---|---|
|
|
Master gate |
|
|
|
|
|
Model id |
|
|
Ollama API |
|
|
OpenAI-compatible base when |
|
|
Allow non-loopback Ollama (e.g. |
|
|
Per-completion timeout |
|
|
Cap on the Ollama context window for |
|
|
Grounded title proposals in |
|
|
|
|
|
A |
|
|
Or path to a custom prompt file (relative to the config file); its SHA is stamped in the note footer |
|
|
Budget for PDF text sent to the model (head + headings + tail) |
|
|
Zotero child-note tag; re-runs update the note carrying it |
|
|
|
|
|
Report prompt, or a path relative to the config file |
|
|
Budget for summary text in one model call (room left for the prompt) |
|
|
Base tag on the collection note. A second tag |
|
|
|
|
|
Per-completion timeout for the report |
|
|
Step and wall-clock caps for |
|
|
Tesseract languages for |
|
|
Seconds allowed per PDF |
|
|
With |
|
|
With |
|
|
With |
|
|
With |
|
|
When |
|
( |
Larger model for browsing only; |
API keys stay in the environment (never in config.toml).