@tricoteuses/assemblee 2.5.1 → 2.5.2
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/loaders.js +386 -386
- package/lib/schemas/debats.json +1 -1
- package/package.json +1 -1
package/lib/loaders.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import q from "node:assert";
|
|
2
|
+
import n from "fs-extra";
|
|
3
|
+
import i from "node:path";
|
|
4
4
|
import "node:crypto";
|
|
5
|
-
import { L as
|
|
5
|
+
import { L as a, a1 as C, a2 as M, a3 as R, a4 as Z, a5 as B, a6 as J, Y, $ as G, a0 as K, X as ee, Z as te, _ as se } from "./uids-DaRrTkI-.js";
|
|
6
6
|
import { w as P } from "./file_systems-CzTtoLWb.js";
|
|
7
|
-
import { C as
|
|
7
|
+
import { C as N } from "./amendements-40Z7OJLT.js";
|
|
8
8
|
var I = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.ActeursEtOrganes = 1] = "ActeursEtOrganes", t[t.Agendas = 2] = "Agendas", t[t.Amendements = 4] = "Amendements", t[t.DossiersLegislatifs = 8] = "DossiersLegislatifs", t[t.Photos = 16] = "Photos", t[t.Scrutins = 32] = "Scrutins", t[t.Questions = 64] = "Questions", t[t.ComptesRendusSeances = 128] = "ComptesRendusSeances", t[t.All = 255] = "All", t))(I || {});
|
|
9
|
-
function
|
|
10
|
-
const e =
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
async function h(t, s) {
|
|
10
|
+
const e = i.join(s, t.filename);
|
|
11
|
+
await n.pathExists(e) && await n.remove(e), await n.pathExists(i.join(s, `${t.filename}.temp`, "json")) ? await n.move(
|
|
12
|
+
i.join(s, `${t.filename}.temp`, "json"),
|
|
13
13
|
e
|
|
14
|
-
) :
|
|
14
|
+
) : await n.mkdir(e);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const A = {
|
|
17
17
|
acteursEtOrganes: [
|
|
18
18
|
{
|
|
19
19
|
// AMO10 (XVII)
|
|
@@ -38,8 +38,8 @@ const S = {
|
|
|
38
38
|
// Il n'apporte donc absolument rien par rapport à AMO20 ou l'AMO30.
|
|
39
39
|
filename: "AMO10_deputes_actifs_mandats_actifs_organes_XVII.json",
|
|
40
40
|
ignoreForWeb: !0,
|
|
41
|
-
legislature:
|
|
42
|
-
repairZip:
|
|
41
|
+
legislature: a.DixSept,
|
|
42
|
+
repairZip: h,
|
|
43
43
|
structure: 1,
|
|
44
44
|
title: "Députés actifs et organes de la XVIIème législature",
|
|
45
45
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/17/amo/deputes_actifs_mandats_actifs_organes/AMO10_deputes_actifs_mandats_actifs_organes.json.zip"
|
|
@@ -67,8 +67,8 @@ const S = {
|
|
|
67
67
|
// Il n'apporte donc absolument rien par rapport à AMO20 ou l'AMO30.
|
|
68
68
|
filename: "AMO10_deputes_actifs_mandats_actifs_organes_XVI.json",
|
|
69
69
|
ignoreForWeb: !0,
|
|
70
|
-
legislature:
|
|
71
|
-
repairZip:
|
|
70
|
+
legislature: a.Seize,
|
|
71
|
+
repairZip: h,
|
|
72
72
|
structure: 1,
|
|
73
73
|
title: "Députés actifs et organes de la XVIème législature",
|
|
74
74
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/16/amo/deputes_actifs_mandats_actifs_organes/AMO10_deputes_actifs_mandats_actifs_organes.json.zip"
|
|
@@ -96,8 +96,8 @@ const S = {
|
|
|
96
96
|
// Il n'apporte donc absolument rien par rapport à AMO20 ou l'AMO30.
|
|
97
97
|
filename: "AMO10_deputes_actifs_mandats_actifs_organes_XV.json",
|
|
98
98
|
ignoreForWeb: !0,
|
|
99
|
-
legislature:
|
|
100
|
-
repairZip:
|
|
99
|
+
legislature: a.Quinze,
|
|
100
|
+
repairZip: h,
|
|
101
101
|
structure: 1,
|
|
102
102
|
title: "Députés actifs et organes de la XVème législature",
|
|
103
103
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/15/amo/deputes_actifs_mandats_actifs_organes/AMO10_deputes_actifs_mandats_actifs_organes_XV.json.zip"
|
|
@@ -125,8 +125,8 @@ const S = {
|
|
|
125
125
|
// Il n'apporte donc absolument rien par rapport à l'AMO30.
|
|
126
126
|
filename: "AMO20_dep_sen_min_tous_mandats_et_organes_XVII.json",
|
|
127
127
|
ignoreForWeb: !0,
|
|
128
|
-
legislature:
|
|
129
|
-
repairZip:
|
|
128
|
+
legislature: a.DixSept,
|
|
129
|
+
repairZip: h,
|
|
130
130
|
structure: 1,
|
|
131
131
|
title: "Acteurs et organes de la XVIIème législature",
|
|
132
132
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/17/amo/deputes_senateurs_ministres_legislature/AMO20_dep_sen_min_tous_mandats_et_organes.json.zip"
|
|
@@ -154,8 +154,8 @@ const S = {
|
|
|
154
154
|
// Il n'apporte donc absolument rien par rapport à l'AMO30.
|
|
155
155
|
filename: "AMO20_dep_sen_min_tous_mandats_et_organes_XVI.json",
|
|
156
156
|
ignoreForWeb: !0,
|
|
157
|
-
legislature:
|
|
158
|
-
repairZip:
|
|
157
|
+
legislature: a.Seize,
|
|
158
|
+
repairZip: h,
|
|
159
159
|
structure: 1,
|
|
160
160
|
title: "Acteurs et organes de la XVIème législature",
|
|
161
161
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/16/amo/deputes_senateurs_ministres_legislature/AMO20_dep_sen_min_tous_mandats_et_organes.json.zip"
|
|
@@ -183,8 +183,8 @@ const S = {
|
|
|
183
183
|
// Il n'apporte donc absolument rien par rapport à l'AMO30.
|
|
184
184
|
filename: "AMO20_dep_sen_min_tous_mandats_et_organes_XV.json",
|
|
185
185
|
ignoreForWeb: !0,
|
|
186
|
-
legislature:
|
|
187
|
-
repairZip:
|
|
186
|
+
legislature: a.Quinze,
|
|
187
|
+
repairZip: h,
|
|
188
188
|
structure: 1,
|
|
189
189
|
title: "Acteurs et organes de la XVème législature",
|
|
190
190
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/15/amo/deputes_senateurs_ministres_legislature/AMO20_dep_sen_min_tous_mandats_et_organes_XV.json.zip"
|
|
@@ -202,7 +202,7 @@ const S = {
|
|
|
202
202
|
// Il n'apporte donc quasiment rien par rapport à l'AMO30.
|
|
203
203
|
filename: "AMO20_dep_sen_min_tous_mandats_et_organes_XIV.json",
|
|
204
204
|
ignoreForWeb: !0,
|
|
205
|
-
legislature:
|
|
205
|
+
legislature: a.Quatorze,
|
|
206
206
|
structure: 0,
|
|
207
207
|
title: "Acteurs et organes de la XIVème législature",
|
|
208
208
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/14/amo/deputes_senateurs_ministres_legislatures_XIV/AMO20_dep_sen_min_tous_mandats_et_organes_XIV.json.zip"
|
|
@@ -213,8 +213,8 @@ const S = {
|
|
|
213
213
|
// Ce fichier contient tous les acteurs et organes.
|
|
214
214
|
// C'est un sur-ensemble des fichiers AMO20.
|
|
215
215
|
filename: "AMO30_tous_acteurs_tous_mandats_tous_organes_historique.json",
|
|
216
|
-
legislature:
|
|
217
|
-
repairZip:
|
|
216
|
+
legislature: a.All,
|
|
217
|
+
repairZip: h,
|
|
218
218
|
structure: 1,
|
|
219
219
|
title: "Historique de tous les acteurs et organes depuis la XIème législature",
|
|
220
220
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/17/amo/tous_acteurs_mandats_organes_xi_legislature/AMO30_tous_acteurs_tous_mandats_tous_organes_historique.json.zip"
|
|
@@ -278,17 +278,17 @@ const S = {
|
|
|
278
278
|
// précédentes.
|
|
279
279
|
filename: "AMO40_deputes_actifs_mandats_actifs_organes_divises_XVII.json",
|
|
280
280
|
ignoreForWeb: !0,
|
|
281
|
-
legislature:
|
|
282
|
-
repairZip: (t, s) => {
|
|
283
|
-
const e =
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
) &&
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
),
|
|
290
|
-
|
|
291
|
-
|
|
281
|
+
legislature: a.DixSept,
|
|
282
|
+
repairZip: async (t, s) => {
|
|
283
|
+
const e = i.join(s, t.filename);
|
|
284
|
+
await n.pathExists(e) && await n.remove(e), await n.mkdir(e), await n.pathExists(
|
|
285
|
+
i.join(s, `${t.filename}.temp`, "acteur")
|
|
286
|
+
) && await n.move(
|
|
287
|
+
i.join(s, `${t.filename}.temp`, "acteur"),
|
|
288
|
+
i.join(e, "acteur")
|
|
289
|
+
), await n.move(
|
|
290
|
+
i.join(s, `${t.filename}.temp`, "organe"),
|
|
291
|
+
i.join(e, "organe")
|
|
292
292
|
);
|
|
293
293
|
},
|
|
294
294
|
structure: 1,
|
|
@@ -322,17 +322,17 @@ const S = {
|
|
|
322
322
|
// précédentes.
|
|
323
323
|
filename: "AMO40_deputes_actifs_mandats_actifs_organes_divises_XVI.json",
|
|
324
324
|
ignoreForWeb: !0,
|
|
325
|
-
legislature:
|
|
326
|
-
repairZip: (t, s) => {
|
|
327
|
-
const e =
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
) &&
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
),
|
|
334
|
-
|
|
335
|
-
|
|
325
|
+
legislature: a.Seize,
|
|
326
|
+
repairZip: async (t, s) => {
|
|
327
|
+
const e = i.join(s, t.filename);
|
|
328
|
+
await n.pathExists(e) && await n.remove(e), await n.mkdir(e), await n.pathExists(
|
|
329
|
+
i.join(s, `${t.filename}.temp`, "acteur")
|
|
330
|
+
) && await n.move(
|
|
331
|
+
i.join(s, `${t.filename}.temp`, "acteur"),
|
|
332
|
+
i.join(e, "acteur")
|
|
333
|
+
), await n.move(
|
|
334
|
+
i.join(s, `${t.filename}.temp`, "organe"),
|
|
335
|
+
i.join(e, "organe")
|
|
336
336
|
);
|
|
337
337
|
},
|
|
338
338
|
structure: 1,
|
|
@@ -366,15 +366,15 @@ const S = {
|
|
|
366
366
|
// précédentes.
|
|
367
367
|
filename: "AMO40_deputes_actifs_mandats_actifs_organes_divises_XV.json",
|
|
368
368
|
ignoreForWeb: !0,
|
|
369
|
-
legislature:
|
|
370
|
-
repairZip: (t, s) => {
|
|
371
|
-
const e =
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
),
|
|
376
|
-
|
|
377
|
-
|
|
369
|
+
legislature: a.Quinze,
|
|
370
|
+
repairZip: async (t, s) => {
|
|
371
|
+
const e = i.join(s, t.filename);
|
|
372
|
+
await n.pathExists(e) && await n.remove(e), await n.mkdir(e), await n.move(
|
|
373
|
+
i.join(s, `${t.filename}.temp`, "acteur"),
|
|
374
|
+
i.join(e, "acteur")
|
|
375
|
+
), await n.move(
|
|
376
|
+
i.join(s, `${t.filename}.temp`, "organe"),
|
|
377
|
+
i.join(e, "organe")
|
|
378
378
|
);
|
|
379
379
|
},
|
|
380
380
|
structure: 1,
|
|
@@ -398,18 +398,18 @@ const S = {
|
|
|
398
398
|
// dont il est un sous ensemble obsolète.
|
|
399
399
|
filename: "AMO50_acteurs_mandats_organes_divises_XVII.json",
|
|
400
400
|
ignoreForWeb: !0,
|
|
401
|
-
legislature:
|
|
402
|
-
repairZip: (t, s) => {
|
|
403
|
-
const e =
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
),
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
),
|
|
411
|
-
|
|
412
|
-
|
|
401
|
+
legislature: a.DixSept,
|
|
402
|
+
repairZip: async (t, s) => {
|
|
403
|
+
const e = i.join(s, t.filename);
|
|
404
|
+
await n.pathExists(e) && await n.remove(e), await n.mkdir(e), await n.move(
|
|
405
|
+
i.join(s, `${t.filename}.temp`, "mandat"),
|
|
406
|
+
i.join(e, "mandat")
|
|
407
|
+
), await n.move(
|
|
408
|
+
i.join(s, `${t.filename}.temp`, "acteur"),
|
|
409
|
+
i.join(e, "acteur")
|
|
410
|
+
), await n.move(
|
|
411
|
+
i.join(s, `${t.filename}.temp`, "organe"),
|
|
412
|
+
i.join(e, "organe")
|
|
413
413
|
);
|
|
414
414
|
},
|
|
415
415
|
structure: 1,
|
|
@@ -433,18 +433,18 @@ const S = {
|
|
|
433
433
|
// dont il est un sous ensemble obsolète.
|
|
434
434
|
filename: "AMO50_acteurs_mandats_organes_divises_XVI.json",
|
|
435
435
|
ignoreForWeb: !0,
|
|
436
|
-
legislature:
|
|
437
|
-
repairZip: (t, s) => {
|
|
438
|
-
const e =
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
),
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
),
|
|
446
|
-
|
|
447
|
-
|
|
436
|
+
legislature: a.Seize,
|
|
437
|
+
repairZip: async (t, s) => {
|
|
438
|
+
const e = i.join(s, t.filename);
|
|
439
|
+
await n.pathExists(e) && await n.remove(e), await n.mkdir(e), await n.move(
|
|
440
|
+
i.join(s, `${t.filename}.temp`, "mandat"),
|
|
441
|
+
i.join(e, "mandat")
|
|
442
|
+
), await n.move(
|
|
443
|
+
i.join(s, `${t.filename}.temp`, "acteur"),
|
|
444
|
+
i.join(e, "acteur")
|
|
445
|
+
), await n.move(
|
|
446
|
+
i.join(s, `${t.filename}.temp`, "organe"),
|
|
447
|
+
i.join(e, "organe")
|
|
448
448
|
);
|
|
449
449
|
},
|
|
450
450
|
structure: 1,
|
|
@@ -468,18 +468,18 @@ const S = {
|
|
|
468
468
|
// dont il est un sous ensemble obsolète.
|
|
469
469
|
filename: "AMO50_acteurs_mandats_organes_divises_XV.json",
|
|
470
470
|
ignoreForWeb: !0,
|
|
471
|
-
legislature:
|
|
472
|
-
repairZip: (t, s) => {
|
|
473
|
-
const e =
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
),
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
),
|
|
481
|
-
|
|
482
|
-
|
|
471
|
+
legislature: a.Quinze,
|
|
472
|
+
repairZip: async (t, s) => {
|
|
473
|
+
const e = i.join(s, t.filename);
|
|
474
|
+
await n.pathExists(e) && await n.remove(e), await n.mkdir(e), await n.move(
|
|
475
|
+
i.join(s, `${t.filename}.temp`, "mandat"),
|
|
476
|
+
i.join(e, "mandat")
|
|
477
|
+
), await n.move(
|
|
478
|
+
i.join(s, `${t.filename}.temp`, "acteur"),
|
|
479
|
+
i.join(e, "acteur")
|
|
480
|
+
), await n.move(
|
|
481
|
+
i.join(s, `${t.filename}.temp`, "organe"),
|
|
482
|
+
i.join(e, "organe")
|
|
483
483
|
);
|
|
484
484
|
},
|
|
485
485
|
structure: 1,
|
|
@@ -490,31 +490,31 @@ const S = {
|
|
|
490
490
|
agendas: [
|
|
491
491
|
{
|
|
492
492
|
filename: "Agenda_XVII.json",
|
|
493
|
-
legislature:
|
|
494
|
-
repairZip:
|
|
493
|
+
legislature: a.DixSept,
|
|
494
|
+
repairZip: h,
|
|
495
495
|
structure: 1,
|
|
496
496
|
title: "Agenda de la XVIIème législature",
|
|
497
497
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/17/vp/reunions/Agenda.json.zip"
|
|
498
498
|
},
|
|
499
499
|
{
|
|
500
500
|
filename: "Agenda_XVI.json",
|
|
501
|
-
legislature:
|
|
502
|
-
repairZip:
|
|
501
|
+
legislature: a.Seize,
|
|
502
|
+
repairZip: h,
|
|
503
503
|
structure: 1,
|
|
504
504
|
title: "Agenda de la XVIème législature",
|
|
505
505
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/16/vp/reunions/Agenda.json.zip"
|
|
506
506
|
},
|
|
507
507
|
{
|
|
508
508
|
filename: "Agenda_XV.json",
|
|
509
|
-
legislature:
|
|
510
|
-
repairZip:
|
|
509
|
+
legislature: a.Quinze,
|
|
510
|
+
repairZip: h,
|
|
511
511
|
structure: 1,
|
|
512
512
|
title: "Agenda de la XVème législature",
|
|
513
513
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/15/vp/reunions/Agenda_XV.json.zip"
|
|
514
514
|
},
|
|
515
515
|
{
|
|
516
516
|
filename: "Agenda_XIV.json",
|
|
517
|
-
legislature:
|
|
517
|
+
legislature: a.Quatorze,
|
|
518
518
|
structure: 0,
|
|
519
519
|
title: "Agenda de la XIVème législature",
|
|
520
520
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/14/vp/reunions/Agenda_XIV.json.zip"
|
|
@@ -523,24 +523,24 @@ const S = {
|
|
|
523
523
|
amendements: [
|
|
524
524
|
{
|
|
525
525
|
filename: "Amendements_XVII.json",
|
|
526
|
-
legislature:
|
|
527
|
-
repairZip:
|
|
526
|
+
legislature: a.DixSept,
|
|
527
|
+
repairZip: h,
|
|
528
528
|
structure: 1,
|
|
529
529
|
title: "Amendements de la XVIIème législature",
|
|
530
530
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/17/loi/amendements_div_legis/Amendements.json.zip"
|
|
531
531
|
},
|
|
532
532
|
{
|
|
533
533
|
filename: "Amendements_XVI.json",
|
|
534
|
-
legislature:
|
|
535
|
-
repairZip:
|
|
534
|
+
legislature: a.Seize,
|
|
535
|
+
repairZip: h,
|
|
536
536
|
structure: 1,
|
|
537
537
|
title: "Amendements de la XVIème législature",
|
|
538
538
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/16/loi/amendements_div_legis/Amendements.json.zip"
|
|
539
539
|
},
|
|
540
540
|
{
|
|
541
541
|
filename: "Amendements_XV.json",
|
|
542
|
-
legislature:
|
|
543
|
-
repairZip:
|
|
542
|
+
legislature: a.Quinze,
|
|
543
|
+
repairZip: h,
|
|
544
544
|
structure: 1,
|
|
545
545
|
title: "Amendements de la XVème législature",
|
|
546
546
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/15/loi/amendements_legis/Amendements_XV.json.zip"
|
|
@@ -558,31 +558,31 @@ const S = {
|
|
|
558
558
|
dossiersLegislatifs: [
|
|
559
559
|
{
|
|
560
560
|
filename: "Dossiers_Legislatifs_XVII.json",
|
|
561
|
-
legislature:
|
|
562
|
-
repairZip:
|
|
561
|
+
legislature: a.DixSept,
|
|
562
|
+
repairZip: h,
|
|
563
563
|
structure: 1,
|
|
564
564
|
title: "Dossiers législatifs de la XVIIème législature",
|
|
565
565
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/17/loi/dossiers_legislatifs/Dossiers_Legislatifs.json.zip"
|
|
566
566
|
},
|
|
567
567
|
{
|
|
568
568
|
filename: "Dossiers_Legislatifs_XVI.json",
|
|
569
|
-
legislature:
|
|
570
|
-
repairZip:
|
|
569
|
+
legislature: a.Seize,
|
|
570
|
+
repairZip: h,
|
|
571
571
|
structure: 1,
|
|
572
572
|
title: "Dossiers législatifs de la XVIème législature",
|
|
573
573
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/16/loi/dossiers_legislatifs/Dossiers_Legislatifs.json.zip"
|
|
574
574
|
},
|
|
575
575
|
{
|
|
576
576
|
filename: "Dossiers_Legislatifs_XV.json",
|
|
577
|
-
legislature:
|
|
578
|
-
repairZip:
|
|
577
|
+
legislature: a.Quinze,
|
|
578
|
+
repairZip: h,
|
|
579
579
|
structure: 1,
|
|
580
580
|
title: "Dossiers législatifs de la XVème législature",
|
|
581
581
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/15/loi/dossiers_legislatifs/Dossiers_Legislatifs_XV.json.zip"
|
|
582
582
|
},
|
|
583
583
|
{
|
|
584
584
|
filename: "Dossiers_Legislatifs_XIV.json",
|
|
585
|
-
legislature:
|
|
585
|
+
legislature: a.Quatorze,
|
|
586
586
|
structure: 0,
|
|
587
587
|
title: "Dossiers législatifs de la XIVème législature",
|
|
588
588
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/14/loi/dossiers_legislatifs/Dossiers_Legislatifs_XIV.json.zip"
|
|
@@ -591,31 +591,31 @@ const S = {
|
|
|
591
591
|
scrutins: [
|
|
592
592
|
{
|
|
593
593
|
filename: "Scrutins_XVII.json",
|
|
594
|
-
legislature:
|
|
595
|
-
repairZip:
|
|
594
|
+
legislature: a.DixSept,
|
|
595
|
+
repairZip: h,
|
|
596
596
|
structure: 1,
|
|
597
597
|
title: "Scrutins de la XVIIème législature",
|
|
598
598
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/17/loi/scrutins/Scrutins.json.zip"
|
|
599
599
|
},
|
|
600
600
|
{
|
|
601
601
|
filename: "Scrutins_XVI.json",
|
|
602
|
-
legislature:
|
|
603
|
-
repairZip:
|
|
602
|
+
legislature: a.Seize,
|
|
603
|
+
repairZip: h,
|
|
604
604
|
structure: 1,
|
|
605
605
|
title: "Scrutins de la XVIème législature",
|
|
606
606
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/16/loi/scrutins/Scrutins.json.zip"
|
|
607
607
|
},
|
|
608
608
|
{
|
|
609
609
|
filename: "Scrutins_XV.json",
|
|
610
|
-
legislature:
|
|
611
|
-
repairZip:
|
|
610
|
+
legislature: a.Quinze,
|
|
611
|
+
repairZip: h,
|
|
612
612
|
structure: 1,
|
|
613
613
|
title: "Scrutins de la XVème législature",
|
|
614
614
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/15/loi/scrutins/Scrutins_XV.json.zip"
|
|
615
615
|
},
|
|
616
616
|
{
|
|
617
617
|
filename: "Scrutins_XIV.json",
|
|
618
|
-
legislature:
|
|
618
|
+
legislature: a.Quatorze,
|
|
619
619
|
structure: 0,
|
|
620
620
|
title: "Scrutins de la XIVème législature",
|
|
621
621
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/14/loi/scrutins/Scrutins_XIV.json.zip"
|
|
@@ -624,48 +624,48 @@ const S = {
|
|
|
624
624
|
questions: [
|
|
625
625
|
{
|
|
626
626
|
filename: "Questions_ecrites_XVII.json",
|
|
627
|
-
legislature:
|
|
628
|
-
repairZip:
|
|
627
|
+
legislature: a.DixSept,
|
|
628
|
+
repairZip: h,
|
|
629
629
|
structure: 1,
|
|
630
630
|
title: "Questions écrites de la XVIIème législature",
|
|
631
631
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/17/questions/questions_ecrites/Questions_ecrites.json.zip"
|
|
632
632
|
},
|
|
633
633
|
{
|
|
634
634
|
filename: "Questions_ecrites_XVI.json",
|
|
635
|
-
legislature:
|
|
636
|
-
repairZip:
|
|
635
|
+
legislature: a.Seize,
|
|
636
|
+
repairZip: h,
|
|
637
637
|
structure: 1,
|
|
638
638
|
title: "Questions écrites de la XVIème législature",
|
|
639
639
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/16/questions/questions_ecrites/Questions_ecrites.json.zip"
|
|
640
640
|
},
|
|
641
641
|
{
|
|
642
642
|
filename: "Questions_gouvernement_XVII.json",
|
|
643
|
-
legislature:
|
|
644
|
-
repairZip:
|
|
643
|
+
legislature: a.DixSept,
|
|
644
|
+
repairZip: h,
|
|
645
645
|
structure: 1,
|
|
646
646
|
title: "Questions au gouvernement de la XVIIème législature",
|
|
647
647
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/17/questions/questions_gouvernement/Questions_gouvernement.json.zip"
|
|
648
648
|
},
|
|
649
649
|
{
|
|
650
650
|
filename: "Questions_gouvernement_XVI.json",
|
|
651
|
-
legislature:
|
|
652
|
-
repairZip:
|
|
651
|
+
legislature: a.Seize,
|
|
652
|
+
repairZip: h,
|
|
653
653
|
structure: 1,
|
|
654
654
|
title: "Questions au gouvernement de la XVIème législature",
|
|
655
655
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/16/questions/questions_gouvernement/Questions_gouvernement.json.zip"
|
|
656
656
|
},
|
|
657
657
|
{
|
|
658
658
|
filename: "Questions_orales_XVII.json",
|
|
659
|
-
legislature:
|
|
660
|
-
repairZip:
|
|
659
|
+
legislature: a.DixSept,
|
|
660
|
+
repairZip: h,
|
|
661
661
|
structure: 1,
|
|
662
662
|
title: "Questions orales sans débats de la XVIIème législature",
|
|
663
663
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/17/questions/questions_orales_sans_debat/Questions_orales_sans_debat.json.zip"
|
|
664
664
|
},
|
|
665
665
|
{
|
|
666
666
|
filename: "Questions_orales_XVI.json",
|
|
667
|
-
legislature:
|
|
668
|
-
repairZip:
|
|
667
|
+
legislature: a.Seize,
|
|
668
|
+
repairZip: h,
|
|
669
669
|
structure: 1,
|
|
670
670
|
title: "Questions orales sans débats de la XVIème législature",
|
|
671
671
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/16/questions/questions_orales_sans_debat/Questions_orales_sans_debat.json.zip"
|
|
@@ -674,11 +674,11 @@ const S = {
|
|
|
674
674
|
comptesRendusSeances: [
|
|
675
675
|
{
|
|
676
676
|
filename: "Comptes_Rendus_Seances_XVII.xml",
|
|
677
|
-
legislature:
|
|
678
|
-
repairZip: (t, s) => {
|
|
679
|
-
const e =
|
|
680
|
-
|
|
681
|
-
|
|
677
|
+
legislature: a.DixSept,
|
|
678
|
+
repairZip: async (t, s) => {
|
|
679
|
+
const e = i.join(s, t.filename);
|
|
680
|
+
await n.pathExists(e) && await n.remove(e), await n.move(
|
|
681
|
+
i.join(s, `${t.filename}.temp`, "xml"),
|
|
682
682
|
e
|
|
683
683
|
);
|
|
684
684
|
},
|
|
@@ -688,11 +688,11 @@ const S = {
|
|
|
688
688
|
},
|
|
689
689
|
{
|
|
690
690
|
filename: "Comptes_Rendus_Seances_XVI.xml",
|
|
691
|
-
legislature:
|
|
692
|
-
repairZip: (t, s) => {
|
|
693
|
-
const e =
|
|
694
|
-
|
|
695
|
-
|
|
691
|
+
legislature: a.Seize,
|
|
692
|
+
repairZip: async (t, s) => {
|
|
693
|
+
const e = i.join(s, t.filename);
|
|
694
|
+
await n.pathExists(e) && await n.remove(e), await n.move(
|
|
695
|
+
i.join(s, `${t.filename}.temp`, "xml"),
|
|
696
696
|
e
|
|
697
697
|
);
|
|
698
698
|
},
|
|
@@ -701,7 +701,7 @@ const S = {
|
|
|
701
701
|
url: "https://data.assemblee-nationale.fr/static/openData/repository/16/vp/syceronbrut/syseron.xml.zip"
|
|
702
702
|
}
|
|
703
703
|
]
|
|
704
|
-
},
|
|
704
|
+
}, Q = [
|
|
705
705
|
1e3,
|
|
706
706
|
"M",
|
|
707
707
|
900,
|
|
@@ -729,23 +729,23 @@ const S = {
|
|
|
729
729
|
1,
|
|
730
730
|
"I"
|
|
731
731
|
];
|
|
732
|
-
function
|
|
732
|
+
function ie(t) {
|
|
733
733
|
if (t < 0)
|
|
734
734
|
return;
|
|
735
735
|
if (t === 0)
|
|
736
736
|
return "0I";
|
|
737
737
|
let s = "";
|
|
738
|
-
for (let e = 0; e <
|
|
739
|
-
for (; t >=
|
|
740
|
-
s +=
|
|
738
|
+
for (let e = 0; e < Q.length; e += 2)
|
|
739
|
+
for (; t >= Q[e]; )
|
|
740
|
+
s += Q[e + 1], t -= Q[e];
|
|
741
741
|
return s;
|
|
742
742
|
}
|
|
743
|
-
function* z(t, s, e,
|
|
743
|
+
function* z(t, s, e, r, l, d = "json", { enriched: _ = !1, log: j = !1, noValidation: y = !1 } = {}) {
|
|
744
744
|
const F = /* @__PURE__ */ new Set();
|
|
745
745
|
for (const v of e) {
|
|
746
|
-
if (v.ignoreForWeb || !
|
|
746
|
+
if (v.ignoreForWeb || !ne(s, v))
|
|
747
747
|
continue;
|
|
748
|
-
const b = new RegExp(`\\.${d}$`), x =
|
|
748
|
+
const b = new RegExp(`\\.${d}$`), x = i.join(
|
|
749
749
|
t,
|
|
750
750
|
v.filename.replace(
|
|
751
751
|
b,
|
|
@@ -755,10 +755,10 @@ function* z(t, s, e, a, l, d = "json", { enriched: _ = !1, log: j = !1, noValida
|
|
|
755
755
|
for (const D of P(x, l)) {
|
|
756
756
|
if (!D[D.length - 1].endsWith(".json"))
|
|
757
757
|
continue;
|
|
758
|
-
const X =
|
|
758
|
+
const X = i.join(x, ...D);
|
|
759
759
|
j && console.log(`Loading file: ${X}…`);
|
|
760
|
-
let V =
|
|
761
|
-
const $ =
|
|
760
|
+
let V = n.readFileSync(X, { encoding: "utf8" });
|
|
761
|
+
const $ = y ? JSON.parse(V) : r(V);
|
|
762
762
|
F.has($.uid) || (F.add($.uid), yield {
|
|
763
763
|
datasetLegislature: v.legislature,
|
|
764
764
|
filePath: X,
|
|
@@ -768,160 +768,160 @@ function* z(t, s, e, a, l, d = "json", { enriched: _ = !1, log: j = !1, noValida
|
|
|
768
768
|
}
|
|
769
769
|
F.clear();
|
|
770
770
|
}
|
|
771
|
-
function
|
|
771
|
+
function ne(t, s) {
|
|
772
772
|
const e = Array.isArray(t) ? t : t !== void 0 ? [t] : [];
|
|
773
|
-
return t === void 0 || e.includes(0) || s.legislature ===
|
|
773
|
+
return t === void 0 || e.includes(0) || s.legislature === a.All ? !0 : e.includes(s.legislature);
|
|
774
774
|
}
|
|
775
775
|
function* de(t, s, e = {}) {
|
|
776
776
|
for (const {
|
|
777
|
-
datasetLegislature:
|
|
777
|
+
datasetLegislature: r,
|
|
778
778
|
item: l,
|
|
779
779
|
filePath: d
|
|
780
780
|
} of z(
|
|
781
781
|
t,
|
|
782
782
|
s,
|
|
783
|
-
|
|
784
|
-
|
|
783
|
+
A.acteursEtOrganes,
|
|
784
|
+
C.toActeur,
|
|
785
785
|
["acteurs"],
|
|
786
786
|
"json",
|
|
787
787
|
e
|
|
788
788
|
))
|
|
789
|
-
yield { acteur: l, datasetLegislature:
|
|
789
|
+
yield { acteur: l, datasetLegislature: r, filePath: d };
|
|
790
790
|
}
|
|
791
791
|
function* pe(t, s, e = {}) {
|
|
792
792
|
for (const {
|
|
793
|
-
item:
|
|
793
|
+
item: r,
|
|
794
794
|
datasetLegislature: l,
|
|
795
795
|
filePath: d
|
|
796
796
|
} of z(
|
|
797
797
|
t,
|
|
798
798
|
s,
|
|
799
|
-
|
|
800
|
-
|
|
799
|
+
A.acteursEtOrganes,
|
|
800
|
+
C.toOrgane,
|
|
801
801
|
["organes"],
|
|
802
802
|
"json",
|
|
803
803
|
e
|
|
804
804
|
))
|
|
805
|
-
yield { organe:
|
|
805
|
+
yield { organe: r, datasetLegislature: l, filePath: d };
|
|
806
806
|
}
|
|
807
807
|
function* ge(t, s, e = {}) {
|
|
808
808
|
for (const {
|
|
809
|
-
datasetLegislature:
|
|
809
|
+
datasetLegislature: r,
|
|
810
810
|
item: l,
|
|
811
811
|
filePath: d
|
|
812
812
|
} of z(
|
|
813
813
|
t,
|
|
814
814
|
s,
|
|
815
|
-
|
|
816
|
-
|
|
815
|
+
A.amendements,
|
|
816
|
+
N.toAmendement,
|
|
817
817
|
[],
|
|
818
818
|
"json",
|
|
819
819
|
e
|
|
820
820
|
))
|
|
821
|
-
yield { amendement: l, datasetLegislature:
|
|
821
|
+
yield { amendement: l, datasetLegislature: r, filePath: d };
|
|
822
822
|
}
|
|
823
823
|
function* _e(t, s, e = {}) {
|
|
824
824
|
for (const {
|
|
825
|
-
item:
|
|
825
|
+
item: r,
|
|
826
826
|
datasetLegislature: l,
|
|
827
827
|
filePath: d
|
|
828
828
|
} of z(
|
|
829
829
|
t,
|
|
830
830
|
s,
|
|
831
|
-
|
|
832
|
-
|
|
831
|
+
A.dossiersLegislatifs,
|
|
832
|
+
R.toDocument,
|
|
833
833
|
["documents"],
|
|
834
834
|
"json",
|
|
835
835
|
e
|
|
836
836
|
))
|
|
837
|
-
yield { document:
|
|
837
|
+
yield { document: r, datasetLegislature: l, filePath: d };
|
|
838
838
|
}
|
|
839
839
|
function* je(t, s, e = {}) {
|
|
840
840
|
for (const {
|
|
841
|
-
item:
|
|
841
|
+
item: r,
|
|
842
842
|
datasetLegislature: l,
|
|
843
843
|
filePath: d
|
|
844
844
|
} of z(
|
|
845
845
|
t,
|
|
846
846
|
s,
|
|
847
|
-
|
|
848
|
-
|
|
847
|
+
A.dossiersLegislatifs,
|
|
848
|
+
R.toDossierParlementaire,
|
|
849
849
|
["dossiers"],
|
|
850
850
|
"json",
|
|
851
851
|
e
|
|
852
852
|
))
|
|
853
|
-
yield { dossierParlementaire:
|
|
853
|
+
yield { dossierParlementaire: r, datasetLegislature: l, filePath: d };
|
|
854
854
|
}
|
|
855
|
-
function*
|
|
855
|
+
function* he(t, s, e = {}) {
|
|
856
856
|
for (const {
|
|
857
|
-
item:
|
|
857
|
+
item: r,
|
|
858
858
|
datasetLegislature: l,
|
|
859
859
|
filePath: d
|
|
860
860
|
} of z(
|
|
861
861
|
t,
|
|
862
862
|
s,
|
|
863
|
-
|
|
864
|
-
|
|
863
|
+
A.agendas,
|
|
864
|
+
M.toReunion,
|
|
865
865
|
[],
|
|
866
866
|
"json",
|
|
867
867
|
e
|
|
868
868
|
))
|
|
869
|
-
yield { reunion:
|
|
869
|
+
yield { reunion: r, datasetLegislature: l, filePath: d };
|
|
870
870
|
}
|
|
871
|
-
function*
|
|
871
|
+
function* ye(t, s, e = {}) {
|
|
872
872
|
for (const {
|
|
873
|
-
item:
|
|
873
|
+
item: r,
|
|
874
874
|
datasetLegislature: l,
|
|
875
875
|
filePath: d
|
|
876
876
|
} of z(
|
|
877
877
|
t,
|
|
878
878
|
s,
|
|
879
|
-
|
|
880
|
-
|
|
879
|
+
A.scrutins,
|
|
880
|
+
Z.toScrutin,
|
|
881
881
|
[],
|
|
882
882
|
"json",
|
|
883
883
|
e
|
|
884
884
|
))
|
|
885
|
-
yield { scrutin:
|
|
885
|
+
yield { scrutin: r, datasetLegislature: l, filePath: d };
|
|
886
886
|
}
|
|
887
|
-
function*
|
|
887
|
+
function* Ae(t, s, e = {}) {
|
|
888
888
|
for (const {
|
|
889
|
-
item:
|
|
889
|
+
item: r,
|
|
890
890
|
datasetLegislature: l,
|
|
891
891
|
filePath: d
|
|
892
892
|
} of z(
|
|
893
893
|
t,
|
|
894
894
|
s,
|
|
895
|
-
|
|
896
|
-
|
|
895
|
+
A.questions,
|
|
896
|
+
B.toQuestion,
|
|
897
897
|
[],
|
|
898
898
|
"json",
|
|
899
899
|
e
|
|
900
900
|
))
|
|
901
|
-
yield { question:
|
|
901
|
+
yield { question: r, datasetLegislature: l, filePath: d };
|
|
902
902
|
}
|
|
903
|
-
function*
|
|
903
|
+
function* Se(t, s, e = {}) {
|
|
904
904
|
for (const {
|
|
905
|
-
item:
|
|
905
|
+
item: r,
|
|
906
906
|
datasetLegislature: l,
|
|
907
907
|
filePath: d
|
|
908
908
|
} of z(
|
|
909
909
|
t,
|
|
910
910
|
s,
|
|
911
|
-
|
|
912
|
-
|
|
911
|
+
A.comptesRendusSeances,
|
|
912
|
+
J.toCompteRendu,
|
|
913
913
|
[],
|
|
914
914
|
"xml",
|
|
915
915
|
e
|
|
916
916
|
))
|
|
917
|
-
yield { compteRendu:
|
|
917
|
+
yield { compteRendu: r, datasetLegislature: l, filePath: d };
|
|
918
918
|
}
|
|
919
919
|
function* Fe(t, s, { enriched: e = !1 } = {}) {
|
|
920
|
-
const
|
|
921
|
-
if (
|
|
922
|
-
for (const d of
|
|
920
|
+
const r = `Comptes_Rendus_Commissions_${ie(s)}${e ? "_enrichi" : "_nettoye"}`, l = i.join(t, r);
|
|
921
|
+
if (n.existsSync(l))
|
|
922
|
+
for (const d of k(l))
|
|
923
923
|
try {
|
|
924
|
-
const _ =
|
|
924
|
+
const _ = n.readFileSync(d, "utf-8");
|
|
925
925
|
yield {
|
|
926
926
|
compteRendu: JSON.parse(_),
|
|
927
927
|
datasetLegislature: s,
|
|
@@ -931,209 +931,209 @@ function* Fe(t, s, { enriched: e = !1 } = {}) {
|
|
|
931
931
|
console.warn(`Erreur lors de la lecture du fichier ${d} :`, _);
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
|
-
function*
|
|
935
|
-
if (
|
|
936
|
-
for (const s of
|
|
937
|
-
const e =
|
|
938
|
-
s.isDirectory() ? yield*
|
|
934
|
+
function* k(t) {
|
|
935
|
+
if (n.existsSync(t))
|
|
936
|
+
for (const s of n.readdirSync(t, { withFileTypes: !0 })) {
|
|
937
|
+
const e = i.join(t, s.name);
|
|
938
|
+
s.isDirectory() ? yield* k(e) : s.isFile() && e.endsWith(".json") && (yield e);
|
|
939
939
|
}
|
|
940
940
|
}
|
|
941
|
-
function ve(t, s, e, { enriched:
|
|
941
|
+
function ve(t, s, e, { enriched: r = !1, log: l = !1 } = {}) {
|
|
942
942
|
const d = {}, _ = {};
|
|
943
943
|
if (s & I.ActeursEtOrganes)
|
|
944
|
-
for (const o of
|
|
945
|
-
if (o.ignoreForWeb || e !==
|
|
944
|
+
for (const o of A.acteursEtOrganes) {
|
|
945
|
+
if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
|
|
946
946
|
continue;
|
|
947
|
-
const m =
|
|
947
|
+
const m = i.join(
|
|
948
948
|
t,
|
|
949
|
-
o.filename.replace(/\.json$/,
|
|
949
|
+
o.filename.replace(/\.json$/, r ? "_enrichi" : "_nettoye")
|
|
950
950
|
);
|
|
951
951
|
for (const u of P(m, ["acteurs"])) {
|
|
952
952
|
if (!u[u.length - 1].endsWith(".json"))
|
|
953
953
|
continue;
|
|
954
|
-
const g =
|
|
954
|
+
const g = i.join(m, ...u);
|
|
955
955
|
l && console.log(`Loading file: ${g}…`);
|
|
956
|
-
const
|
|
956
|
+
const S = n.readFileSync(g, {
|
|
957
957
|
encoding: "utf8"
|
|
958
|
-
}), f =
|
|
958
|
+
}), f = C.toActeur(S);
|
|
959
959
|
d[f.uid] === void 0 && (d[f.uid] = f);
|
|
960
960
|
}
|
|
961
961
|
for (const u of P(m, ["organes"])) {
|
|
962
962
|
if (!u[u.length - 1].endsWith(".json"))
|
|
963
963
|
continue;
|
|
964
|
-
const g =
|
|
964
|
+
const g = i.join(m, ...u);
|
|
965
965
|
l && console.log(`Loading file: ${g}…`);
|
|
966
|
-
const
|
|
966
|
+
const S = n.readFileSync(g, {
|
|
967
967
|
encoding: "utf8"
|
|
968
|
-
}), f =
|
|
968
|
+
}), f = C.toOrgane(S);
|
|
969
969
|
_[f.uid] === void 0 && (_[f.uid] = f);
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
|
-
const j = {},
|
|
972
|
+
const j = {}, y = {}, F = {};
|
|
973
973
|
if (s & I.Agendas)
|
|
974
|
-
for (const o of
|
|
975
|
-
if (o.ignoreForWeb || e !==
|
|
974
|
+
for (const o of A.agendas) {
|
|
975
|
+
if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
|
|
976
976
|
continue;
|
|
977
|
-
const m =
|
|
977
|
+
const m = i.join(
|
|
978
978
|
t,
|
|
979
|
-
o.filename.replace(/\.json$/,
|
|
979
|
+
o.filename.replace(/\.json$/, r ? "_enrichi" : "_nettoye")
|
|
980
980
|
);
|
|
981
981
|
for (const u of P(m)) {
|
|
982
982
|
if (!u[u.length - 1].endsWith(".json"))
|
|
983
983
|
continue;
|
|
984
|
-
const g =
|
|
984
|
+
const g = i.join(m, ...u);
|
|
985
985
|
l && console.log(`Loading file: ${g}…`);
|
|
986
|
-
const
|
|
986
|
+
const S = n.readFileSync(g, {
|
|
987
987
|
encoding: "utf8"
|
|
988
|
-
}), f =
|
|
988
|
+
}), f = M.toReunion(S);
|
|
989
989
|
j[f.uid] === void 0 && (j[f.uid] = f);
|
|
990
990
|
const L = f.timestampDebut.toISOString().split("T")[0];
|
|
991
|
-
let
|
|
992
|
-
|
|
993
|
-
const
|
|
994
|
-
if (
|
|
995
|
-
for (const H of
|
|
996
|
-
for (const
|
|
997
|
-
let
|
|
998
|
-
|
|
991
|
+
let w = y[L];
|
|
992
|
+
w === void 0 && (w = y[L] = []), w.push(f);
|
|
993
|
+
const U = f.odj;
|
|
994
|
+
if (U !== void 0)
|
|
995
|
+
for (const H of U.pointsOdj || [])
|
|
996
|
+
for (const E of H.dossiersLegislatifsRefs || []) {
|
|
997
|
+
let W = F[E];
|
|
998
|
+
W === void 0 && (W = F[E] = []), W.push(f);
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
1002
|
const v = {};
|
|
1003
1003
|
if (s & I.Amendements)
|
|
1004
|
-
for (const o of
|
|
1005
|
-
if (o.ignoreForWeb || e !==
|
|
1004
|
+
for (const o of A.amendements) {
|
|
1005
|
+
if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
|
|
1006
1006
|
continue;
|
|
1007
|
-
const m =
|
|
1007
|
+
const m = i.join(
|
|
1008
1008
|
t,
|
|
1009
|
-
o.filename.replace(/\.json$/,
|
|
1009
|
+
o.filename.replace(/\.json$/, r ? "_enrichi" : "_nettoye")
|
|
1010
1010
|
);
|
|
1011
1011
|
for (const u of P(m)) {
|
|
1012
1012
|
if (!u[u.length - 1].endsWith(".json"))
|
|
1013
1013
|
continue;
|
|
1014
|
-
const g =
|
|
1014
|
+
const g = i.join(m, ...u);
|
|
1015
1015
|
l && console.log(`Loading file: ${g}…`);
|
|
1016
|
-
const
|
|
1016
|
+
const S = n.readFileSync(g, {
|
|
1017
1017
|
encoding: "utf8"
|
|
1018
|
-
}), f =
|
|
1018
|
+
}), f = N.toAmendement(S);
|
|
1019
1019
|
v[f.uid] === void 0 && (v[f.uid] = f);
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
1022
|
const b = {}, x = {}, D = {}, O = {};
|
|
1023
1023
|
if (s & I.DossiersLegislatifs)
|
|
1024
|
-
for (const o of
|
|
1025
|
-
if (o.ignoreForWeb || e !==
|
|
1024
|
+
for (const o of A.dossiersLegislatifs) {
|
|
1025
|
+
if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
|
|
1026
1026
|
continue;
|
|
1027
|
-
const m =
|
|
1027
|
+
const m = i.join(
|
|
1028
1028
|
t,
|
|
1029
|
-
o.filename.replace(/\.json$/,
|
|
1029
|
+
o.filename.replace(/\.json$/, r ? "_enrichi" : "_nettoye")
|
|
1030
1030
|
);
|
|
1031
1031
|
for (const u of P(m, ["documents"])) {
|
|
1032
1032
|
if (!u[u.length - 1].endsWith(".json"))
|
|
1033
1033
|
continue;
|
|
1034
|
-
const g =
|
|
1034
|
+
const g = i.join(m, ...u);
|
|
1035
1035
|
l && console.log(`Loading file: ${g}…`);
|
|
1036
|
-
const
|
|
1036
|
+
const S = n.readFileSync(g, {
|
|
1037
1037
|
encoding: "utf8"
|
|
1038
|
-
}), f =
|
|
1038
|
+
}), f = R.toDocument(S);
|
|
1039
1039
|
b[f.uid] === void 0 && (b[f.uid] = f);
|
|
1040
1040
|
}
|
|
1041
1041
|
for (const u of P(m, ["dossiers"])) {
|
|
1042
1042
|
if (!u[u.length - 1].endsWith(".json"))
|
|
1043
1043
|
continue;
|
|
1044
|
-
const g =
|
|
1044
|
+
const g = i.join(m, ...u);
|
|
1045
1045
|
l && console.log(`Loading file: ${g}…`);
|
|
1046
|
-
const
|
|
1046
|
+
const S = n.readFileSync(g, {
|
|
1047
1047
|
encoding: "utf8"
|
|
1048
|
-
}), f =
|
|
1048
|
+
}), f = R.toDossierParlementaire(S), L = f.titreDossier;
|
|
1049
1049
|
L.senatChemin && x[L.senatChemin] === void 0 && (x[L.senatChemin] = f), L.titreChemin && D[L.titreChemin] === void 0 && (D[L.titreChemin] = f), O[f.uid] === void 0 && (O[f.uid] = f);
|
|
1050
1050
|
}
|
|
1051
1051
|
}
|
|
1052
1052
|
let X = {};
|
|
1053
1053
|
if (s & I.Photos) {
|
|
1054
1054
|
{
|
|
1055
|
-
const o =
|
|
1055
|
+
const o = i.join(
|
|
1056
1056
|
t,
|
|
1057
1057
|
`photos_deputes_${// TODO: Handle Legislature.All.
|
|
1058
|
-
e ===
|
|
1058
|
+
e === a.All ? a.DixSept : e}`,
|
|
1059
1059
|
"deputes.json"
|
|
1060
1060
|
);
|
|
1061
|
-
if (
|
|
1061
|
+
if (n.existsSync(o)) {
|
|
1062
1062
|
l && console.log(`Loading file: ${o}`);
|
|
1063
|
-
const m =
|
|
1063
|
+
const m = n.readFileSync(o, { encoding: "utf8" });
|
|
1064
1064
|
Object.assign(X, JSON.parse(m));
|
|
1065
1065
|
} else l && console.log(`Ignoring missing file: ${o}`);
|
|
1066
1066
|
}
|
|
1067
1067
|
{
|
|
1068
|
-
const o =
|
|
1068
|
+
const o = i.join(
|
|
1069
1069
|
t,
|
|
1070
1070
|
"photos_senateurs",
|
|
1071
1071
|
"senateurs.json"
|
|
1072
1072
|
);
|
|
1073
|
-
if (
|
|
1073
|
+
if (n.existsSync(o)) {
|
|
1074
1074
|
l && console.log(`Loading file: ${o}`);
|
|
1075
|
-
const m =
|
|
1075
|
+
const m = n.readFileSync(o, { encoding: "utf8" });
|
|
1076
1076
|
Object.assign(X, JSON.parse(m));
|
|
1077
1077
|
} else l && console.log(`Ignoring missing file: ${o}`);
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
1080
|
const V = {};
|
|
1081
1081
|
if (s & I.Scrutins)
|
|
1082
|
-
for (const o of
|
|
1083
|
-
if (o.ignoreForWeb || e !==
|
|
1082
|
+
for (const o of A.scrutins) {
|
|
1083
|
+
if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
|
|
1084
1084
|
continue;
|
|
1085
|
-
const m =
|
|
1085
|
+
const m = i.join(
|
|
1086
1086
|
t,
|
|
1087
|
-
o.filename.replace(/\.json$/,
|
|
1087
|
+
o.filename.replace(/\.json$/, r ? "_enrichi" : "_nettoye")
|
|
1088
1088
|
);
|
|
1089
1089
|
for (const u of P(m)) {
|
|
1090
1090
|
if (!u[u.length - 1].endsWith(".json"))
|
|
1091
1091
|
continue;
|
|
1092
|
-
const g =
|
|
1092
|
+
const g = i.join(m, ...u);
|
|
1093
1093
|
l && console.log(`Loading file: ${g}…`);
|
|
1094
|
-
const
|
|
1094
|
+
const S = n.readFileSync(g, {
|
|
1095
1095
|
encoding: "utf8"
|
|
1096
|
-
}), f =
|
|
1096
|
+
}), f = Z.toScrutin(S);
|
|
1097
1097
|
V[f.uid] === void 0 && (V[f.uid] = f);
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
1100
|
const $ = {};
|
|
1101
1101
|
if (s & I.Questions)
|
|
1102
|
-
for (const o of
|
|
1103
|
-
if (o.ignoreForWeb || e !==
|
|
1102
|
+
for (const o of A.questions) {
|
|
1103
|
+
if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
|
|
1104
1104
|
continue;
|
|
1105
|
-
const m =
|
|
1105
|
+
const m = i.join(
|
|
1106
1106
|
t,
|
|
1107
|
-
o.filename.replace(/\.json$/,
|
|
1107
|
+
o.filename.replace(/\.json$/, r ? "_enrichi" : "_nettoye")
|
|
1108
1108
|
);
|
|
1109
1109
|
for (const u of P(m)) {
|
|
1110
1110
|
if (!u[u.length - 1].endsWith(".json"))
|
|
1111
1111
|
continue;
|
|
1112
|
-
const g =
|
|
1112
|
+
const g = i.join(m, ...u);
|
|
1113
1113
|
l && console.log(`Loading file: ${g}…`);
|
|
1114
|
-
const
|
|
1114
|
+
const S = n.readFileSync(g, {
|
|
1115
1115
|
encoding: "utf8"
|
|
1116
|
-
}), f =
|
|
1116
|
+
}), f = B.toQuestion(S);
|
|
1117
1117
|
$[f.uid] === void 0 && ($[f.uid] = f);
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
1120
|
const p = {};
|
|
1121
1121
|
if (s & I.ComptesRendusSeances)
|
|
1122
|
-
for (const o of
|
|
1123
|
-
if (o.ignoreForWeb || e !==
|
|
1122
|
+
for (const o of A.comptesRendusSeances) {
|
|
1123
|
+
if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
|
|
1124
1124
|
continue;
|
|
1125
|
-
const m =
|
|
1125
|
+
const m = i.join(
|
|
1126
1126
|
t,
|
|
1127
|
-
o.filename.replace(/\.json$/,
|
|
1127
|
+
o.filename.replace(/\.json$/, r ? "_enrichi" : "_nettoye")
|
|
1128
1128
|
);
|
|
1129
1129
|
for (const u of P(m)) {
|
|
1130
1130
|
if (!u[u.length - 1].endsWith(".json"))
|
|
1131
1131
|
continue;
|
|
1132
|
-
const g =
|
|
1132
|
+
const g = i.join(m, ...u);
|
|
1133
1133
|
l && console.log(`Loading file: ${g}…`);
|
|
1134
|
-
const
|
|
1134
|
+
const S = n.readFileSync(g, {
|
|
1135
1135
|
encoding: "utf8"
|
|
1136
|
-
}), f =
|
|
1136
|
+
}), f = J.toCompteRendu(S);
|
|
1137
1137
|
p[f.uid] === void 0 && (p[f.uid] = f);
|
|
1138
1138
|
}
|
|
1139
1139
|
}
|
|
@@ -1147,81 +1147,81 @@ function ve(t, s, e, { enriched: a = !1, log: l = !1 } = {}) {
|
|
|
1147
1147
|
organeByUid: _,
|
|
1148
1148
|
photoByUid: X,
|
|
1149
1149
|
reunionByUid: j,
|
|
1150
|
-
reunionsByDay:
|
|
1150
|
+
reunionsByDay: y,
|
|
1151
1151
|
reunionsByDossierUid: F,
|
|
1152
1152
|
scrutinByUid: V,
|
|
1153
1153
|
questionByUid: $,
|
|
1154
1154
|
compteRenduByUid: p
|
|
1155
1155
|
};
|
|
1156
1156
|
}
|
|
1157
|
-
function Ie(t, s, e, { log:
|
|
1157
|
+
function Ie(t, s, e, { log: r = !1 } = {}) {
|
|
1158
1158
|
const l = {}, d = {};
|
|
1159
1159
|
if (s & I.ActeursEtOrganes)
|
|
1160
|
-
for (const p of
|
|
1161
|
-
if (p.ignoreForWeb || e !==
|
|
1160
|
+
for (const p of A.acteursEtOrganes) {
|
|
1161
|
+
if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
|
|
1162
1162
|
continue;
|
|
1163
|
-
const o =
|
|
1163
|
+
const o = i.join(
|
|
1164
1164
|
t,
|
|
1165
1165
|
p.filename.replace(/\.json$/, "_nettoye.json")
|
|
1166
1166
|
);
|
|
1167
|
-
|
|
1168
|
-
const m =
|
|
1167
|
+
r && console.log(`Loading file: ${o}`);
|
|
1168
|
+
const m = n.readFileSync(o, { encoding: "utf8" }), u = C.toActeursEtOrganes(m);
|
|
1169
1169
|
for (const c of u.acteurs)
|
|
1170
1170
|
l[c.uid] === void 0 && (l[c.uid] = c);
|
|
1171
1171
|
for (const c of u.organes)
|
|
1172
1172
|
d[c.uid] === void 0 && (d[c.uid] = c);
|
|
1173
1173
|
}
|
|
1174
|
-
const _ = {}, j = {},
|
|
1174
|
+
const _ = {}, j = {}, y = {};
|
|
1175
1175
|
if (s & I.Agendas)
|
|
1176
|
-
for (const p of
|
|
1177
|
-
if (p.ignoreForWeb || e !==
|
|
1176
|
+
for (const p of A.agendas) {
|
|
1177
|
+
if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
|
|
1178
1178
|
continue;
|
|
1179
|
-
const o =
|
|
1179
|
+
const o = i.join(
|
|
1180
1180
|
t,
|
|
1181
1181
|
p.filename.replace(/\.json$/, "_nettoye.json")
|
|
1182
1182
|
);
|
|
1183
|
-
|
|
1184
|
-
const m =
|
|
1183
|
+
r && console.log(`Loading file: ${o}`);
|
|
1184
|
+
const m = n.readFileSync(o, { encoding: "utf8" }), u = M.toAgendas(m);
|
|
1185
1185
|
for (const c of u.reunions) {
|
|
1186
1186
|
_[c.uid] === void 0 && (_[c.uid] = c);
|
|
1187
1187
|
const g = c.timestampDebut.toISOString().split("T")[0];
|
|
1188
|
-
let
|
|
1189
|
-
|
|
1188
|
+
let S = j[g];
|
|
1189
|
+
S === void 0 && (S = j[g] = []), S.push(c);
|
|
1190
1190
|
const f = c.odj;
|
|
1191
1191
|
if (f !== void 0)
|
|
1192
1192
|
for (const L of f.pointsOdj || [])
|
|
1193
|
-
for (const
|
|
1194
|
-
let
|
|
1195
|
-
|
|
1193
|
+
for (const w of L.dossiersLegislatifsRefs || []) {
|
|
1194
|
+
let U = y[w];
|
|
1195
|
+
U === void 0 && (U = y[w] = []), U.push(c);
|
|
1196
1196
|
}
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
1199
|
const F = {};
|
|
1200
1200
|
if (s & I.Amendements)
|
|
1201
|
-
for (const p of
|
|
1202
|
-
if (p.ignoreForWeb || e !==
|
|
1201
|
+
for (const p of A.amendements) {
|
|
1202
|
+
if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
|
|
1203
1203
|
continue;
|
|
1204
|
-
const o =
|
|
1204
|
+
const o = i.join(
|
|
1205
1205
|
t,
|
|
1206
1206
|
p.filename.replace(/\.json$/, "_nettoye.json")
|
|
1207
1207
|
);
|
|
1208
|
-
|
|
1209
|
-
const m =
|
|
1208
|
+
r && console.log(`Loading file: ${o}`);
|
|
1209
|
+
const m = n.readFileSync(o, { encoding: "utf8" }), u = N.toAmendements(m);
|
|
1210
1210
|
for (const c of u.textesLegislatifs)
|
|
1211
1211
|
for (const g of c.amendements)
|
|
1212
1212
|
F[g.uid] === void 0 && (F[g.uid] = g);
|
|
1213
1213
|
}
|
|
1214
1214
|
const v = {}, b = {}, x = {}, D = {};
|
|
1215
1215
|
if (s & I.DossiersLegislatifs)
|
|
1216
|
-
for (const p of
|
|
1217
|
-
if (p.ignoreForWeb || e !==
|
|
1216
|
+
for (const p of A.dossiersLegislatifs) {
|
|
1217
|
+
if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
|
|
1218
1218
|
continue;
|
|
1219
|
-
const o =
|
|
1219
|
+
const o = i.join(
|
|
1220
1220
|
t,
|
|
1221
1221
|
p.filename.replace(/\.json$/, "_nettoye.json")
|
|
1222
1222
|
);
|
|
1223
|
-
|
|
1224
|
-
const m =
|
|
1223
|
+
r && console.log(`Loading file: ${o}`);
|
|
1224
|
+
const m = n.readFileSync(o, { encoding: "utf8" }), u = R.toDossiersLegislatifs(m);
|
|
1225
1225
|
for (const c of u.textesLegislatifs)
|
|
1226
1226
|
v[c.uid] === void 0 && (v[c.uid] = c);
|
|
1227
1227
|
for (const c of u.dossiersParlementaires) {
|
|
@@ -1233,70 +1233,70 @@ function Ie(t, s, e, { log: a = !1 } = {}) {
|
|
|
1233
1233
|
if (s & I.Photos) {
|
|
1234
1234
|
const p = {};
|
|
1235
1235
|
{
|
|
1236
|
-
const o =
|
|
1236
|
+
const o = i.join(
|
|
1237
1237
|
t,
|
|
1238
1238
|
`photos_deputes_${// TODO: Handle Legislature.All.
|
|
1239
|
-
e ===
|
|
1239
|
+
e === a.All ? a.DixSept : e}`,
|
|
1240
1240
|
"deputes.json"
|
|
1241
1241
|
);
|
|
1242
|
-
if (
|
|
1243
|
-
|
|
1244
|
-
const m =
|
|
1242
|
+
if (n.existsSync(o)) {
|
|
1243
|
+
r && console.log(`Loading file: ${o}`);
|
|
1244
|
+
const m = n.readFileSync(o, { encoding: "utf8" });
|
|
1245
1245
|
Object.assign(p, JSON.parse(m));
|
|
1246
|
-
} else
|
|
1246
|
+
} else r && console.log(`Ignoring missing file: ${o}`);
|
|
1247
1247
|
}
|
|
1248
1248
|
{
|
|
1249
|
-
const o =
|
|
1249
|
+
const o = i.join(
|
|
1250
1250
|
t,
|
|
1251
1251
|
"photos_senateurs",
|
|
1252
1252
|
"senateurs.json"
|
|
1253
1253
|
);
|
|
1254
|
-
if (
|
|
1255
|
-
|
|
1256
|
-
const m =
|
|
1254
|
+
if (n.existsSync(o)) {
|
|
1255
|
+
r && console.log(`Loading file: ${o}`);
|
|
1256
|
+
const m = n.readFileSync(o, { encoding: "utf8" });
|
|
1257
1257
|
Object.assign(p, JSON.parse(m));
|
|
1258
|
-
} else
|
|
1258
|
+
} else r && console.log(`Ignoring missing file: ${o}`);
|
|
1259
1259
|
}
|
|
1260
1260
|
}
|
|
1261
1261
|
const X = {};
|
|
1262
1262
|
if (s & I.Scrutins)
|
|
1263
|
-
for (const p of
|
|
1264
|
-
if (p.ignoreForWeb || e !==
|
|
1263
|
+
for (const p of A.scrutins) {
|
|
1264
|
+
if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
|
|
1265
1265
|
continue;
|
|
1266
|
-
const o =
|
|
1266
|
+
const o = i.join(
|
|
1267
1267
|
t,
|
|
1268
1268
|
p.filename.replace(/\.json$/, "_nettoye.json")
|
|
1269
1269
|
);
|
|
1270
|
-
|
|
1271
|
-
const m =
|
|
1270
|
+
r && console.log(`Loading file: ${o}`);
|
|
1271
|
+
const m = n.readFileSync(o, { encoding: "utf8" }), u = Z.toScrutins(m);
|
|
1272
1272
|
for (const c of u.scrutins)
|
|
1273
1273
|
X[c.uid] === void 0 && (X[c.uid] = c);
|
|
1274
1274
|
}
|
|
1275
1275
|
const V = {};
|
|
1276
1276
|
if (s & I.Questions)
|
|
1277
|
-
for (const p of
|
|
1278
|
-
if (p.ignoreForWeb || e !==
|
|
1277
|
+
for (const p of A.questions) {
|
|
1278
|
+
if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
|
|
1279
1279
|
continue;
|
|
1280
|
-
const o =
|
|
1280
|
+
const o = i.join(
|
|
1281
1281
|
t,
|
|
1282
1282
|
p.filename.replace(/\.json$/, "_nettoye.json")
|
|
1283
1283
|
);
|
|
1284
|
-
|
|
1285
|
-
const m =
|
|
1284
|
+
r && console.log(`Loading file: ${o}`);
|
|
1285
|
+
const m = n.readFileSync(o, { encoding: "utf8" }), u = B.toQuestions(m);
|
|
1286
1286
|
for (const c of u.questions)
|
|
1287
1287
|
V[c.uid] === void 0 && (V[c.uid] = c);
|
|
1288
1288
|
}
|
|
1289
1289
|
const $ = {};
|
|
1290
1290
|
if (s & I.ComptesRendusSeances)
|
|
1291
|
-
for (const p of
|
|
1292
|
-
if (p.ignoreForWeb || e !==
|
|
1291
|
+
for (const p of A.comptesRendusSeances) {
|
|
1292
|
+
if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
|
|
1293
1293
|
continue;
|
|
1294
|
-
const o =
|
|
1294
|
+
const o = i.join(
|
|
1295
1295
|
t,
|
|
1296
1296
|
p.filename.replace(/\.json$/, "_nettoye.json")
|
|
1297
1297
|
);
|
|
1298
|
-
|
|
1299
|
-
const m =
|
|
1298
|
+
r && console.log(`Loading file: ${o}`);
|
|
1299
|
+
const m = n.readFileSync(o, { encoding: "utf8" }), u = J.toComptesRendus(m);
|
|
1300
1300
|
for (const c of u.comptesRendus)
|
|
1301
1301
|
$[c.uid] === void 0 && ($[c.uid] = c);
|
|
1302
1302
|
}
|
|
@@ -1311,138 +1311,138 @@ function Ie(t, s, e, { log: a = !1 } = {}) {
|
|
|
1311
1311
|
photoByUid: O,
|
|
1312
1312
|
reunionByUid: _,
|
|
1313
1313
|
reunionsByDay: j,
|
|
1314
|
-
reunionsByDossierUid:
|
|
1314
|
+
reunionsByDossierUid: y,
|
|
1315
1315
|
scrutinByUid: X,
|
|
1316
1316
|
questionByUid: V,
|
|
1317
1317
|
compteRenduByUid: $
|
|
1318
1318
|
};
|
|
1319
1319
|
}
|
|
1320
1320
|
function be(t, s, e) {
|
|
1321
|
-
const
|
|
1322
|
-
if (!
|
|
1321
|
+
const r = i.join(t, "Documents"), l = oe(r, s), d = i.join(l, "index.json");
|
|
1322
|
+
if (!n.pathExistsSync(d))
|
|
1323
1323
|
return;
|
|
1324
|
-
const _ =
|
|
1324
|
+
const _ = n.readJsonSync(d);
|
|
1325
1325
|
for (const j of e)
|
|
1326
|
-
for (const { filename:
|
|
1327
|
-
if (
|
|
1328
|
-
return { format: j, path:
|
|
1326
|
+
for (const { filename: y, url: F } of _[j] ?? [])
|
|
1327
|
+
if (y !== void 0)
|
|
1328
|
+
return { format: j, path: i.join(l, y), url: F };
|
|
1329
1329
|
}
|
|
1330
1330
|
function De(t, s, { log: e = !1 } = {}) {
|
|
1331
|
-
const
|
|
1331
|
+
const r = i.join(
|
|
1332
1332
|
t,
|
|
1333
1333
|
`photos_deputes_${// TODO: Handle Legislature.All.
|
|
1334
|
-
s ===
|
|
1334
|
+
s === a.All ? a.DixSept : s}`,
|
|
1335
1335
|
"deputes.json"
|
|
1336
1336
|
);
|
|
1337
|
-
e && console.log(`Loading file: ${
|
|
1338
|
-
const l =
|
|
1337
|
+
e && console.log(`Loading file: ${r}`);
|
|
1338
|
+
const l = n.readFileSync(r, { encoding: "utf8" });
|
|
1339
1339
|
return JSON.parse(l);
|
|
1340
1340
|
}
|
|
1341
1341
|
function Xe(t, { log: s = !1 } = {}) {
|
|
1342
|
-
const e =
|
|
1342
|
+
const e = i.join(
|
|
1343
1343
|
t,
|
|
1344
1344
|
"photos_senateurs",
|
|
1345
1345
|
"senateurs.json"
|
|
1346
1346
|
);
|
|
1347
1347
|
s && console.log(`Loading file: ${e}`);
|
|
1348
|
-
const
|
|
1349
|
-
return JSON.parse(
|
|
1348
|
+
const r = n.readFileSync(e, { encoding: "utf8" });
|
|
1349
|
+
return JSON.parse(r);
|
|
1350
1350
|
}
|
|
1351
1351
|
function oe(t, s) {
|
|
1352
1352
|
const e = s.match(Y);
|
|
1353
|
-
|
|
1353
|
+
q.notStrictEqual(
|
|
1354
1354
|
e,
|
|
1355
1355
|
null,
|
|
1356
1356
|
`Unexpected structure for document UID: ${s}`
|
|
1357
1357
|
);
|
|
1358
|
-
const
|
|
1358
|
+
const r = e.groups, l = i.join(
|
|
1359
1359
|
t,
|
|
1360
|
-
|
|
1361
|
-
), d =
|
|
1360
|
+
r.documentType ?? r.documentType2
|
|
1361
|
+
), d = i.join(l, r.chambre ?? r.chambre2), _ = i.join(
|
|
1362
1362
|
d,
|
|
1363
|
-
|
|
1364
|
-
), j =
|
|
1363
|
+
r.republique ?? r.republique2
|
|
1364
|
+
), j = i.join(
|
|
1365
1365
|
_,
|
|
1366
|
-
|
|
1367
|
-
),
|
|
1368
|
-
if (
|
|
1369
|
-
return
|
|
1370
|
-
const F =
|
|
1371
|
-
let v = "000000" + (
|
|
1366
|
+
r.legislature ?? r.legislature2
|
|
1367
|
+
), y = r.etat;
|
|
1368
|
+
if (y === void 0)
|
|
1369
|
+
return n.ensureDirSync(j), i.join(j, s);
|
|
1370
|
+
const F = i.join(j, y);
|
|
1371
|
+
let v = "000000" + (r.numero ?? r.numero2);
|
|
1372
1372
|
v = v.substring(v.length - 6);
|
|
1373
|
-
const b =
|
|
1374
|
-
return
|
|
1373
|
+
const b = i.join(F, v.substring(0, 3));
|
|
1374
|
+
return n.ensureDirSync(b), i.join(b, s);
|
|
1375
1375
|
}
|
|
1376
1376
|
function Ve(t, s) {
|
|
1377
|
-
return
|
|
1377
|
+
return T(t, s, te);
|
|
1378
1378
|
}
|
|
1379
1379
|
function $e(t, s) {
|
|
1380
1380
|
const e = G.exec(s);
|
|
1381
|
-
|
|
1381
|
+
q.notStrictEqual(
|
|
1382
1382
|
e,
|
|
1383
1383
|
null,
|
|
1384
1384
|
`Unexpected structure for reunion UID: ${s}`
|
|
1385
1385
|
);
|
|
1386
|
-
const
|
|
1387
|
-
let
|
|
1388
|
-
|
|
1389
|
-
const F =
|
|
1390
|
-
return
|
|
1386
|
+
const r = i.join(t, e[1]), l = i.join(r, e[2]), d = i.join(l, e[3]), _ = i.join(d, e[4]), j = i.join(_, e[5]);
|
|
1387
|
+
let y = "000000000" + e[6];
|
|
1388
|
+
y = y.substring(y.length - 9);
|
|
1389
|
+
const F = i.join(j, y.substring(0, 3)), v = i.join(F, y.substring(3, 3));
|
|
1390
|
+
return n.ensureDirSync(v), i.join(v, s);
|
|
1391
1391
|
}
|
|
1392
1392
|
function Le(t, s) {
|
|
1393
1393
|
const e = K.exec(s);
|
|
1394
|
-
|
|
1394
|
+
q.notStrictEqual(
|
|
1395
1395
|
e,
|
|
1396
1396
|
null,
|
|
1397
1397
|
`Unexpected structure for scrutin UID: ${s}`
|
|
1398
1398
|
);
|
|
1399
|
-
const
|
|
1399
|
+
const r = i.join(t, e[1]), l = i.join(r, e[2]), d = i.join(l, e[3]);
|
|
1400
1400
|
let _ = "000000" + e[4];
|
|
1401
1401
|
_ = _.substring(_.length - 6);
|
|
1402
|
-
const j =
|
|
1403
|
-
return
|
|
1402
|
+
const j = i.join(d, _.substring(0, 3));
|
|
1403
|
+
return n.ensureDirSync(j), i.join(j, s);
|
|
1404
1404
|
}
|
|
1405
1405
|
function xe(t, s) {
|
|
1406
|
-
return
|
|
1406
|
+
return T(t, s, se);
|
|
1407
1407
|
}
|
|
1408
1408
|
function Pe(t, s) {
|
|
1409
1409
|
const e = ee.exec(s);
|
|
1410
|
-
|
|
1410
|
+
q.notStrictEqual(
|
|
1411
1411
|
e,
|
|
1412
1412
|
null,
|
|
1413
1413
|
`Unexpected structure for object with UID: ${s}`
|
|
1414
1414
|
);
|
|
1415
|
-
const
|
|
1415
|
+
const r = i.join(t, e[2]), l = i.join(r, e[3]), d = i.join(l, e[4]), _ = i.join(d, e[5]);
|
|
1416
1416
|
let j = "000000000" + e[7];
|
|
1417
1417
|
j = j.substring(j.length - 9);
|
|
1418
|
-
const
|
|
1419
|
-
return
|
|
1418
|
+
const y = i.join(_, j.substring(0, 3)), F = i.join(y, j.substring(3, 3));
|
|
1419
|
+
return n.ensureDirSync(F), i.join(F, s);
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1422
|
-
const
|
|
1423
|
-
|
|
1424
|
-
|
|
1421
|
+
function T(t, s, e) {
|
|
1422
|
+
const r = e.exec(s);
|
|
1423
|
+
q.notStrictEqual(
|
|
1424
|
+
r,
|
|
1425
1425
|
null,
|
|
1426
1426
|
`Unexpected structure for object with UID: ${s}`
|
|
1427
1427
|
);
|
|
1428
|
-
const l =
|
|
1429
|
-
let _ = "000000" +
|
|
1428
|
+
const l = i.join(t, r[1]), d = i.join(l, r[2]);
|
|
1429
|
+
let _ = "000000" + r[3];
|
|
1430
1430
|
_ = _.substring(_.length - 6);
|
|
1431
|
-
const j =
|
|
1432
|
-
return
|
|
1431
|
+
const j = i.join(d, _.substring(0, 3));
|
|
1432
|
+
return n.ensureDirSync(j), i.join(j, s);
|
|
1433
1433
|
}
|
|
1434
1434
|
export {
|
|
1435
1435
|
I as EnabledDatasets,
|
|
1436
1436
|
de as iterLoadAssembleeActeurs,
|
|
1437
1437
|
ge as iterLoadAssembleeAmendements,
|
|
1438
|
-
|
|
1438
|
+
Se as iterLoadAssembleeComptesRendus,
|
|
1439
1439
|
Fe as iterLoadAssembleeComptesRendusCommissions,
|
|
1440
1440
|
_e as iterLoadAssembleeDocuments,
|
|
1441
1441
|
je as iterLoadAssembleeDossiersParlementaires,
|
|
1442
1442
|
pe as iterLoadAssembleeOrganes,
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1443
|
+
Ae as iterLoadAssembleeQuestions,
|
|
1444
|
+
he as iterLoadAssembleeReunions,
|
|
1445
|
+
ye as iterLoadAssembleeScrutins,
|
|
1446
1446
|
ve as loadAssembleeData,
|
|
1447
1447
|
Ie as loadAssembleeDataFromBigFiles,
|
|
1448
1448
|
be as loadAssembleeDocumentFile,
|