@tricoteuses/senat 2.22.13 → 2.22.15
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/src/loaders.d.ts +2 -8
- package/lib/src/loaders.js +7 -25
- package/lib/src/scripts/retrieve_cr_commission.js +1 -1
- package/lib/src/scripts/retrieve_cr_seance.js +1 -1
- package/lib/src/scripts/retrieve_videos.js +2 -2
- package/lib/tests/test_iter_load.test.js +17 -0
- package/package.json +2 -2
- package/lib/config.d.ts +0 -21
- package/lib/config.js +0 -27
- package/lib/databases.d.ts +0 -2
- package/lib/databases.js +0 -26
- package/lib/datasets.d.ts +0 -34
- package/lib/datasets.js +0 -233
- package/lib/git.d.ts +0 -26
- package/lib/git.js +0 -167
- package/lib/index.d.ts +0 -13
- package/lib/index.js +0 -1
- package/lib/loaders.d.ts +0 -58
- package/lib/loaders.js +0 -286
- package/lib/model/agenda.d.ts +0 -6
- package/lib/model/agenda.js +0 -148
- package/lib/model/ameli.d.ts +0 -51
- package/lib/model/ameli.js +0 -147
- package/lib/model/commission.d.ts +0 -18
- package/lib/model/commission.js +0 -269
- package/lib/model/debats.d.ts +0 -67
- package/lib/model/debats.js +0 -95
- package/lib/model/documents.d.ts +0 -12
- package/lib/model/documents.js +0 -138
- package/lib/model/dosleg.d.ts +0 -7
- package/lib/model/dosleg.js +0 -326
- package/lib/model/index.d.ts +0 -7
- package/lib/model/index.js +0 -7
- package/lib/model/questions.d.ts +0 -45
- package/lib/model/questions.js +0 -89
- package/lib/model/scrutins.d.ts +0 -13
- package/lib/model/scrutins.js +0 -114
- package/lib/model/seance.d.ts +0 -3
- package/lib/model/seance.js +0 -267
- package/lib/model/sens.d.ts +0 -146
- package/lib/model/sens.js +0 -454
- package/lib/model/texte.d.ts +0 -7
- package/lib/model/texte.js +0 -228
- package/lib/model/util.d.ts +0 -9
- package/lib/model/util.js +0 -38
- package/lib/parsers/texte.d.ts +0 -7
- package/lib/parsers/texte.js +0 -228
- package/lib/raw_types/ameli.d.ts +0 -914
- package/lib/raw_types/ameli.js +0 -5
- package/lib/raw_types/debats.d.ts +0 -207
- package/lib/raw_types/debats.js +0 -5
- package/lib/raw_types/dosleg.d.ts +0 -1619
- package/lib/raw_types/dosleg.js +0 -5
- package/lib/raw_types/questions.d.ts +0 -423
- package/lib/raw_types/questions.js +0 -5
- package/lib/raw_types/senat.d.ts +0 -11372
- package/lib/raw_types/senat.js +0 -5
- package/lib/raw_types/sens.d.ts +0 -8248
- package/lib/raw_types/sens.js +0 -5
- package/lib/raw_types_schemats/ameli.d.ts +0 -539
- package/lib/raw_types_schemats/ameli.js +0 -2
- package/lib/raw_types_schemats/debats.d.ts +0 -127
- package/lib/raw_types_schemats/debats.js +0 -2
- package/lib/raw_types_schemats/dosleg.d.ts +0 -977
- package/lib/raw_types_schemats/dosleg.js +0 -2
- package/lib/raw_types_schemats/questions.d.ts +0 -237
- package/lib/raw_types_schemats/questions.js +0 -2
- package/lib/raw_types_schemats/sens.d.ts +0 -6915
- package/lib/raw_types_schemats/sens.js +0 -2
- package/lib/scripts/convert_data.js +0 -354
- package/lib/scripts/data-download.d.ts +0 -1
- package/lib/scripts/data-download.js +0 -12
- package/lib/scripts/datautil.d.ts +0 -8
- package/lib/scripts/datautil.js +0 -34
- package/lib/scripts/parse_textes.d.ts +0 -1
- package/lib/scripts/parse_textes.js +0 -44
- package/lib/scripts/retrieve_agenda.d.ts +0 -1
- package/lib/scripts/retrieve_agenda.js +0 -132
- package/lib/scripts/retrieve_cr_commission.d.ts +0 -1
- package/lib/scripts/retrieve_cr_commission.js +0 -364
- package/lib/scripts/retrieve_cr_seance.d.ts +0 -6
- package/lib/scripts/retrieve_cr_seance.js +0 -347
- package/lib/scripts/retrieve_documents.d.ts +0 -3
- package/lib/scripts/retrieve_documents.js +0 -219
- package/lib/scripts/retrieve_open_data.d.ts +0 -1
- package/lib/scripts/retrieve_open_data.js +0 -316
- package/lib/scripts/retrieve_senateurs_photos.d.ts +0 -1
- package/lib/scripts/retrieve_senateurs_photos.js +0 -147
- package/lib/scripts/retrieve_videos.d.ts +0 -1
- package/lib/scripts/retrieve_videos.js +0 -461
- package/lib/scripts/shared/cli_helpers.d.ts +0 -95
- package/lib/scripts/shared/cli_helpers.js +0 -91
- package/lib/scripts/shared/util.d.ts +0 -4
- package/lib/scripts/shared/util.js +0 -35
- package/lib/scripts/test_iter_load.d.ts +0 -1
- package/lib/scripts/test_iter_load.js +0 -12
- package/lib/src/utils/nvs-timecode.d.ts +0 -17
- package/lib/src/utils/nvs-timecode.js +0 -79
- package/lib/src/utils/weights_scoring_config.d.ts +0 -2
- package/lib/src/utils/weights_scoring_config.js +0 -15
- package/lib/strings.d.ts +0 -1
- package/lib/strings.js +0 -18
- package/lib/types/agenda.d.ts +0 -44
- package/lib/types/agenda.js +0 -1
- package/lib/types/ameli.d.ts +0 -5
- package/lib/types/ameli.js +0 -1
- package/lib/types/compte_rendu.d.ts +0 -83
- package/lib/types/compte_rendu.js +0 -1
- package/lib/types/debats.d.ts +0 -2
- package/lib/types/debats.js +0 -1
- package/lib/types/dosleg.d.ts +0 -70
- package/lib/types/dosleg.js +0 -1
- package/lib/types/questions.d.ts +0 -2
- package/lib/types/questions.js +0 -1
- package/lib/types/sens.d.ts +0 -10
- package/lib/types/sens.js +0 -1
- package/lib/types/sessions.d.ts +0 -5
- package/lib/types/sessions.js +0 -84
- package/lib/types/texte.d.ts +0 -74
- package/lib/types/texte.js +0 -16
- package/lib/utils/cr_spliting.d.ts +0 -28
- package/lib/utils/cr_spliting.js +0 -265
- package/lib/utils/date.d.ts +0 -10
- package/lib/utils/date.js +0 -100
- package/lib/utils/nvs-timecode.d.ts +0 -7
- package/lib/utils/nvs-timecode.js +0 -79
- package/lib/utils/reunion_grouping.d.ts +0 -11
- package/lib/utils/reunion_grouping.js +0 -337
- package/lib/utils/reunion_odj_building.d.ts +0 -5
- package/lib/utils/reunion_odj_building.js +0 -154
- package/lib/utils/reunion_parsing.d.ts +0 -23
- package/lib/utils/reunion_parsing.js +0 -209
- package/lib/utils/scoring.d.ts +0 -14
- package/lib/utils/scoring.js +0 -147
- package/lib/utils/string_cleaning.d.ts +0 -7
- package/lib/utils/string_cleaning.js +0 -57
- package/lib/validators/config.d.ts +0 -9
- package/lib/validators/config.js +0 -10
- /package/lib/{scripts/convert_data.d.ts → tests/test_iter_load.test.d.ts} +0 -0
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { iterLoadSenatRapports, } from "../loaders";
|
|
2
|
-
import commandLineArgs from "command-line-args";
|
|
3
|
-
import { dataDirDefaultOption } from "./shared/cli_helpers";
|
|
4
|
-
const optionsDefinitions = [dataDirDefaultOption];
|
|
5
|
-
const options = commandLineArgs(optionsDefinitions);
|
|
6
|
-
const session = 2024;
|
|
7
|
-
const sinceCommit = undefined;
|
|
8
|
-
for (const { item: rapport } of iterLoadSenatRapports(options["dataDir"], session, {
|
|
9
|
-
sinceCommit: sinceCommit,
|
|
10
|
-
})) {
|
|
11
|
-
console.log(rapport);
|
|
12
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export type L1Chapter = {
|
|
2
|
-
id: string;
|
|
3
|
-
label: string;
|
|
4
|
-
index: number;
|
|
5
|
-
};
|
|
6
|
-
export declare function getLevel1Chapters(dataNvs: string): L1Chapter[];
|
|
7
|
-
export declare function pickBestLevel1ChapterForAgenda(chapters: L1Chapter[], agendaTitle: string): {
|
|
8
|
-
chapter: L1Chapter;
|
|
9
|
-
score: number;
|
|
10
|
-
} | null;
|
|
11
|
-
export declare function getAgendaSegmentTimecodes(dataNvs: string, finalPlayerNvs: string, agendaTitleOrObjet: string): {
|
|
12
|
-
start: number;
|
|
13
|
-
end: number | null;
|
|
14
|
-
chapterId: string;
|
|
15
|
-
nextChapterId: string | null;
|
|
16
|
-
score: number;
|
|
17
|
-
} | null;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { XMLParser } from "fast-xml-parser";
|
|
2
|
-
import { dice, normalize } from "./scoring";
|
|
3
|
-
import { decodeHtmlEntities } from "./string_cleaning";
|
|
4
|
-
const CHAPTER_MATCH_THRESHOLD = 0.5;
|
|
5
|
-
const xmlParser = new XMLParser({
|
|
6
|
-
ignoreAttributes: false,
|
|
7
|
-
attributeNamePrefix: "@_",
|
|
8
|
-
});
|
|
9
|
-
function getTimecodeForChapterId(finalPlayerNvs, chapterId) {
|
|
10
|
-
const xml = xmlParser.parse(finalPlayerNvs);
|
|
11
|
-
const synchros = xml?.player?.synchro;
|
|
12
|
-
if (!synchros)
|
|
13
|
-
return null;
|
|
14
|
-
const synchsArray = Array.isArray(synchros) ? synchros : [synchros];
|
|
15
|
-
const match = synchsArray.find((s) => String(s["@_id"]) === String(chapterId));
|
|
16
|
-
if (!match)
|
|
17
|
-
return null;
|
|
18
|
-
const rawTimecode = match["@_timecode"];
|
|
19
|
-
if (rawTimecode == null)
|
|
20
|
-
return null;
|
|
21
|
-
const ms = Number(rawTimecode);
|
|
22
|
-
if (Number.isNaN(ms))
|
|
23
|
-
return null;
|
|
24
|
-
return Math.floor(ms / 1000);
|
|
25
|
-
}
|
|
26
|
-
function toArray(v) {
|
|
27
|
-
if (!v)
|
|
28
|
-
return [];
|
|
29
|
-
return Array.isArray(v) ? v : [v];
|
|
30
|
-
}
|
|
31
|
-
export function getLevel1Chapters(dataNvs) {
|
|
32
|
-
const xml = xmlParser.parse(dataNvs);
|
|
33
|
-
const root = xml?.data?.chapters?.chapter ?? xml?.chapters?.chapter;
|
|
34
|
-
const roots = toArray(root);
|
|
35
|
-
return roots
|
|
36
|
-
.map((ch, i) => {
|
|
37
|
-
const id = ch?.id ?? ch?.["@_id"];
|
|
38
|
-
const labelRaw = ch?.label ?? ch?.["@_label"] ?? "";
|
|
39
|
-
return {
|
|
40
|
-
id: String(id),
|
|
41
|
-
label: decodeHtmlEntities(String(labelRaw)).trim(),
|
|
42
|
-
index: i,
|
|
43
|
-
};
|
|
44
|
-
})
|
|
45
|
-
.filter((c) => c.id && c.label);
|
|
46
|
-
}
|
|
47
|
-
export function pickBestLevel1ChapterForAgenda(chapters, agendaTitle) {
|
|
48
|
-
const q = normalize(agendaTitle);
|
|
49
|
-
let best = null;
|
|
50
|
-
for (const ch of chapters) {
|
|
51
|
-
const s = dice(q, ch.label);
|
|
52
|
-
if (!best || s > best.score)
|
|
53
|
-
best = { chapter: ch, score: s };
|
|
54
|
-
}
|
|
55
|
-
if (!best || best.score < CHAPTER_MATCH_THRESHOLD)
|
|
56
|
-
return { chapter: chapters[0], score: 0 };
|
|
57
|
-
return best;
|
|
58
|
-
}
|
|
59
|
-
export function getAgendaSegmentTimecodes(dataNvs, finalPlayerNvs, agendaTitleOrObjet) {
|
|
60
|
-
const l1 = getLevel1Chapters(dataNvs);
|
|
61
|
-
if (!l1.length)
|
|
62
|
-
return null;
|
|
63
|
-
const best = pickBestLevel1ChapterForAgenda(l1, agendaTitleOrObjet);
|
|
64
|
-
if (!best)
|
|
65
|
-
return null;
|
|
66
|
-
const chapter = best.chapter;
|
|
67
|
-
const next = l1[chapter.index + 1] ?? null;
|
|
68
|
-
const start = getTimecodeForChapterId(finalPlayerNvs, chapter.id);
|
|
69
|
-
if (start == null)
|
|
70
|
-
return null;
|
|
71
|
-
const end = next ? getTimecodeForChapterId(finalPlayerNvs, next.id) : null;
|
|
72
|
-
return {
|
|
73
|
-
start,
|
|
74
|
-
end,
|
|
75
|
-
chapterId: chapter.id,
|
|
76
|
-
nextChapterId: next?.id ?? null,
|
|
77
|
-
score: best.score,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// BASED ON TESTS RESULTS
|
|
2
|
-
// these weights yield good results in the benchmark test suite
|
|
3
|
-
// aiming at 0 WRONG matches while maximizing HITs
|
|
4
|
-
export const weights = {
|
|
5
|
-
wTitle: 0.7,
|
|
6
|
-
wOrg: 0.1,
|
|
7
|
-
wSalle: 0,
|
|
8
|
-
wTime: 0.2,
|
|
9
|
-
sameOrgBonus: 0.2,
|
|
10
|
-
minAccept: 0.5,
|
|
11
|
-
margin: 0.1,
|
|
12
|
-
titleMin: 0.2,
|
|
13
|
-
titleDominance: 0,
|
|
14
|
-
orgUncertainPenalty: 0.8,
|
|
15
|
-
};
|
package/lib/strings.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function slugify(string: string, replacement?: string): string;
|
package/lib/strings.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import originalSlugify from "slug";
|
|
2
|
-
const slugifyCharmap = {
|
|
3
|
-
...originalSlugify.defaults.charmap,
|
|
4
|
-
"'": " ",
|
|
5
|
-
"@": " ",
|
|
6
|
-
".": " ",
|
|
7
|
-
"-": "_",
|
|
8
|
-
};
|
|
9
|
-
export function slugify(string, replacement) {
|
|
10
|
-
const options = {
|
|
11
|
-
charmap: slugifyCharmap,
|
|
12
|
-
mode: "rfc3986",
|
|
13
|
-
};
|
|
14
|
-
if (replacement) {
|
|
15
|
-
options.replacement = replacement;
|
|
16
|
-
}
|
|
17
|
-
return originalSlugify(string, options);
|
|
18
|
-
}
|
package/lib/types/agenda.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export interface AgendaEvent {
|
|
2
|
-
id: string;
|
|
3
|
-
type: string | null;
|
|
4
|
-
date: string;
|
|
5
|
-
startTime: string | null;
|
|
6
|
-
endTime: string | null;
|
|
7
|
-
timeOriginal: string | null;
|
|
8
|
-
titre: string;
|
|
9
|
-
organe: string | null;
|
|
10
|
-
objet: string | null;
|
|
11
|
-
lieu: string | null;
|
|
12
|
-
captationVideo: boolean;
|
|
13
|
-
urlDossierSenat: string | null;
|
|
14
|
-
quantieme: string | null;
|
|
15
|
-
}
|
|
16
|
-
export type TimeSlot = "MATIN" | "APRES-MIDI" | "SOIR" | "UNKNOWN";
|
|
17
|
-
export interface Reunion {
|
|
18
|
-
uid: string;
|
|
19
|
-
chambre: "SN";
|
|
20
|
-
date: string;
|
|
21
|
-
startTime: string | null;
|
|
22
|
-
endTime: string | null;
|
|
23
|
-
captationVideo: boolean;
|
|
24
|
-
titre: string;
|
|
25
|
-
type: string;
|
|
26
|
-
organe?: string;
|
|
27
|
-
objet?: string;
|
|
28
|
-
lieu?: string;
|
|
29
|
-
events: AgendaEvent[];
|
|
30
|
-
compteRenduRefUid?: string;
|
|
31
|
-
transcriptionRef?: string;
|
|
32
|
-
urlVideo?: string;
|
|
33
|
-
timecodeDebutVideo?: number;
|
|
34
|
-
timecodeFinVideo?: number;
|
|
35
|
-
odj?: ReunionOdj;
|
|
36
|
-
}
|
|
37
|
-
export interface ReunionOdjPoint {
|
|
38
|
-
objet: string | null;
|
|
39
|
-
dossierLegislatifRef: string | null;
|
|
40
|
-
codeEtape: string | null;
|
|
41
|
-
}
|
|
42
|
-
export interface ReunionOdj {
|
|
43
|
-
pointsOdj: ReunionOdjPoint[];
|
|
44
|
-
}
|
package/lib/types/agenda.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/types/ameli.d.ts
DELETED
package/lib/types/ameli.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
export interface CompteRendu {
|
|
2
|
-
uid: string;
|
|
3
|
-
seanceRef: string;
|
|
4
|
-
sessionRef: string;
|
|
5
|
-
metadonnees: Metadonnees;
|
|
6
|
-
contenu: Contenu;
|
|
7
|
-
}
|
|
8
|
-
export interface Metadonnees {
|
|
9
|
-
dateSeance: string;
|
|
10
|
-
dateSeanceJour: string;
|
|
11
|
-
numSeanceJour: string;
|
|
12
|
-
numSeance: string;
|
|
13
|
-
typeAssemblee: "AN" | "SN";
|
|
14
|
-
legislature: string;
|
|
15
|
-
session: string;
|
|
16
|
-
nomFichierJo: string;
|
|
17
|
-
validite: string;
|
|
18
|
-
etat: string;
|
|
19
|
-
diffusion: string;
|
|
20
|
-
version: string;
|
|
21
|
-
environnement: string;
|
|
22
|
-
heureGeneration: Date;
|
|
23
|
-
sommaire?: Sommaire;
|
|
24
|
-
}
|
|
25
|
-
export interface Contenu {
|
|
26
|
-
quantiemes: Quantiemes;
|
|
27
|
-
ouvertureSeance?: Point[] | Point;
|
|
28
|
-
point: Point[] | Point;
|
|
29
|
-
finSeance?: FinSeance;
|
|
30
|
-
paragraphe?: Point[];
|
|
31
|
-
}
|
|
32
|
-
export interface FinSeance {
|
|
33
|
-
point: Point;
|
|
34
|
-
}
|
|
35
|
-
export interface Quantiemes {
|
|
36
|
-
journee: string;
|
|
37
|
-
session: string;
|
|
38
|
-
}
|
|
39
|
-
export interface Point {
|
|
40
|
-
ordre_absolu_seance: string;
|
|
41
|
-
code_grammaire: string;
|
|
42
|
-
roledebat?: string;
|
|
43
|
-
orateurs?: {
|
|
44
|
-
orateur: {
|
|
45
|
-
nom: string;
|
|
46
|
-
id: string;
|
|
47
|
-
qualite: string;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
texte: {
|
|
51
|
-
_: string;
|
|
52
|
-
};
|
|
53
|
-
code_style?: string;
|
|
54
|
-
}
|
|
55
|
-
export interface Texte {
|
|
56
|
-
_?: string;
|
|
57
|
-
id_syceron?: string;
|
|
58
|
-
stime?: string;
|
|
59
|
-
sup?: string;
|
|
60
|
-
lienAdt?: Texte[] | Texte;
|
|
61
|
-
}
|
|
62
|
-
export interface Sommaire {
|
|
63
|
-
presidentSeance: Texte;
|
|
64
|
-
sommaire1: SommaireElement[] | SommaireElement;
|
|
65
|
-
sommaire3?: SommaireElement[] | SommaireElement;
|
|
66
|
-
sommaire2?: SommaireElement[] | SommaireElement;
|
|
67
|
-
para?: Texte[] | Texte;
|
|
68
|
-
}
|
|
69
|
-
export interface SommaireElement {
|
|
70
|
-
valeur_pts_odj: string | undefined;
|
|
71
|
-
titreStruct: TitreStruct;
|
|
72
|
-
para?: Array<Texte | string> | Texte;
|
|
73
|
-
sommaire2?: SommaireElement[] | SommaireElement;
|
|
74
|
-
sommaire3?: SommaireElement[] | SommaireElement;
|
|
75
|
-
presidentSeance?: Texte[] | Texte;
|
|
76
|
-
type_debat?: string;
|
|
77
|
-
}
|
|
78
|
-
export interface TitreStruct {
|
|
79
|
-
id_syceron: string;
|
|
80
|
-
intitule?: string;
|
|
81
|
-
sousIntitule?: string;
|
|
82
|
-
type_debat?: string;
|
|
83
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/types/debats.d.ts
DELETED
package/lib/types/debats.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/types/dosleg.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { txt_ameliFields } from "../raw_types_schemats/ameli";
|
|
2
|
-
import { ass as Ass, aud, audFields, auteur, date_seance, date_seanceFields as dateSeanceFields, deccoc as DecCoc, denrap as DenRap, docatt, docattFields, ecr, ecrFields, etaloi as EtaLoi, lecass, lecassFields, lecassrap, lecture, lectureFields, loi, org as Org, oritxt as OriTxt, qua as Qua, rap, raporg as RapOrg, raporgFields, scr as Scr, texte, texteFields, typatt as TypAtt, typlec as TypLec, typloi as TypLoi, typtxt as TypTxt, typurl as TypUrl, typurlFields } from "../raw_types_schemats/dosleg";
|
|
3
|
-
import { Debat } from "./debats";
|
|
4
|
-
import { TxtAmeli } from "./ameli";
|
|
5
|
-
export type { Ass, DecCoc, DenRap, EtaLoi, Org, OriTxt, Qua, RapOrg, Scr, TypAtt, TypLec, TypLoi, TypTxt, TypUrl };
|
|
6
|
-
export interface Aud extends aud {
|
|
7
|
-
org?: Org;
|
|
8
|
-
}
|
|
9
|
-
export interface Auteur extends auteur {
|
|
10
|
-
qua?: Qua;
|
|
11
|
-
}
|
|
12
|
-
export interface DateSeance extends date_seance {
|
|
13
|
-
debat?: Debat;
|
|
14
|
-
scrids?: string[];
|
|
15
|
-
scrs?: Scr[];
|
|
16
|
-
}
|
|
17
|
-
export interface DocAtt extends docatt {
|
|
18
|
-
rap?: Rap;
|
|
19
|
-
typatt?: TypAtt;
|
|
20
|
-
}
|
|
21
|
-
export interface Ecr extends ecr {
|
|
22
|
-
aut?: Auteur;
|
|
23
|
-
}
|
|
24
|
-
export interface LecAss extends lecass {
|
|
25
|
-
ass?: Ass;
|
|
26
|
-
auds?: Aud[];
|
|
27
|
-
audcles?: audFields.audcle[];
|
|
28
|
-
datesSeances?: DateSeance[];
|
|
29
|
-
datesSeancesCodes?: dateSeanceFields.code[];
|
|
30
|
-
debatdatseas: Date[];
|
|
31
|
-
lecassraps?: LecAssRap[];
|
|
32
|
-
lecassrapids?: string[];
|
|
33
|
-
org?: Org;
|
|
34
|
-
texcods: texteFields.texcod[];
|
|
35
|
-
textes?: Texte[];
|
|
36
|
-
}
|
|
37
|
-
export interface LecAssRap extends lecassrap {
|
|
38
|
-
rap?: Rap;
|
|
39
|
-
}
|
|
40
|
-
export interface Lecture extends lecture {
|
|
41
|
-
typlec?: TypLec;
|
|
42
|
-
lecassidts?: lecassFields.lecassidt[];
|
|
43
|
-
lecasss?: LecAss[];
|
|
44
|
-
}
|
|
45
|
-
export interface Loi extends loi {
|
|
46
|
-
deccoc?: DecCoc;
|
|
47
|
-
etaloi?: EtaLoi;
|
|
48
|
-
lecidts?: lectureFields.lecidt[];
|
|
49
|
-
lectures?: Lecture[];
|
|
50
|
-
typloi?: TypLoi;
|
|
51
|
-
}
|
|
52
|
-
export interface Rap extends rap {
|
|
53
|
-
denrap?: DenRap;
|
|
54
|
-
docattcles?: docattFields.docattcle[];
|
|
55
|
-
docatts?: DocAtt[];
|
|
56
|
-
ecrnums?: ecrFields.ecrnum[];
|
|
57
|
-
ecrs?: Ecr[];
|
|
58
|
-
orgcods?: raporgFields.orgcod[];
|
|
59
|
-
orgs?: Org[];
|
|
60
|
-
}
|
|
61
|
-
export interface Texte extends texte {
|
|
62
|
-
ecrs?: Ecr[];
|
|
63
|
-
ecrnums?: ecrFields.ecrnum[];
|
|
64
|
-
libtypurl?: typurlFields.libtypurl;
|
|
65
|
-
org?: Org;
|
|
66
|
-
oritxt: OriTxt;
|
|
67
|
-
typtxt?: TypTxt;
|
|
68
|
-
txtAmeli?: TxtAmeli;
|
|
69
|
-
txtAmeliId: txt_ameliFields.id;
|
|
70
|
-
}
|
package/lib/types/dosleg.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/types/questions.d.ts
DELETED
package/lib/types/questions.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/types/sens.d.ts
DELETED
package/lib/types/sens.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/types/sessions.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const UNDEFINED_SESSION = 0;
|
|
2
|
-
declare const sessions: readonly [0, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026];
|
|
3
|
-
export type Session = (typeof sessions)[number];
|
|
4
|
-
export declare function getSessionsFromStart(startSession: Session): (0 | 1958 | 1959 | 1960 | 1961 | 1962 | 1963 | 1964 | 1965 | 1966 | 1967 | 1968 | 1969 | 1970 | 1971 | 1972 | 1973 | 1974 | 1975 | 1976 | 1977 | 1978 | 1979 | 1980 | 1981 | 1982 | 1983 | 1984 | 1985 | 1986 | 1987 | 1988 | 1989 | 1990 | 1991 | 1992 | 1993 | 1994 | 1995 | 1996 | 1997 | 1998 | 1999 | 2000 | 2001 | 2002 | 2003 | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026)[];
|
|
5
|
-
export {};
|
package/lib/types/sessions.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
export const UNDEFINED_SESSION = 0;
|
|
2
|
-
const sessions = [
|
|
3
|
-
UNDEFINED_SESSION,
|
|
4
|
-
1958,
|
|
5
|
-
1959,
|
|
6
|
-
1960,
|
|
7
|
-
1961,
|
|
8
|
-
1962,
|
|
9
|
-
1963,
|
|
10
|
-
1964,
|
|
11
|
-
1965,
|
|
12
|
-
1966,
|
|
13
|
-
1967,
|
|
14
|
-
1968,
|
|
15
|
-
1969,
|
|
16
|
-
1970,
|
|
17
|
-
1971,
|
|
18
|
-
1972,
|
|
19
|
-
1973,
|
|
20
|
-
1974,
|
|
21
|
-
1975,
|
|
22
|
-
1976,
|
|
23
|
-
1977,
|
|
24
|
-
1978,
|
|
25
|
-
1979,
|
|
26
|
-
1980,
|
|
27
|
-
1981,
|
|
28
|
-
1982,
|
|
29
|
-
1983,
|
|
30
|
-
1984,
|
|
31
|
-
1985,
|
|
32
|
-
1986,
|
|
33
|
-
1987,
|
|
34
|
-
1988,
|
|
35
|
-
1989,
|
|
36
|
-
1990,
|
|
37
|
-
1991,
|
|
38
|
-
1992,
|
|
39
|
-
1993,
|
|
40
|
-
1994,
|
|
41
|
-
1995,
|
|
42
|
-
1996,
|
|
43
|
-
1997,
|
|
44
|
-
1998,
|
|
45
|
-
1999,
|
|
46
|
-
2000,
|
|
47
|
-
2001,
|
|
48
|
-
2002,
|
|
49
|
-
2003,
|
|
50
|
-
2004,
|
|
51
|
-
2005,
|
|
52
|
-
2006,
|
|
53
|
-
2007,
|
|
54
|
-
2008,
|
|
55
|
-
2009,
|
|
56
|
-
2010,
|
|
57
|
-
2011,
|
|
58
|
-
2012,
|
|
59
|
-
2013,
|
|
60
|
-
2014,
|
|
61
|
-
2015,
|
|
62
|
-
2016,
|
|
63
|
-
2017,
|
|
64
|
-
2018,
|
|
65
|
-
2019,
|
|
66
|
-
2020,
|
|
67
|
-
2021,
|
|
68
|
-
2022,
|
|
69
|
-
2023,
|
|
70
|
-
2024,
|
|
71
|
-
2025,
|
|
72
|
-
2026,
|
|
73
|
-
// TO COMPLETE EVERY YEAR :)
|
|
74
|
-
];
|
|
75
|
-
export function getSessionsFromStart(startSession) {
|
|
76
|
-
if (startSession === 0) {
|
|
77
|
-
return Array.from(sessions);
|
|
78
|
-
}
|
|
79
|
-
const sessionIndex = sessions.findIndex((session) => startSession === session);
|
|
80
|
-
if (sessionIndex >= 0) {
|
|
81
|
-
return sessions.slice(sessionIndex);
|
|
82
|
-
}
|
|
83
|
-
return [];
|
|
84
|
-
}
|
package/lib/types/texte.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
export declare enum DivisionType {
|
|
2
|
-
tome = 1,
|
|
3
|
-
part = 2,
|
|
4
|
-
book = 3,
|
|
5
|
-
title = 4,
|
|
6
|
-
subtitle = 5,
|
|
7
|
-
chapter = 6,
|
|
8
|
-
section = 7,
|
|
9
|
-
subsection = 8,
|
|
10
|
-
paragraph = 9,
|
|
11
|
-
article = 10,
|
|
12
|
-
alinea = 11,
|
|
13
|
-
division = 12
|
|
14
|
-
}
|
|
15
|
-
export type DivisionTag = keyof typeof DivisionType;
|
|
16
|
-
export interface DocumentMetadata {
|
|
17
|
-
name: string;
|
|
18
|
-
session: number | null | undefined;
|
|
19
|
-
date?: string | null;
|
|
20
|
-
url_expose_des_motifs?: URL;
|
|
21
|
-
url_xml?: URL;
|
|
22
|
-
url_html: URL;
|
|
23
|
-
url_pdf: URL;
|
|
24
|
-
}
|
|
25
|
-
export interface FlatTexte {
|
|
26
|
-
titre: string | null;
|
|
27
|
-
titreCourt: string | null;
|
|
28
|
-
signetDossier: string | null;
|
|
29
|
-
urlDossierSenat: string | null;
|
|
30
|
-
urlDossierAssemblee: string | null;
|
|
31
|
-
type: string | null;
|
|
32
|
-
session: string | null;
|
|
33
|
-
numero: number | null;
|
|
34
|
-
datePresentation: Date | null;
|
|
35
|
-
dateDepot: Date | null;
|
|
36
|
-
datePublicationXml: Date | null;
|
|
37
|
-
version: Version | null;
|
|
38
|
-
workflow: Step[];
|
|
39
|
-
divisions: Division[];
|
|
40
|
-
exposeDesMotifs?: ExposeDesMotifs | null;
|
|
41
|
-
}
|
|
42
|
-
export type Version = "RECT" | "RECT_BIS" | "RECT_TER" | "RECT_QUATER" | "RECT_QUINQUIES";
|
|
43
|
-
export interface Step {
|
|
44
|
-
eId: string;
|
|
45
|
-
date: Date | null;
|
|
46
|
-
type: string | null;
|
|
47
|
-
session: string | null;
|
|
48
|
-
numero: string | null;
|
|
49
|
-
version: Version | null;
|
|
50
|
-
outcome: string | null;
|
|
51
|
-
}
|
|
52
|
-
export interface Division {
|
|
53
|
-
index: number;
|
|
54
|
-
eId: string;
|
|
55
|
-
tag: DivisionTag;
|
|
56
|
-
level: number;
|
|
57
|
-
headings: DivisionContent[];
|
|
58
|
-
}
|
|
59
|
-
export interface Article extends Division {
|
|
60
|
-
alineas: Alinea[];
|
|
61
|
-
}
|
|
62
|
-
export interface DivisionContent {
|
|
63
|
-
text: string | null;
|
|
64
|
-
html?: string | null;
|
|
65
|
-
}
|
|
66
|
-
export interface Alinea extends DivisionContent {
|
|
67
|
-
eId: string;
|
|
68
|
-
heading: DivisionContent;
|
|
69
|
-
pastille: string | null;
|
|
70
|
-
}
|
|
71
|
-
export interface ExposeDesMotifs {
|
|
72
|
-
text: string | null;
|
|
73
|
-
html: string | null;
|
|
74
|
-
}
|
package/lib/types/texte.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/* eslint no-use-before-define: 0 */
|
|
2
|
-
export var DivisionType;
|
|
3
|
-
(function (DivisionType) {
|
|
4
|
-
DivisionType[DivisionType["tome"] = 1] = "tome";
|
|
5
|
-
DivisionType[DivisionType["part"] = 2] = "part";
|
|
6
|
-
DivisionType[DivisionType["book"] = 3] = "book";
|
|
7
|
-
DivisionType[DivisionType["title"] = 4] = "title";
|
|
8
|
-
DivisionType[DivisionType["subtitle"] = 5] = "subtitle";
|
|
9
|
-
DivisionType[DivisionType["chapter"] = 6] = "chapter";
|
|
10
|
-
DivisionType[DivisionType["section"] = 7] = "section";
|
|
11
|
-
DivisionType[DivisionType["subsection"] = 8] = "subsection";
|
|
12
|
-
DivisionType[DivisionType["paragraph"] = 9] = "paragraph";
|
|
13
|
-
DivisionType[DivisionType["article"] = 10] = "article";
|
|
14
|
-
DivisionType[DivisionType["alinea"] = 11] = "alinea";
|
|
15
|
-
DivisionType[DivisionType["division"] = 12] = "division";
|
|
16
|
-
})(DivisionType || (DivisionType = {}));
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Reunion } from "../types/agenda";
|
|
2
|
-
export declare function parseCommissionMetadataFromHtml(html: string, sourceFileName?: string): {
|
|
3
|
-
sourceFile: string | null;
|
|
4
|
-
organeTitleRaw: string | null;
|
|
5
|
-
organeDetected: string | null;
|
|
6
|
-
organeCode: string | null;
|
|
7
|
-
weekStart: string | null;
|
|
8
|
-
days: {
|
|
9
|
-
date: string;
|
|
10
|
-
openTime?: string;
|
|
11
|
-
h2Index: number;
|
|
12
|
-
}[];
|
|
13
|
-
};
|
|
14
|
-
export declare function loadAgendaForDate(dataDir: string, yyyymmdd: string, session: number): Promise<Reunion[]>;
|
|
15
|
-
export declare function linkCRtoCommissionGroup(opts: {
|
|
16
|
-
dataDir: string;
|
|
17
|
-
dateISO: string;
|
|
18
|
-
organeDetected: string | null;
|
|
19
|
-
hourShort: string | null;
|
|
20
|
-
crUid: string;
|
|
21
|
-
titreGuess?: string | null;
|
|
22
|
-
groupUid?: string | null;
|
|
23
|
-
}): Promise<{
|
|
24
|
-
uid: string;
|
|
25
|
-
filePath: string;
|
|
26
|
-
created: boolean;
|
|
27
|
-
updated: boolean;
|
|
28
|
-
}>;
|