@tricoteuses/senat 3.1.14 → 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) {
|
|
@@ -18,8 +18,6 @@ const optionsDefinitions = [...commonOptions];
|
|
|
18
18
|
const options = commandLineArgs(optionsDefinitions);
|
|
19
19
|
let exitCode = 10; // 0: some data changed, 10: no modification
|
|
20
20
|
function shouldSkipAgenda(agenda) {
|
|
21
|
-
if (!agenda.captationVideo)
|
|
22
|
-
return true;
|
|
23
21
|
if (!agenda.date || !agenda.startTime)
|
|
24
22
|
return true;
|
|
25
23
|
if (agenda.uid.endsWith("Bis"))
|
|
@@ -170,8 +168,8 @@ async function processAll(dataDir, sessions) {
|
|
|
170
168
|
}
|
|
171
169
|
}
|
|
172
170
|
}
|
|
173
|
-
const
|
|
174
|
-
commitAndPushGit(
|
|
171
|
+
const agendaDir = path.join(dataDir, AGENDA_FOLDER);
|
|
172
|
+
commitAndPushGit(agendaDir, options);
|
|
175
173
|
}
|
|
176
174
|
function commitAndPushGit(datasetDir, options) {
|
|
177
175
|
if (options.commit) {
|
package/lib/src/videos/match.js
CHANGED
|
@@ -16,7 +16,10 @@ export async function matchOneReunion(args) {
|
|
|
16
16
|
const titleDominance = weights.titleDominance ?? 0;
|
|
17
17
|
const orgUncertainPenalty = weights.orgUncertainPenalty ?? 1; // 1 disables
|
|
18
18
|
const orgSkipDice = weights.orgSkipDice ?? 0;
|
|
19
|
-
|
|
19
|
+
let minAccept = minAcceptBase + (candidates.length >= 20 ? 0.08 : candidates.length >= 10 ? 0.05 : 0);
|
|
20
|
+
if (!agenda.captationVideo) {
|
|
21
|
+
minAccept = 0.9;
|
|
22
|
+
}
|
|
20
23
|
const vw = weights
|
|
21
24
|
? {
|
|
22
25
|
wTitle: weights.wTitle,
|