# Example settings for scan-notes-md. Copy to # ~/.config/pdf-tools/scan-notes.toml and edit. Command-line flags override # these, and anything left out falls back to the built-in defaults. # Backend for scans outside confidential folders: "ollama" (default) or # "claude" (the Anthropic API; needs ANTHROPIC_API_KEY). backend = "ollama" # PDF render resolution. dpi = 200 # Names added to the Ollama prompt for every scan. Prefer per-folder lists # (below), which keep the prompt short and avoid steering unrelated scans. names = [] # Added to the Ollama prompt after the base instruction, for every scan. # Confidential folders can add their own prompt_extra as well. prompt_extra = """ The page may also contain drawings, arrows, and equations. Handle them this way: - In place of a drawing, sketch, plot, or diagram, write one line: [FIGURE: short description]. Name what is drawn, and include any axis labels, units, and words written on it. Do not interpret what it shows. - Write an arrow between words as -> (or <-, <->), keeping it on the line where it appears. If an arrow links items on different lines or points to something away from the text, write [ARROW: from -> to] on its own line. - Copy equations exactly as written, in plain text. Use Unicode for Greek letters and symbols (η, φ, ∂, ∝, ≈), ^ for superscripts, _ for subscripts, and / for fractions. Do not solve, simplify, or complete them. """ # Per-page token counts, timings, and GPU fit for Ollama runs (no transcript # text). Summarize with scan-notes-stats. Set to "" to turn off. stats_log = "~/.local/state/pdf-tools/scan-stats.jsonl" [ollama] timeout_s = 300 # per page probe_timeout_s = 2.5 # health check against /api/tags max_output_tokens = 2048 # per page; stops a looping model early (0 = no cap) # Hosts are tried in this order. A host is skipped (with one line of output) # if it is unreachable or does not have its model. [[ollama.hosts]] name = "remote" url = "http://gpu-workstation:11434" model = "gemma4:31b" # num_ctx = 8192 # optional; set if the model needs it to fit on the GPU [[ollama.hosts]] name = "local" url = "http://localhost:11434" model = "gemma4:e4b" # scan-notes-index: per-page search metadata (summary, key points, topics, # references, event, people) written from a scan and its transcript. [index] names = [] # added to the names above, for indexing only prompt_extra = "" kinds = ["calculation", "idea", "sketch", "talk notes", "meeting notes", "reading notes", "to-do", "other", "blank"] max_output_tokens = 1536 context_chars = 2000 # characters of the previous and next pages sent as context # --------------------------------------------------------------------------- # Confidential folders. None are built in. Scans under a listed root stay on # the Ollama hosts (Claude is refused without --allow-cloud) and are written # to a companion .md next to the scan. When folders are nested, the # deepest one applies. # --------------------------------------------------------------------------- # Simplest form: the basic companion (date, scan, subjects, one Notes section). [[confidential]] root = "~/Documents/personnel" names = [] # Full form: a board-service folder laid out as # /committees/// # /meetings// # chair// [[confidential]] root = "~/Documents/board-service" # Board members, staff, and organizations; used only for scans in this folder. names = [] [confidential.companion] type = "meeting-notes" # Front-matter fields read from the path, in this order after `date`. fields = ["body", "committee"] sections = ["Attendees", "Discussion", "Decisions", "Action items"] transcript_section = "Discussion" # Title placeholders: {date} (long form), {stem} (filename without its date), # {field} (display name from [confidential.titles], else the folder name in # words), {field.short} (the ".short" title, if any). title = "{body}, {date}" # Words kept in capitals when a folder name is turned into words. acronyms = ["ceo", "cfo", "llc"] [confidential.companion.section_text] "Action items" = "- [ ] Owner: task (due date)" # Optional: values a captured field may take. A rule whose capture is not # listed does not match, so the next rule is tried. [confidential.companion.allowed] body = ["BOD", "BOM"] # Rules are tried in order; the first match sets the fields. "{name}" captures # one folder, a literal must match exactly, and a trailing "**" matches any # remaining folders. `set` gives fixed values; `title` overrides the title. [[confidential.companion.paths]] match = "{body}/committees/{committee}/**" title = "{body.short} {committee}, {date}" [[confidential.companion.paths]] match = "{body}/meetings/**" set = { committee = "board" } [[confidential.companion.paths]] match = "chair/{committee}/**" set = { body = "chair" } title = "{committee}, {date}" [[confidential.companion.paths]] match = "{body}/{committee}/**" title = "{body.short} {committee}, {date}" [[confidential.companion.paths]] match = "{body}/**" [confidential.titles] "BOD" = "Board of Directors" "BOD.short" = "Board" "BOM" = "Board of Managers" "BOM.short" = "Managers" "finance-audit" = "Finance and Audit Committee"