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