Skip to content

nqdrpt(3)

nqdrpt — a report of a capsule and its data record

libnqd, -lnqd -lnoqtis

#include <nqd.h>

#define NQDMD 1
#define NQDTXT 2

int
nqdrpt(const char *dir, const nqrep *crep, const nqdrep *drep, int fmt, char *out, size_t cap, size_t *outlen);

() writes a report of the capsule in dir to out (cap bytes, a NUL added), in Markdown (NQDMD) or plain text (NQDTXT): a line saying whether every check passed and how many of how many failed; the rows of crep, the capsule's check (nqchk(3)), or, when crep is NULL (a folder not sealed), a line saying so, which counts as a failed check; then a section on the data record (noqtis-data(5)): its sources, schemas, drift summaries (and whether they are calibrated), environment, steps, recorded checks, commitments and citation, and the rows of drep (nqdchk(3)), each named ‘data.check’; with drep NULL, () is run here. A folder without a record has no data rows.

A value of the record never breaks its line or its table cell: a line break or other control character in it is a space, and in Markdown each character Markdown could read as markup (‘\ ` * _ [ ] < > | # ~ & !’) gets one backslash before it, once.

NQOK; NQEBUF with *outlen set to the report's length when cap is too small; NQEARG for a dir of NULL or another fmt; NQEMEM. A record that does not read is a failed ‘data.record’ row, not an error.

noqtis-report(1), nqchk(3), nqdchk(3), noqtis-data(5)