Spooled files into documents, for IBM i.

Open output management.

Spooldoc turns IBM i spooled files into documents. It watches your output queues and reads each spooled file into JSON with a definition you write in YAML. Templates in HTML, Word or Excel make PDF, HTML, DOCX or XLSX files, delivered to a download or a folder in the IFS. The agent proposes the first definition and template from a sample; you check every value next to the page. Nothing is installed on the IBM i.

Quick start, with Docker

git clone https://github.com/Strom-Capital/spooldoc.git && cd spooldoc
printf 'BETTER_AUTH_SECRET=%s\nSPOOLDOC_SECRET_KEY=%s\n' "$(openssl rand -base64 32)" "$(openssl rand -base64 32)" > .env
docker compose up -d

Then open http://localhost:3000 and create the first account. See Getting started for the first job.

The job builder: the sample invoice page with every extracted field highlighted, the YAML definition beside it, and the agent panel on the rightThe job builder: the sample invoice page with every extracted field highlighted, the YAML definition beside it, and the agent panel on the right

Programs print as they always have

Your programs on the IBM i (AS/400, iSeries) print to output queues, unchanged. Spooldoc connects through jt400 and runs a job for every new spooled file, by polling or in real time through a data queue. A run reads the file, extracts the page groups, makes a document of each with every template, delivers the files, then holds, moves, deletes or leaves the spooled file. Nothing is installed on the IBM i.

Architecture: programs on the IBM i print to an output queue, optionally with a data queue; Spooldoc's watcher picks up new spooled files by polling or in real time, and a run captures, extracts, renders, delivers and finishes each one; the job builder and the agent write to the same Postgres database; delivered files go to a destinationArchitecture: programs on the IBM i print to an output queue, optionally with a data queue; Spooldoc's watcher picks up new spooled files by polling or in real time, and a run captures, extracts, renders, delivers and finishes each one; the job builder and the agent write to the same Postgres database; delivered files go to a destination

From a sample page to a delivered document

The Home page: counts of servers, output queues, jobs and runs, and a chart of runs per day by statusThe Home page: counts of servers, output queues, jobs and runs, and a chart of runs per day by status

Home

Servers, output queues, jobs and runs at a glance, with a chart of runs per day.

The job builder with the extract step open: six pipeline steps across the top, the sample page with field hits highlighted on the left and the definition editor on the rightThe job builder with the extract step open: six pipeline steps across the top, the sample page with field hits highlighted on the left and the definition editor on the right

Job builder

The sample page with every field it found highlighted, next to the YAML that found it.

The render step of a job with two templates: the template's HTML in an editor on the left and the rendered invoice preview on the rightThe render step of a job with two templates: the template's HTML in an editor on the left and the rendered invoice preview on the right

Templates

An HTML template beside the document it makes, rendered by Carbone as you edit.

A run opened from the job log: status, the spooled file, the five steps with their timings, and the five delivered PDFsA run opened from the job log: status, the spooled file, the five steps with their timings, and the five delivered PDFs

Job log

Every run with its steps, their timings and the files it delivered.