Skip to main content

Classify Post Pdf

@zts/classify-post-pdfv2026.11.03.1· MIT· 1d agoBEHAVIORSWORKFLOWSACCEPTED WARNINGS
01README

Read the key details off a scanned letter (PDF): sender, date, recipient and address, document type (bill, statement, invoice, reminder, notice or other), reference numbers and other facts. scan renders the top of a page in-process with PDFium (WebAssembly) and has an installed @zts/qianfan-ocr behavior read it, all on this machine. scanBatch reads many letters with one load of the model; listPdfs and the scan-mail workflow read a whole directory of post with it.

02Behaviors1
@zts/classify-post-pdfv2026.11.03.1classify_post_pdf.ts

Global Arguments

ArgumentTypeDescription
ocrBehavior?stringName of the @zts/qianfan-ocr behavior that reads the image; create and install it first
fn listPdfs(directory: string, run?: string)
List the PDFs in a directory (not recursive), sorted, with the names their scans take
ArgumentTypeDescription
directorystringDirectory of PDFs; absolute, or relative to the repository
run?stringName the list pdf-list-<run>, so concurrent workflow runs keep their own lists
fn scan(pdfPath: string)
Read sender, date, recipient, document type and references off the top of a letter with qianfan-ocr
ArgumentTypeDescription
pdfPathstringPDF of a scanned letter; absolute, or relative to the repository
fn scanBatch(pdfPaths?: array, list?: string)
Read many letters with one load of the OCR model, from a list of PDFs or a listPdfs list
ArgumentTypeDescription
pdfPaths?arrayPDFs of scanned letters; absolute, or relative to the repository
list?stringRead the PDFs listPdfs listed: the run it was given, or the list's full name (pdf-list when it had no run)

Resources

details(infinite)— Key details read from the top of a scanned letter
pdfList(7d)— PDFs found in a directory, for a workflow to scan
scanBatch(7d)— One scanBatch: each letter's outcome and the details record it wrote

Files

header(image/png)— The rendered region of the letter that was read
03Workflows1
@zts/classify-post-pdf/scan-mail6b0f3c52-8f1e-4c47-9a3d-2e5b7c1d9f40

Read the key details off every scanned letter (PDF) in a directory with @zts/classify-post-pdf, loading the OCR model once for the whole directory. The run shows one scan step, not progress letter by letter; the scan-batch record says how each letter went. A letter that cannot be read does not fail the run, but a helper crash part way does, keeping what was read. Needs an installed @zts/qianfan-ocr 2026.11.03.1 or later; see the extension's README.

listFind the PDFs to scan
1.list-pdfs
scanRead every listed letter with one model load
1.scan-batch— Read the letters
04Previous Versions1
2026.11.02.1MIT
05Stats
A
100 / 100
Downloads
0
Archive size
3.0 MB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Docs keep secrets in a vault1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License2/2earned
  • Verified public repository2/2earned

07Platforms
08Labels