@tricoteuses/senat 3.1.15 → 3.1.16
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs, { ensureDir } from "fs-extra";
|
|
2
2
|
import path from "path";
|
|
3
3
|
import * as cheerio from "cheerio";
|
|
4
|
-
import { COMMISSION_FOLDER, DATA_ORIGINAL_FOLDER, DATA_TRANSFORMED_FOLDER } from "../server/loaders.js";
|
|
4
|
+
import { AGENDA_FOLDER, COMMISSION_FOLDER, DATA_ORIGINAL_FOLDER, DATA_TRANSFORMED_FOLDER } from "../server/loaders.js";
|
|
5
5
|
import { loadAgendaForDate, parseCommissionMetadataFromHtml, linkCRtoCommissionGroup } from "../utils/cr_spliting.js";
|
|
6
6
|
import { cleanTitle, extractDayH3Sections, parseCommissionCRSectionFromDom } from "../server/commission.js";
|
|
7
7
|
import commandLineArgs from "command-line-args";
|
|
@@ -360,7 +360,9 @@ async function retrieveCommissionCRs(options = {}) {
|
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
const debatsDir = path.join(dataDir, COMMISSION_FOLDER);
|
|
363
|
+
const agendaDir = path.join(dataDir, AGENDA_FOLDER);
|
|
363
364
|
commitAndPushGit(debatsDir, options);
|
|
365
|
+
commitAndPushGit(agendaDir, options);
|
|
364
366
|
}
|
|
365
367
|
async function main() {
|
|
366
368
|
assertExistingDirectory(options["dataDir"], "data directory");
|
|
@@ -206,7 +206,9 @@ export async function retrieveCriXmlDump(dataDir, options = {}) {
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
const debatsDir = path.join(dataDir, COMPTES_RENDUS_FOLDER);
|
|
209
|
+
const agendaDir = path.join(dataDir, AGENDA_FOLDER);
|
|
209
210
|
commitAndPushGit(debatsDir, options);
|
|
211
|
+
commitAndPushGit(agendaDir, options);
|
|
210
212
|
}
|
|
211
213
|
function commitAndPushGit(datasetDir, options) {
|
|
212
214
|
if (options.commit) {
|
|
@@ -168,8 +168,8 @@ async function processAll(dataDir, sessions) {
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
const
|
|
172
|
-
commitAndPushGit(
|
|
171
|
+
const agendaDir = path.join(dataDir, AGENDA_FOLDER);
|
|
172
|
+
commitAndPushGit(agendaDir, options);
|
|
173
173
|
}
|
|
174
174
|
function commitAndPushGit(datasetDir, options) {
|
|
175
175
|
if (options.commit) {
|