@tricoteuses/senat 2.20.12 → 2.20.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/scripts/convert_data.js +36 -6
- package/package.json +1 -1
|
@@ -23,20 +23,50 @@ async function convertData() {
|
|
|
23
23
|
const enabledDatasets = getEnabledDatasets(options["categories"]);
|
|
24
24
|
console.time("data transformation time");
|
|
25
25
|
if (enabledDatasets & EnabledDatasets.Ameli) {
|
|
26
|
-
|
|
26
|
+
try {
|
|
27
|
+
await convertDatasetAmeli(dataDir, options);
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
console.error(`Error converting Ameli dataset:`, error);
|
|
31
|
+
}
|
|
27
32
|
}
|
|
28
33
|
if (enabledDatasets & EnabledDatasets.Debats) {
|
|
29
|
-
|
|
34
|
+
try {
|
|
35
|
+
await convertDatasetDebats(dataDir, options);
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
console.error(`Error converting Debats dataset:`, error);
|
|
39
|
+
}
|
|
30
40
|
}
|
|
31
41
|
if (enabledDatasets & EnabledDatasets.DosLeg) {
|
|
32
|
-
|
|
33
|
-
|
|
42
|
+
try {
|
|
43
|
+
await convertDatasetDosLeg(dataDir, options);
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
console.error(`Error converting DosLeg dataset:`, error);
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
await convertDatasetScrutins(dataDir, options);
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
console.error(`Error converting Scrutins dataset:`, error);
|
|
53
|
+
}
|
|
34
54
|
}
|
|
35
55
|
if (enabledDatasets & EnabledDatasets.Questions) {
|
|
36
|
-
|
|
56
|
+
try {
|
|
57
|
+
await convertDatasetQuestions(dataDir);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
console.error(`Error converting Questions dataset:`, error);
|
|
61
|
+
}
|
|
37
62
|
}
|
|
38
63
|
if (enabledDatasets & EnabledDatasets.Sens) {
|
|
39
|
-
|
|
64
|
+
try {
|
|
65
|
+
await convertDatasetSens(dataDir);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
console.error(`Error converting Sens dataset:`, error);
|
|
69
|
+
}
|
|
40
70
|
}
|
|
41
71
|
if (!options["silent"]) {
|
|
42
72
|
console.timeEnd("data transformation time");
|