|
| 1 | +# Reports and Manifests |
| 2 | + |
| 3 | +PaperFetch.jl reports are the main output of a check. They are designed to |
| 4 | +support review, not automatic editing: the input `.bib` file is never rewritten. |
| 5 | + |
| 6 | +## Check Reports |
| 7 | + |
| 8 | +`check` mode writes two files: |
| 9 | + |
| 10 | +- a Markdown report for direct human review; |
| 11 | +- an INC report for spreadsheets and downstream tooling. |
| 12 | + |
| 13 | +From the command line, report names default to the input file stem: |
| 14 | + |
| 15 | +```bash |
| 16 | +julia --project=. -e 'using PaperFetch; PaperFetch.main()' -- \ |
| 17 | + check examples/01_exact_article.bib \ |
| 18 | + --fixture examples/metadata_fixture.json \ |
| 19 | + --outdir paperfetch_out |
| 20 | +``` |
| 21 | + |
| 22 | +This writes `paperfetch_out/01_exact_article.md` and |
| 23 | +`paperfetch_out/01_exact_article.inc`. Use `--report-basename NAME` to choose a |
| 24 | +different basename. |
| 25 | + |
| 26 | +Direct Julia API calls use `paperfetch_report` unless `basename` is supplied: |
| 27 | + |
| 28 | +```julia |
| 29 | +paths = write_reports(reports, "paperfetch_out"; basename="references") |
| 30 | +``` |
| 31 | + |
| 32 | +## Markdown Report Layout |
| 33 | + |
| 34 | +Each entry section starts with the original BibTeX key. Keys are preserved as |
| 35 | +written, including underscores and punctuation. |
| 36 | + |
| 37 | +Each entry then has a general-flags table for entry-level review signals: |
| 38 | + |
| 39 | +- whether source metadata was found; |
| 40 | +- whether providers returned errors; |
| 41 | +- whether required fields are present; |
| 42 | +- whether any field comparisons were possible; |
| 43 | +- whether PDF candidates were discovered; |
| 44 | +- the confidence score. |
| 45 | + |
| 46 | +Field-level details are shown in a separate comparison table. The `Flag` column |
| 47 | +summarizes each field as green, amber, red, or ignored. This avoids repeating a |
| 48 | +full checklist while keeping the signal close to the field value being reviewed. |
| 49 | + |
| 50 | +## Required And Supplementary Fields |
| 51 | + |
| 52 | +Required fields depend on the BibTeX entry type. For example: |
| 53 | + |
| 54 | +- `@article` expects `author`, `title`, `journal`, and `year`; |
| 55 | +- `@inproceedings` expects `author`, `title`, `booktitle`, and `year`; |
| 56 | +- `@book` accepts either `author` or `editor`, plus `title`, `publisher`, and |
| 57 | + `year`; |
| 58 | +- `@inbook` and `@incollection` accept either `author` or `editor` and compare |
| 59 | + their container title as `booktitle`. |
| 60 | + |
| 61 | +Supplementary fields such as `doi`, `url`, `pages`, `volume`, `number`, `isbn`, |
| 62 | +and `edition` still appear in comparisons when present or when source metadata |
| 63 | +reports them, but their absence is usually marked amber rather than red. |
| 64 | + |
| 65 | +Common bibliography-manager fields such as `abstract`, `keywords`, `file`, |
| 66 | +`timestamp`, and similar local metadata are treated as ignored for reference-list |
| 67 | +validation. |
| 68 | + |
| 69 | +## Normalization |
| 70 | + |
| 71 | +Comparison is intentionally tolerant but explicit. Titles are normalized before |
| 72 | +comparison and before title-based search: braces, TeX-style quotes, common LaTeX |
| 73 | +formatting commands, accents, punctuation, case, and whitespace are normalized. |
| 74 | + |
| 75 | +Author and editor lists use the same name-normalization logic. Full names can |
| 76 | +match initials, accents are normalized, and `et al.` is treated as a review flag |
| 77 | +rather than an automatic conflict. Reordered creator lists are marked ambiguous |
| 78 | +because author order is often meaningful. |
| 79 | + |
| 80 | +DOIs are stricter. Bare DOI strings, `doi:` prefixes, `doi.org` URLs, and |
| 81 | +`dx.doi.org` URLs are canonicalized to the same DOI, but a different DOI remains |
| 82 | +a conflict. |
| 83 | + |
| 84 | +URLs are compared after canonicalizing hosts and DOI resolver links. URLs found |
| 85 | +inside `note` or `howpublished`, including LaTeX `\url{...}` macros, can be used |
| 86 | +as a fallback for a missing `url` field. |
| 87 | + |
| 88 | +## Fetch Manifests |
| 89 | + |
| 90 | +`fetch` mode first performs the same check workflow and then attempts only |
| 91 | +explicit PDF candidate URLs from source metadata: |
| 92 | + |
| 93 | +```bash |
| 94 | +julia --project=. -e 'using PaperFetch; PaperFetch.main()' -- \ |
| 95 | + fetch references.bib \ |
| 96 | + --email your.email@example.edu \ |
| 97 | + --use-apis \ |
| 98 | + --cache-dir .paperfetch_cache \ |
| 99 | + --outdir paperfetch_out |
| 100 | +``` |
| 101 | + |
| 102 | +Fetch mode writes: |
| 103 | + |
| 104 | +- the normal Markdown and INC check reports; |
| 105 | +- `manifest.md`, a human-readable table of fetch outcomes; |
| 106 | +- `manifest.inc`, a spreadsheet/tooling manifest; |
| 107 | +- downloaded PDF files when a candidate URL succeeds. |
| 108 | + |
| 109 | +The manifest records the BibTeX key, a compact reference title, fetch status, |
| 110 | +local file path, source URL, and a short diagnostic. Entries with no PDF |
| 111 | +candidate are recorded as `skipped`; this is normal for websites, datasets, |
| 112 | +books, landing-page-only records, and many paywalled articles. |
| 113 | + |
| 114 | +Failed PDF candidates include diagnostics such as HTTP status, non-PDF content |
| 115 | +types, likely landing/login/paywall pages, or missing remote files. |
0 commit comments