Tutorial 5: Operations and troubleshooting
This tutorial summarizes daily usage patterns and common CLI issues.
0) Start with --help
Run these commands first when behavior is unclear or when you need exact flag names:
adsfolio --help
adsfolio set --help
adsfolio search --help
adsfolio export --help
adsfolio library --help
adsfolio pdf --help
adsfolio pdf upgrade --help
adsfolio cv --help
Check these options first:
Command |
Option |
What it clarifies |
|---|---|---|
|
|
Query scope and output format |
|
|
Export style and journal naming behavior |
|
|
Polling behavior and output composition |
|
|
Optional non-OCR routing before identify |
|
|
Filename rendering, optional ADS identify, and unresolved routing |
|
|
Identification scope, unresolved routing, AI roundtrip input, parser diagnostics |
|
|
Publication-cache management |
|
|
Real-time ingestion and background upgrade cadence |
|
|
Upgrade safety and annotation transfer behavior |
|
|
CV output rendering options |
1) Configuration commands
adsfolio config show
adsfolio rate-limit
adsfolio set
Set or rotate token:
adsfolio config set-token <new-token>
Refresh identify profile (ORCID/names/year window) and publication cache:
adsfolio set
adsfolio set is usually a one-time setup. Re-run it only when token/profile values change.
2) Daily command map
Task |
Command |
|---|---|
Find papers |
|
Export selected bibcodes |
|
Inspect libraries |
|
Keep a library bib up to date |
|
Route likely non-OCR PDFs (optional) |
|
Identify PDFs on disk |
|
Inspect publication cache |
|
Export a library’s catalog records |
|
Preview PDF rename plan |
|
Apply PDF rename plan |
|
Watch folder for new PDFs |
|
Upgrade arXiv PDFs |
|
Generate CV output |
|
3) Common issues
Authentication errors
Symptom: command fails with auth error.
Check:
adsfolio config show.Fix: set token again with
adsfolio config set-tokenor exportADS_API_TOKEN.
PDF rename changed nothing
Symptom:
adsfolio pdf renameoutputs “No files to rename.”Check: run
adsfolio pdf identify <dir> --recursivefirst to populate the catalog.
pdf identify does not use the cache
Symptom: identify is slow even though you ran it recently.
Cause: resolved PDFs with unchanged content reuse catalog metadata. Unresolved or changed PDFs still need identification. Matching also uses the publication cache and the library’s cached ADS documents. These are separate from PDF resolution status.
Fix:
run
adsfolio pdf status <dir> --recursiveto inspect the library’s recordscheck the central
pdf-library.sqliteunderConfig.get_config_dir()(~/Library/Application Support/adsfolioon macOS). New libraries do not create.adsfolio-pdfs.sqliteat the scan rootrun
adsfolio cache statusandadsfolio cache refreshif the publication cache is missingrerun
adsfolio pdf identify <dir> --recursiveto reconcile externally renamed files by content hash and identify pending files
Identify cannot verify a first-page title
Identify collects heading candidates from first-page typography instead of sending the entire page as a title. It uses transformed font sizes and excludes fontless form aggregates that duplicate the page text. It retains sentence candidates when a heading shares a line with its authors.
ADS must return a unique matching title after case and punctuation normalization. Conflicting matches leave the file unresolved. Queries share a cache and are batched. Oversized batches split into smaller queries rather than dropping the file. A single oversized candidate is still reported with its file path.
Typography is a heuristic: uniform-font OCR, titles split across font sizes, and poor text layers can still fail. The text-boundary fallback recognizes parenthesized submission dates but cannot reliably separate every title from its authors. Metadata DOI and metadata title strategies run before first-page titles in the default order.
To fix a remaining unresolved file, select it. Then use Update by ID… with a verified DOI, arXiv ID, or Bibcode. From the CLI:
adsfolio pdf refresh-ads <dir> --identifier 10.1051/0004-6361/201834764 \
--relative-path <path-of-pdf-inside-dir>
Check the identifier against the paper. The eyepiece article by F. E. Wright
uses DOI 10.1364/JOSA.24.000206 and Bibcode 1934JOSA...24..206W.
PDFs exist in subdirectories but are absent from the GUI
The GUI displays catalog records. A new root discovers only top-level PDFs by default. Refresh/F5 scans the selected root using its current recursion setting.
Change the root settings:
Right-click the root under LIBRARIES.
If Watch Current Library is checked, disable it.
Reopen that context menu.
Enable Include Subdirectories.
Rescan and list the records:
Press Refresh/F5.
Select All.
Clear the search field.
The recursive scan restores nested locations marked missing and discovers new
PDFs. Top-level scans leave nested records unchanged. Needs identification
filters current identification evidence. It does not list the unresolved/ directory. See the
GUI guide for the distinction between root scope and Identify settings.
A stored bibcode appears under Needs identification
A saved bibcode and a linked ADS record are separate catalog facts. Current verified identities without ADS links appear under Identified without ADS. Use ADS Refresh → Look Up Stored Bibcodes… to link pending records. The equivalent command is:
adsfolio pdf refresh-ads /path/to/library --all --no-rename --pending-only
The command uses cached ADS records first and queries missing records in batches. It fills empty fields while retaining metadata, locks, file paths, and history. A missing ADS result does not erase the stored bibcode. Files with stale metadata or mismatched digests need Identify instead.
pdf identify warns about large query batch
Symptom: command asks you to approve ADS fallback queries for many unmatched files.
Cause: cache/profile matching left many files unresolved.
Fix, before you run identify:
use
adsfolio setand verify ORCID/year windowrun
adsfolio pdf ocrfirst if many files are scanned/non-OCR
Fix, when you run identify:
run identify and only approve fallback when needed
use unresolved AI roundtrip (
unresolved.csv-> AI CSV ->--ai-csv)rerun
adsfolio pdf identify <dir> --recursive --allow-adsafter improving OCR or supplying AI hintsrun
adsfolio pdf status <dir>to verify identified records
CV init fails with PyYAML error
Symptom:
adsfolio cv initexits with a PyYAML import error.Fix: reinstall the package in the environment running the command. PyYAML is a required dependency of the base package. The
fullextra is unnecessary.
4) Safe execution pattern
For destructive workflows, use this sequence:
Run the dry-run command first.
Inspect the output.
Rerun with
--apply.
This is especially important for:
adsfolio pdf renameadsfolio pdf identify --output-unresolvedadsfolio pdf push-libraryadsfolio pdf upgrade