pub fn export_html_dataset(
connection: &mut PgConnection,
corpus: &Corpus,
service: &Service,
severities: &[TaskStatus],
group_by: GroupBy,
max_archive_mb: Option<u64>,
out_dir: &PathBuf,
progress: impl FnMut(&str),
) -> Result<DatasetExportOutcome, String>Expand description
Export a corpus/service’s converted HTML into ZIP archives bucketed by GroupBy.
Reads existing result archives off the shared filesystem (no conversion is run); the DB is only
queried for the matching task entry paths. progress is called with human-readable milestone
lines (the CLI prints them; a future web/job caller can stream them). Resumable: an archive
whose .zip already exists in out_dir is left untouched (matching the scripts’ resume
behaviour).
Severities are taken in the given order; the canonical TaskStatus::to_key spelling is used
throughout (no no-problem/no_problem ambiguity).