mirror of
https://github.com/kmitresse/Compo-Service-Log-Project.git
synced 2026-05-13 17:11:49 +00:00
feat: Stream download, extract and parse datasets
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { Data, NudgerData } from "../data";
|
||||
import { ArchiveType } from "../archive";
|
||||
import { Dataset, DatasetType } from "./";
|
||||
|
||||
class DatasetCollection {
|
||||
static datasets: Dataset<Data>[] = [
|
||||
new Dataset<NudgerData>(
|
||||
"https://files.opendatarchives.fr/data.cquest.org/open4goods/gtin-open-data.zip",
|
||||
"open4goods-full-gtin-dataset.csv",
|
||||
ArchiveType.ZIP,
|
||||
DatasetType.CSV,
|
||||
),
|
||||
];
|
||||
|
||||
public static loadAll(): Promise<void[]> {
|
||||
return Promise.all(this.datasets.map((dataset) => dataset.load()));
|
||||
}
|
||||
}
|
||||
|
||||
export default DatasetCollection;
|
||||
Reference in New Issue
Block a user