@tricoteuses/senat 2.22.16 → 3.0.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 +168 -0
- package/lib/aggregates.d.ts +52 -0
- package/lib/aggregates.js +930 -0
- package/lib/aggregates.mjs +713 -0
- package/lib/aggregates.ts +833 -0
- package/lib/config.d.ts +10 -0
- package/lib/config.js +16 -0
- package/lib/config.mjs +16 -0
- package/lib/config.ts +26 -0
- package/lib/databases.d.ts +2 -0
- package/lib/databases.js +26 -0
- package/lib/databases.mjs +57 -0
- package/lib/databases.ts +71 -0
- package/lib/datasets.d.ts +34 -0
- package/lib/datasets.js +233 -0
- package/lib/datasets.mjs +78 -0
- package/lib/datasets.ts +118 -0
- package/lib/fields.d.ts +10 -0
- package/lib/fields.js +68 -0
- package/lib/fields.mjs +22 -0
- package/lib/fields.ts +29 -0
- package/lib/git.d.ts +26 -0
- package/lib/git.js +167 -0
- package/lib/index.d.ts +13 -0
- package/lib/index.js +1 -0
- package/lib/index.mjs +7 -0
- package/lib/index.ts +64 -0
- package/lib/inserters.d.ts +98 -0
- package/lib/inserters.js +500 -0
- package/lib/inserters.mjs +360 -0
- package/lib/inserters.ts +521 -0
- package/lib/legislatures.json +38 -0
- package/lib/loaders.d.ts +58 -0
- package/lib/loaders.js +286 -0
- package/lib/loaders.mjs +158 -0
- package/lib/loaders.ts +271 -0
- package/lib/model/agenda.d.ts +6 -0
- package/lib/model/agenda.js +148 -0
- package/lib/model/ameli.d.ts +51 -0
- package/lib/model/ameli.js +149 -0
- package/lib/model/ameli.mjs +84 -0
- package/lib/model/ameli.ts +100 -0
- package/lib/model/commission.d.ts +18 -0
- package/lib/model/commission.js +269 -0
- package/lib/model/debats.d.ts +67 -0
- package/lib/model/debats.js +95 -0
- package/lib/model/debats.mjs +43 -0
- package/lib/model/debats.ts +68 -0
- package/lib/model/documents.d.ts +12 -0
- package/lib/model/documents.js +151 -0
- package/lib/model/dosleg.d.ts +7 -0
- package/lib/model/dosleg.js +326 -0
- package/lib/model/dosleg.mjs +196 -0
- package/lib/model/dosleg.ts +240 -0
- package/lib/model/index.d.ts +7 -0
- package/lib/model/index.js +7 -0
- package/lib/model/index.mjs +5 -0
- package/lib/model/index.ts +15 -0
- package/lib/model/questions.d.ts +45 -0
- package/lib/model/questions.js +89 -0
- package/lib/model/questions.mjs +71 -0
- package/lib/model/questions.ts +93 -0
- package/lib/model/scrutins.d.ts +13 -0
- package/lib/model/scrutins.js +114 -0
- package/lib/model/seance.d.ts +3 -0
- package/lib/model/seance.js +267 -0
- package/lib/model/sens.d.ts +146 -0
- package/lib/model/sens.js +454 -0
- package/lib/model/sens.mjs +415 -0
- package/lib/model/sens.ts +516 -0
- package/lib/model/texte.d.ts +7 -0
- package/lib/model/texte.js +256 -0
- package/lib/model/texte.mjs +208 -0
- package/lib/model/texte.ts +229 -0
- package/lib/model/util.d.ts +9 -0
- package/lib/model/util.js +38 -0
- package/lib/model/util.mjs +19 -0
- package/lib/model/util.ts +32 -0
- package/lib/parsers/texte.d.ts +7 -0
- package/lib/parsers/texte.js +228 -0
- package/lib/raw_types/ameli.d.ts +914 -0
- package/lib/raw_types/ameli.js +5 -0
- package/lib/raw_types/ameli.mjs +163 -0
- package/lib/raw_types/debats.d.ts +207 -0
- package/lib/raw_types/debats.js +5 -0
- package/lib/raw_types/debats.mjs +58 -0
- package/lib/raw_types/dosleg.d.ts +1619 -0
- package/lib/raw_types/dosleg.js +5 -0
- package/lib/raw_types/dosleg.mjs +438 -0
- package/lib/raw_types/questions.d.ts +419 -0
- package/lib/raw_types/questions.js +5 -0
- package/lib/raw_types/questions.mjs +11 -0
- package/lib/raw_types/senat.d.ts +11368 -0
- package/lib/raw_types/senat.js +5 -0
- package/lib/raw_types/sens.d.ts +8248 -0
- package/lib/raw_types/sens.js +5 -0
- package/lib/raw_types/sens.mjs +508 -0
- package/lib/raw_types_kysely/ameli.d.ts +915 -0
- package/lib/raw_types_kysely/ameli.js +7 -0
- package/lib/raw_types_kysely/ameli.mjs +5 -0
- package/lib/raw_types_kysely/ameli.ts +951 -0
- package/lib/raw_types_kysely/debats.d.ts +207 -0
- package/lib/raw_types_kysely/debats.js +7 -0
- package/lib/raw_types_kysely/debats.mjs +5 -0
- package/lib/raw_types_kysely/debats.ts +222 -0
- package/lib/raw_types_kysely/dosleg.d.ts +3532 -0
- package/lib/raw_types_kysely/dosleg.js +7 -0
- package/lib/raw_types_kysely/dosleg.mjs +5 -0
- package/lib/raw_types_kysely/dosleg.ts +3621 -0
- package/lib/raw_types_kysely/questions.d.ts +414 -0
- package/lib/raw_types_kysely/questions.js +7 -0
- package/lib/raw_types_kysely/questions.mjs +5 -0
- package/lib/raw_types_kysely/questions.ts +426 -0
- package/lib/raw_types_kysely/sens.d.ts +4394 -0
- package/lib/raw_types_kysely/sens.js +7 -0
- package/lib/raw_types_kysely/sens.mjs +5 -0
- package/lib/raw_types_kysely/sens.ts +4499 -0
- package/lib/raw_types_schemats/ameli.d.ts +539 -0
- package/lib/raw_types_schemats/ameli.js +2 -0
- package/lib/raw_types_schemats/ameli.mjs +2 -0
- package/lib/raw_types_schemats/ameli.ts +601 -0
- package/lib/raw_types_schemats/debats.d.ts +127 -0
- package/lib/raw_types_schemats/debats.js +2 -0
- package/lib/raw_types_schemats/debats.mjs +2 -0
- package/lib/raw_types_schemats/debats.ts +145 -0
- package/lib/raw_types_schemats/dosleg.d.ts +977 -0
- package/lib/raw_types_schemats/dosleg.js +2 -0
- package/lib/raw_types_schemats/dosleg.mjs +2 -0
- package/lib/raw_types_schemats/dosleg.ts +2193 -0
- package/lib/raw_types_schemats/questions.d.ts +235 -0
- package/lib/raw_types_schemats/questions.js +2 -0
- package/lib/raw_types_schemats/questions.mjs +2 -0
- package/lib/raw_types_schemats/questions.ts +249 -0
- package/lib/raw_types_schemats/sens.d.ts +6915 -0
- package/lib/raw_types_schemats/sens.js +2 -0
- package/lib/raw_types_schemats/sens.mjs +2 -0
- package/lib/raw_types_schemats/sens.ts +2907 -0
- package/lib/scripts/convert_data.d.ts +1 -0
- package/lib/scripts/convert_data.js +354 -0
- package/lib/scripts/convert_data.mjs +181 -0
- package/lib/scripts/convert_data.ts +243 -0
- package/lib/scripts/data-download.d.ts +1 -0
- package/lib/scripts/data-download.js +12 -0
- package/lib/scripts/datautil.d.ts +8 -0
- package/lib/scripts/datautil.js +34 -0
- package/lib/scripts/datautil.mjs +16 -0
- package/lib/scripts/datautil.ts +19 -0
- package/lib/scripts/images/transparent_150x192.jpg +0 -0
- package/lib/scripts/images/transparent_155x225.jpg +0 -0
- package/lib/scripts/parse_textes.d.ts +1 -0
- package/lib/scripts/parse_textes.js +44 -0
- package/lib/scripts/parse_textes.mjs +46 -0
- package/lib/scripts/parse_textes.ts +65 -0
- package/lib/scripts/retrieve_agenda.d.ts +1 -0
- package/lib/scripts/retrieve_agenda.js +132 -0
- package/lib/scripts/retrieve_cr_commission.d.ts +1 -0
- package/lib/scripts/retrieve_cr_commission.js +364 -0
- package/lib/scripts/retrieve_cr_seance.d.ts +6 -0
- package/lib/scripts/retrieve_cr_seance.js +347 -0
- package/lib/scripts/retrieve_documents.d.ts +3 -0
- package/lib/scripts/retrieve_documents.js +219 -0
- package/lib/scripts/retrieve_documents.mjs +249 -0
- package/lib/scripts/retrieve_documents.ts +298 -0
- package/lib/scripts/retrieve_open_data.d.ts +1 -0
- package/lib/scripts/retrieve_open_data.js +315 -0
- package/lib/scripts/retrieve_open_data.mjs +217 -0
- package/lib/scripts/retrieve_open_data.ts +268 -0
- package/lib/scripts/retrieve_senateurs_photos.d.ts +1 -0
- package/lib/scripts/retrieve_senateurs_photos.js +147 -0
- package/lib/scripts/retrieve_senateurs_photos.mjs +147 -0
- package/lib/scripts/retrieve_senateurs_photos.ts +177 -0
- package/lib/scripts/retrieve_videos.d.ts +1 -0
- package/lib/scripts/retrieve_videos.js +461 -0
- package/lib/scripts/shared/cli_helpers.d.ts +95 -0
- package/lib/scripts/shared/cli_helpers.js +91 -0
- package/lib/scripts/shared/cli_helpers.ts +36 -0
- package/lib/scripts/shared/util.d.ts +4 -0
- package/lib/scripts/shared/util.js +35 -0
- package/lib/scripts/shared/util.ts +33 -0
- package/lib/scripts/test_iter_load.d.ts +1 -0
- package/lib/scripts/test_iter_load.js +12 -0
- package/lib/src/config.d.ts +22 -0
- package/lib/src/config.js +17 -7
- package/lib/src/conversion_textes.js +5 -1
- package/lib/src/databases.d.ts +2 -1
- package/lib/src/databases_postgres.d.ts +4 -0
- package/lib/src/databases_postgres.js +23 -0
- package/lib/src/datasets.d.ts +4 -0
- package/lib/src/datasets.js +16 -2
- package/lib/src/git.d.ts +1 -0
- package/lib/src/git.js +45 -11
- package/lib/src/index.d.ts +19 -8
- package/lib/src/index.js +6 -1
- package/lib/src/loaders.js +10 -4
- package/lib/src/model/agenda.js +2 -2
- package/lib/src/model/ameli.d.ts +64 -52
- package/lib/src/model/ameli.js +147 -145
- package/lib/src/model/ameli_postgres.d.ts +67 -0
- package/lib/src/model/ameli_postgres.js +150 -0
- package/lib/src/model/commission.d.ts +3 -2
- package/lib/src/model/commission.js +2 -2
- package/lib/src/model/debats.d.ts +38 -66
- package/lib/src/model/debats.js +110 -93
- package/lib/src/model/documents.d.ts +32 -12
- package/lib/src/model/documents.js +171 -130
- package/lib/src/model/dosleg.d.ts +142 -5
- package/lib/src/model/dosleg.js +298 -156
- package/lib/src/model/questions.d.ts +54 -45
- package/lib/src/model/questions.js +89 -87
- package/lib/src/model/scrutins.d.ts +48 -13
- package/lib/src/model/scrutins.js +118 -111
- package/lib/src/model/seance.js +3 -3
- package/lib/src/model/sens.d.ts +109 -179
- package/lib/src/model/sens.js +384 -484
- package/lib/src/model/util.d.ts +0 -8
- package/lib/src/model/util.js +0 -23
- package/lib/src/parsers/texte.js +7 -7
- package/lib/src/raw_types/ameli.d.ts +1651 -803
- package/lib/src/raw_types/ameli.js +1816 -5
- package/lib/src/raw_types/debats.d.ts +353 -180
- package/lib/src/raw_types/debats.js +517 -5
- package/lib/src/raw_types/dosleg.d.ts +2862 -1527
- package/lib/src/raw_types/dosleg.js +4354 -5
- package/lib/src/raw_types/questions.d.ts +671 -395
- package/lib/src/raw_types/questions.js +1303 -5
- package/lib/src/raw_types/sens.d.ts +7743 -8148
- package/lib/src/raw_types/sens.js +10429 -5
- package/lib/src/raw_types_schemats/ameli.d.ts +4 -2
- package/lib/src/raw_types_schemats/debats.d.ts +2 -2
- package/lib/src/raw_types_schemats/dosleg.d.ts +2 -2
- package/lib/src/raw_types_schemats/questions.d.ts +2 -2
- package/lib/src/raw_types_schemats/sens.d.ts +10 -4216
- package/lib/src/scripts/convert_data.js +7 -6
- package/lib/src/scripts/convert_xml_to_html.js +2 -2
- package/lib/src/scripts/data-download.js +3 -2
- package/lib/src/scripts/retrieve_agenda.js +21 -9
- package/lib/src/scripts/retrieve_cr_commission.js +17 -17
- package/lib/src/scripts/retrieve_cr_seance.d.ts +14 -1
- package/lib/src/scripts/retrieve_cr_seance.js +10 -11
- package/lib/src/scripts/retrieve_documents.d.ts +11 -2
- package/lib/src/scripts/retrieve_documents.js +25 -14
- package/lib/src/scripts/retrieve_open_data.js +514 -153
- package/lib/src/scripts/retrieve_senateurs_photos.js +25 -11
- package/lib/src/scripts/retrieve_videos.js +12 -11
- package/lib/src/scripts/shared/cli_helpers.d.ts +1 -6
- package/lib/src/scripts/shared/cli_helpers.js +9 -8
- package/lib/src/scripts/shared/incremental_import_sql.d.ts +2 -0
- package/lib/src/scripts/shared/incremental_import_sql.js +894 -0
- package/lib/src/scripts/shared/prefixed_tables.d.ts +10 -0
- package/lib/src/scripts/shared/prefixed_tables.js +36 -0
- package/lib/src/scripts/shared/schema_version.d.ts +3 -0
- package/lib/src/scripts/shared/schema_version.js +97 -0
- package/lib/src/scripts/shared/staging_import.d.ts +3 -0
- package/lib/src/scripts/shared/staging_import.js +80 -0
- package/lib/src/scripts/shared/staging_metadata_sql.d.ts +1 -0
- package/lib/src/scripts/shared/staging_metadata_sql.js +221 -0
- package/lib/src/scripts/validate_prefixed_tables.d.ts +1 -0
- package/lib/src/scripts/validate_prefixed_tables.js +101 -0
- package/lib/src/types/ameli.d.ts +4 -4
- package/lib/src/types/debats.d.ts +2 -2
- package/lib/src/types/dosleg.d.ts +39 -39
- package/lib/src/types/questions.d.ts +2 -2
- package/lib/src/types/sens.d.ts +0 -2
- package/lib/src/types/texte.d.ts +1 -1
- package/lib/src/utils/cr_spliting.d.ts +9 -6
- package/lib/src/utils/cr_spliting.js +6 -101
- package/lib/src/utils/reunion_odj_building.d.ts +7 -3
- package/lib/src/utils/reunion_parsing.d.ts +2 -1
- package/lib/src/utils/reunion_parsing.js +2 -2
- package/lib/src/videos/match.js +8 -5
- package/lib/src/videos/pipeline.d.ts +6 -2
- package/lib/src/videos/pipeline.js +21 -8
- package/lib/src/videos/search.js +6 -2
- package/lib/strings.d.ts +1 -0
- package/lib/strings.js +18 -0
- package/lib/strings.mjs +18 -0
- package/lib/strings.ts +26 -0
- package/lib/tests/incrementalImportSql.test.d.ts +1 -0
- package/lib/tests/incrementalImportSql.test.js +155 -0
- package/lib/tests/prefixedTables.test.d.ts +1 -0
- package/lib/tests/prefixedTables.test.js +22 -0
- package/lib/tests/schemaVersion.test.d.ts +1 -0
- package/lib/tests/schemaVersion.test.js +23 -0
- package/lib/tests/validatePrefixedTables.test.d.ts +1 -0
- package/lib/tests/validatePrefixedTables.test.js +14 -0
- package/lib/types/agenda.d.ts +44 -0
- package/lib/types/agenda.js +1 -0
- package/lib/types/ameli.d.ts +5 -0
- package/lib/types/ameli.js +1 -0
- package/lib/types/ameli.mjs +13 -0
- package/lib/types/ameli.ts +21 -0
- package/lib/types/compte_rendu.d.ts +83 -0
- package/lib/types/compte_rendu.js +1 -0
- package/lib/types/debats.d.ts +2 -0
- package/lib/types/debats.js +1 -0
- package/lib/types/debats.mjs +2 -0
- package/lib/types/debats.ts +6 -0
- package/lib/types/dosleg.d.ts +70 -0
- package/lib/types/dosleg.js +1 -0
- package/lib/types/dosleg.mjs +151 -0
- package/lib/types/dosleg.ts +284 -0
- package/lib/types/questions.d.ts +2 -0
- package/lib/types/questions.js +1 -0
- package/lib/types/questions.mjs +1 -0
- package/lib/types/questions.ts +3 -0
- package/lib/types/sens.d.ts +10 -0
- package/lib/types/sens.js +1 -0
- package/lib/types/sens.mjs +1 -0
- package/lib/types/sens.ts +12 -0
- package/lib/types/sessions.d.ts +5 -0
- package/lib/types/sessions.js +84 -0
- package/lib/types/sessions.mjs +43 -0
- package/lib/types/sessions.ts +42 -0
- package/lib/types/texte.d.ts +74 -0
- package/lib/types/texte.js +16 -0
- package/lib/types/texte.mjs +16 -0
- package/lib/types/texte.ts +76 -0
- package/lib/typings/windows-1252.d.js +2 -0
- package/lib/typings/windows-1252.d.mjs +2 -0
- package/lib/typings/windows-1252.d.ts +11 -0
- package/lib/utils/cr_spliting.d.ts +28 -0
- package/lib/utils/cr_spliting.js +265 -0
- package/lib/utils/date.d.ts +10 -0
- package/lib/utils/date.js +100 -0
- package/lib/utils/nvs-timecode.d.ts +7 -0
- package/lib/utils/nvs-timecode.js +79 -0
- package/lib/utils/reunion_grouping.d.ts +9 -0
- package/lib/utils/reunion_grouping.js +361 -0
- package/lib/utils/reunion_odj_building.d.ts +5 -0
- package/lib/utils/reunion_odj_building.js +154 -0
- package/lib/utils/reunion_parsing.d.ts +23 -0
- package/lib/utils/reunion_parsing.js +209 -0
- package/lib/utils/scoring.d.ts +14 -0
- package/lib/utils/scoring.js +147 -0
- package/lib/utils/string_cleaning.d.ts +7 -0
- package/lib/utils/string_cleaning.js +57 -0
- package/lib/validators/config.d.ts +9 -0
- package/lib/validators/config.js +10 -0
- package/lib/validators/config.mjs +54 -0
- package/lib/validators/config.ts +79 -0
- package/lib/validators/senat.d.ts +0 -0
- package/lib/validators/senat.js +28 -0
- package/lib/validators/senat.mjs +24 -0
- package/lib/validators/senat.ts +26 -0
- package/package.json +11 -11
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export type {
|
|
6
|
-
export interface Aud extends
|
|
1
|
+
import { Ass, Aud as AudRaw, Auteur as AuteurRaw, DateSeance as DateSeanceRaw, Deccoc, Denrap, Docatt as DocattRaw, Ecr as EcrRaw, Etaloi, Lecass as LecassRaw, Lecassrap as LecassrapRaw, Lecture as LectureRaw, Loi as LoiRaw, Org, Oritxt, Qua, Rap as RapRaw, Raporg, Scr, Texte as TexteRaw, Typatt, Typlec, Typloi, Typtxt, Typurl } from "../raw_types/dosleg";
|
|
2
|
+
import { TxtAmeli } from "../raw_types/ameli";
|
|
3
|
+
import { Debats } from "../raw_types/debats";
|
|
4
|
+
import { TxtAmeliCustom } from "./ameli";
|
|
5
|
+
export type { Deccoc as DecCoc, Denrap as DenRap, Etaloi as EtaLoi, Oritxt as OriTxt, Raporg as RapOrg, Typatt as TypAtt, Typlec as TypLec, Typloi as TypLoi, Typtxt as TypTxt, Typurl as TypUrl, };
|
|
6
|
+
export interface Aud extends AudRaw {
|
|
7
7
|
org?: Org;
|
|
8
8
|
}
|
|
9
|
-
export interface Auteur extends
|
|
9
|
+
export interface Auteur extends AuteurRaw {
|
|
10
10
|
qua?: Qua;
|
|
11
11
|
}
|
|
12
|
-
export interface DateSeance extends
|
|
13
|
-
debat?:
|
|
12
|
+
export interface DateSeance extends DateSeanceRaw {
|
|
13
|
+
debat?: Debats;
|
|
14
14
|
scrids?: string[];
|
|
15
15
|
scrs?: Scr[];
|
|
16
16
|
}
|
|
17
|
-
export interface DocAtt extends
|
|
18
|
-
rap?:
|
|
19
|
-
typatt?:
|
|
17
|
+
export interface DocAtt extends DocattRaw {
|
|
18
|
+
rap?: RapRaw;
|
|
19
|
+
typatt?: Typatt;
|
|
20
20
|
}
|
|
21
|
-
export interface Ecr extends
|
|
21
|
+
export interface Ecr extends EcrRaw {
|
|
22
22
|
aut?: Auteur;
|
|
23
23
|
}
|
|
24
|
-
export interface LecAss extends
|
|
24
|
+
export interface LecAss extends LecassRaw {
|
|
25
25
|
ass?: Ass;
|
|
26
26
|
auds?: Aud[];
|
|
27
|
-
audcles?:
|
|
27
|
+
audcles?: AudRaw["audcle"][];
|
|
28
28
|
datesSeances?: DateSeance[];
|
|
29
|
-
datesSeancesCodes?:
|
|
29
|
+
datesSeancesCodes?: DateSeanceRaw["code"][];
|
|
30
30
|
debatdatseas: Date[];
|
|
31
31
|
lecassraps?: LecAssRap[];
|
|
32
32
|
lecassrapids?: string[];
|
|
33
33
|
org?: Org;
|
|
34
|
-
texcods:
|
|
34
|
+
texcods: TexteRaw["texcod"][];
|
|
35
35
|
textes?: Texte[];
|
|
36
36
|
}
|
|
37
|
-
export interface LecAssRap extends
|
|
38
|
-
rap?:
|
|
37
|
+
export interface LecAssRap extends LecassrapRaw {
|
|
38
|
+
rap?: RapRaw;
|
|
39
39
|
}
|
|
40
|
-
export interface Lecture extends
|
|
41
|
-
typlec?:
|
|
42
|
-
lecassidts?:
|
|
40
|
+
export interface Lecture extends LectureRaw {
|
|
41
|
+
typlec?: Typlec;
|
|
42
|
+
lecassidts?: LecassRaw["lecassidt"][];
|
|
43
43
|
lecasss?: LecAss[];
|
|
44
44
|
}
|
|
45
|
-
export interface Loi extends
|
|
46
|
-
deccoc?:
|
|
47
|
-
etaloi?:
|
|
48
|
-
lecidts?:
|
|
45
|
+
export interface Loi extends LoiRaw {
|
|
46
|
+
deccoc?: Deccoc;
|
|
47
|
+
etaloi?: Etaloi;
|
|
48
|
+
lecidts?: LectureRaw["lecidt"][];
|
|
49
49
|
lectures?: Lecture[];
|
|
50
|
-
typloi?:
|
|
50
|
+
typloi?: Typloi;
|
|
51
51
|
}
|
|
52
|
-
export interface Rap extends
|
|
53
|
-
denrap?:
|
|
54
|
-
docattcles?:
|
|
52
|
+
export interface Rap extends RapRaw {
|
|
53
|
+
denrap?: Denrap;
|
|
54
|
+
docattcles?: DocattRaw["docattcle"][];
|
|
55
55
|
docatts?: DocAtt[];
|
|
56
|
-
ecrnums?:
|
|
56
|
+
ecrnums?: EcrRaw["ecrnum"][];
|
|
57
57
|
ecrs?: Ecr[];
|
|
58
|
-
orgcods?:
|
|
58
|
+
orgcods?: Raporg["orgcod"][];
|
|
59
59
|
orgs?: Org[];
|
|
60
60
|
}
|
|
61
|
-
export interface Texte extends
|
|
61
|
+
export interface Texte extends TexteRaw {
|
|
62
62
|
ecrs?: Ecr[];
|
|
63
|
-
ecrnums?:
|
|
64
|
-
libtypurl?:
|
|
63
|
+
ecrnums?: EcrRaw["ecrnum"][];
|
|
64
|
+
libtypurl?: Typurl["libtypurl"];
|
|
65
65
|
org?: Org;
|
|
66
|
-
oritxt:
|
|
67
|
-
typtxt?:
|
|
68
|
-
txtAmeli?:
|
|
69
|
-
txtAmeliId:
|
|
66
|
+
oritxt: Oritxt;
|
|
67
|
+
typtxt?: Typtxt;
|
|
68
|
+
txtAmeli?: TxtAmeliCustom;
|
|
69
|
+
txtAmeliId: TxtAmeli["id"];
|
|
70
70
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type { Question };
|
|
1
|
+
import { TamQuestions } from "../raw_types/questions";
|
|
2
|
+
export type { TamQuestions as Question };
|
package/lib/src/types/sens.d.ts
CHANGED
package/lib/src/types/texte.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface DocumentMetadata {
|
|
|
23
23
|
url_html: URL;
|
|
24
24
|
url_pdf: URL;
|
|
25
25
|
}
|
|
26
|
-
export interface FlatTexte extends DocumentResult {
|
|
26
|
+
export interface FlatTexte extends Partial<DocumentResult> {
|
|
27
27
|
titre: string | null;
|
|
28
28
|
titre_court: string | null;
|
|
29
29
|
url_dossier_senat: string | null;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { Reunion } from "../types/agenda";
|
|
2
|
-
|
|
2
|
+
type MetadataDay = {
|
|
3
|
+
date: string;
|
|
4
|
+
openTime?: string;
|
|
5
|
+
h2Index: number;
|
|
6
|
+
};
|
|
7
|
+
type CommissionMetadata = {
|
|
3
8
|
sourceFile: string | null;
|
|
4
9
|
organeTitleRaw: string | null;
|
|
5
10
|
organeDetected: string | null;
|
|
6
11
|
organeCode: string | null;
|
|
7
12
|
weekStart: string | null;
|
|
8
|
-
days:
|
|
9
|
-
date: string;
|
|
10
|
-
openTime?: string;
|
|
11
|
-
h2Index: number;
|
|
12
|
-
}[];
|
|
13
|
+
days: MetadataDay[];
|
|
13
14
|
};
|
|
15
|
+
export declare function parseCommissionMetadataFromHtml(html: string, sourceFileName?: string): CommissionMetadata;
|
|
14
16
|
export declare function loadAgendaForDate(dataDir: string, yyyymmdd: string, session: number): Promise<Reunion[]>;
|
|
15
17
|
export declare function linkCRtoCommissionGroup(opts: {
|
|
16
18
|
dataDir: string;
|
|
@@ -26,3 +28,4 @@ export declare function linkCRtoCommissionGroup(opts: {
|
|
|
26
28
|
created: boolean;
|
|
27
29
|
updated: boolean;
|
|
28
30
|
}>;
|
|
31
|
+
export {};
|
|
@@ -5,106 +5,6 @@ import fs from "fs-extra";
|
|
|
5
5
|
import { sessionStartYearFromDate } from "../model/seance";
|
|
6
6
|
import { frDateToISO, hourShortToStartTime } from "./date";
|
|
7
7
|
import { normalizeSpaces } from "./string_cleaning";
|
|
8
|
-
// Convert "quinze heures trente", "15 heures 30", "dix-sept heures moins le quart", etc. en "HHMM"
|
|
9
|
-
function parseFrenchClockToHHMM(input) {
|
|
10
|
-
const s = (input || "")
|
|
11
|
-
.toLowerCase()
|
|
12
|
-
.normalize("NFKD")
|
|
13
|
-
.replace(/[\u0300-\u036f]/g, "")
|
|
14
|
-
.trim();
|
|
15
|
-
if (!s)
|
|
16
|
-
return undefined;
|
|
17
|
-
const digitMatch = s.match(/(\d{1,2})\s*heures?(?:\s*(\d{1,2}))?/);
|
|
18
|
-
if (digitMatch) {
|
|
19
|
-
const h = Math.min(24, Math.max(0, parseInt(digitMatch[1], 10)));
|
|
20
|
-
const m = digitMatch[2] ? Math.min(59, Math.max(0, parseInt(digitMatch[2], 10))) : 0;
|
|
21
|
-
return `${String(h).padStart(2, "0")}${String(m).padStart(2, "0")}`;
|
|
22
|
-
}
|
|
23
|
-
const NUM = new Map([
|
|
24
|
-
["zero", 0],
|
|
25
|
-
["une", 1],
|
|
26
|
-
["un", 1],
|
|
27
|
-
["deux", 2],
|
|
28
|
-
["trois", 3],
|
|
29
|
-
["quatre", 4],
|
|
30
|
-
["cinq", 5],
|
|
31
|
-
["six", 6],
|
|
32
|
-
["sept", 7],
|
|
33
|
-
["huit", 8],
|
|
34
|
-
["neuf", 9],
|
|
35
|
-
["dix", 10],
|
|
36
|
-
["onze", 11],
|
|
37
|
-
["douze", 12],
|
|
38
|
-
["treize", 13],
|
|
39
|
-
["quatorze", 14],
|
|
40
|
-
["quinze", 15],
|
|
41
|
-
["seize", 16],
|
|
42
|
-
["dix-sept", 17],
|
|
43
|
-
["dix sept", 17],
|
|
44
|
-
["dix-huit", 18],
|
|
45
|
-
["dix huit", 18],
|
|
46
|
-
["dix-neuf", 19],
|
|
47
|
-
["dix neuf", 19],
|
|
48
|
-
["vingt", 20],
|
|
49
|
-
["vingt et une", 21],
|
|
50
|
-
["vingt-et-une", 21],
|
|
51
|
-
["vingt et un", 21],
|
|
52
|
-
["vingt-et-un", 21],
|
|
53
|
-
["vingt-deux", 22],
|
|
54
|
-
["vingt deux", 22],
|
|
55
|
-
["vingt-trois", 23],
|
|
56
|
-
["vingt trois", 23],
|
|
57
|
-
["vingt-quatre", 24],
|
|
58
|
-
["vingt quatre", 24],
|
|
59
|
-
]);
|
|
60
|
-
const hourWordMatch = s.match(/([a-z\- ]+?)\s*heures?/);
|
|
61
|
-
if (!hourWordMatch)
|
|
62
|
-
return undefined;
|
|
63
|
-
const hourWord = hourWordMatch[1].trim();
|
|
64
|
-
let hour = NUM.get(hourWord);
|
|
65
|
-
if (hour == null) {
|
|
66
|
-
const cleaned = hourWord.replace(/\s+/g, " ");
|
|
67
|
-
hour = NUM.get(cleaned);
|
|
68
|
-
}
|
|
69
|
-
if (hour == null)
|
|
70
|
-
return undefined;
|
|
71
|
-
let minutes = 0;
|
|
72
|
-
if (/\bet (demie|demi)\b/.test(s))
|
|
73
|
-
minutes = 30;
|
|
74
|
-
else if (/\bet quart\b/.test(s))
|
|
75
|
-
minutes = 15;
|
|
76
|
-
else if (/\bmoins le quart\b/.test(s)) {
|
|
77
|
-
hour = (hour + 23) % 24;
|
|
78
|
-
minutes = 45;
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
const MIN = new Map([
|
|
82
|
-
["cinq", 5],
|
|
83
|
-
["dix", 10],
|
|
84
|
-
["quinze", 15],
|
|
85
|
-
["vingt", 20],
|
|
86
|
-
["vingt-cinq", 25],
|
|
87
|
-
["vingt cinq", 25],
|
|
88
|
-
["trente", 30],
|
|
89
|
-
["trente-cinq", 35],
|
|
90
|
-
["trente cinq", 35],
|
|
91
|
-
["quarante", 40],
|
|
92
|
-
["quarante-cinq", 45],
|
|
93
|
-
["quarante cinq", 45],
|
|
94
|
-
["cinquante", 50],
|
|
95
|
-
["cinquante-cinq", 55],
|
|
96
|
-
["cinquante cinq", 55],
|
|
97
|
-
]);
|
|
98
|
-
const minWordMatch = s.match(/heures?\s+([a-z\- ]+?)(?:[).,;]|$)/);
|
|
99
|
-
if (minWordMatch) {
|
|
100
|
-
const mw = minWordMatch[1].trim();
|
|
101
|
-
const m1 = MIN.get(mw);
|
|
102
|
-
if (m1 != null)
|
|
103
|
-
minutes = m1;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return `${String(hour).padStart(2, "0")}${String(minutes).padStart(2, "0")}`;
|
|
107
|
-
}
|
|
108
8
|
function extractWeekStartFromHead($) {
|
|
109
9
|
const og = $('meta[property="og:title"]').attr("content") || $("title").text();
|
|
110
10
|
const m = (og ?? "").toLowerCase().match(/semaine du\s+(\d{1,2}\s+\w+\s+\d{4})/i);
|
|
@@ -181,7 +81,12 @@ export function parseCommissionMetadataFromHtml(html, sourceFileName) {
|
|
|
181
81
|
};
|
|
182
82
|
}
|
|
183
83
|
function isGroupedReunion(o) {
|
|
184
|
-
return
|
|
84
|
+
return (typeof o === "object" &&
|
|
85
|
+
o !== null &&
|
|
86
|
+
"uid" in o &&
|
|
87
|
+
typeof o.uid === "string" &&
|
|
88
|
+
"date" in o &&
|
|
89
|
+
typeof o.date === "string");
|
|
185
90
|
}
|
|
186
91
|
export async function loadAgendaForDate(dataDir, yyyymmdd, session) {
|
|
187
92
|
const baseDir = path.join(dataDir, AGENDA_FOLDER, DATA_TRANSFORMED_FOLDER, String(session));
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import commandLineArgs from "command-line-args";
|
|
2
|
-
import { DossierLegislatifResult } from "../model/dosleg";
|
|
2
|
+
import { ActeLegislatif, DossierLegislatifResult } from "../model/dosleg";
|
|
3
3
|
import { AgendaEvent, ReunionOdj } from "../types/agenda";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type DossierWithActes = DossierLegislatifResult & {
|
|
5
|
+
actes_legislatifs?: ActeLegislatif[] | null;
|
|
6
|
+
};
|
|
7
|
+
export declare function buildOdj(events: AgendaEvent[], dossierBySenatUrl: Record<string, DossierWithActes>): ReunionOdj | undefined;
|
|
8
|
+
export declare function buildSenatDossierIndex(options: commandLineArgs.CommandLineOptions): Record<string, DossierWithActes>;
|
|
9
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DateTime } from "luxon";
|
|
2
|
+
import type { AnyNode } from "domhandler";
|
|
2
3
|
import { AgendaEvent, Reunion } from "../types/agenda";
|
|
3
4
|
import { DossierLegislatifResult } from "../model/dosleg";
|
|
4
5
|
import * as cheerio from "cheerio";
|
|
@@ -18,6 +19,6 @@ export type SommaireBlock = {
|
|
|
18
19
|
startIndex: number;
|
|
19
20
|
targetId?: string | null;
|
|
20
21
|
};
|
|
21
|
-
export declare function extractSommaireBlocks($: cheerio.CheerioAPI, idx: Map<
|
|
22
|
+
export declare function extractSommaireBlocks($: cheerio.CheerioAPI, idx: Map<AnyNode, number>): SommaireBlock[];
|
|
22
23
|
export declare function parseISO(iso: string | null | undefined): DateTime | null;
|
|
23
24
|
export {};
|
|
@@ -50,8 +50,8 @@ export function buildReunionsByBucket(events, dossierBySenatUrl) {
|
|
|
50
50
|
for (const e of events) {
|
|
51
51
|
const kind = classifyAgendaType(e?.type);
|
|
52
52
|
if (!kind) {
|
|
53
|
-
continue;
|
|
54
53
|
console.warn("Can't determine type of reunion");
|
|
54
|
+
continue;
|
|
55
55
|
}
|
|
56
56
|
const bucket = typeToSuffixStrict(kind);
|
|
57
57
|
const uid = makeReunionUid(e.date, kind, e.id, e.organe ?? null);
|
|
@@ -83,7 +83,7 @@ function classifyAgendaType(typeLabel) {
|
|
|
83
83
|
return "MC";
|
|
84
84
|
if (/\boffices\b|\bdelegations\b/.test(s))
|
|
85
85
|
return "OD";
|
|
86
|
-
if (
|
|
86
|
+
if (/instances\b|decisionelles\b/.test(s))
|
|
87
87
|
return "ID";
|
|
88
88
|
return null;
|
|
89
89
|
}
|
package/lib/src/videos/match.js
CHANGED
|
@@ -8,11 +8,14 @@ export async function matchOneReunion(args) {
|
|
|
8
8
|
if (!options["silent"])
|
|
9
9
|
console.log(`Matching video for reunion: ${agenda?.uid}`);
|
|
10
10
|
const isSP = (agenda.type ?? "").toLowerCase().includes("séance publique");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
const
|
|
11
|
+
if (!weights) {
|
|
12
|
+
throw new Error("matchOneReunion: missing weights");
|
|
13
|
+
}
|
|
14
|
+
const minAcceptBase = weights.minAccept;
|
|
15
|
+
const margin = weights.margin;
|
|
16
|
+
const titleDominance = weights.titleDominance ?? 0;
|
|
17
|
+
const orgUncertainPenalty = weights.orgUncertainPenalty ?? 1; // 1 disables
|
|
18
|
+
const orgSkipDice = weights.orgSkipDice ?? 0;
|
|
16
19
|
const minAccept = minAcceptBase + (candidates.length >= 20 ? 0.08 : candidates.length >= 10 ? 0.05 : 0);
|
|
17
20
|
const vw = weights
|
|
18
21
|
? {
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { Reunion } from "../types/agenda";
|
|
2
2
|
import { BestMatch, LastForVideo, MatchContext } from "./types";
|
|
3
3
|
import { CommandLineOptions } from "command-line-args";
|
|
4
|
+
type VideoPipelineOptions = CommandLineOptions & {
|
|
5
|
+
silent?: boolean;
|
|
6
|
+
};
|
|
4
7
|
export declare function processOneReunionMatch(args: {
|
|
5
8
|
agenda: Reunion;
|
|
6
9
|
best: BestMatch | null;
|
|
7
10
|
baseDir: string;
|
|
8
11
|
dataDir: string;
|
|
9
12
|
session: number;
|
|
10
|
-
options:
|
|
13
|
+
options: VideoPipelineOptions;
|
|
11
14
|
writeIfChanged: (p: string, content: string) => Promise<void>;
|
|
12
15
|
lastByVideo: Map<string, {
|
|
13
16
|
agendaUid: string;
|
|
@@ -34,7 +37,7 @@ export declare function processBisIfNeeded(args: {
|
|
|
34
37
|
baseDir: string;
|
|
35
38
|
dataDir: string;
|
|
36
39
|
session: number;
|
|
37
|
-
options:
|
|
40
|
+
options: VideoPipelineOptions;
|
|
38
41
|
writeIfChanged: (p: string, content: string) => Promise<void>;
|
|
39
42
|
lastByVideo: Map<string, LastForVideo>;
|
|
40
43
|
getAgendaSegmentTimecodes: (dataNvs: string, finalNvs: string, agendaKey: string) => {
|
|
@@ -50,3 +53,4 @@ export declare function processBisIfNeeded(args: {
|
|
|
50
53
|
buildSenatVodMasterM3u8FromNvs: (dataNvs: string) => string | null;
|
|
51
54
|
}): Promise<void>;
|
|
52
55
|
export declare function writeIfChanged(p: string, content: string): Promise<void>;
|
|
56
|
+
export {};
|
|
@@ -5,6 +5,9 @@ import { fetchText } from "./search";
|
|
|
5
5
|
import fs from "fs-extra";
|
|
6
6
|
import fsp from "fs/promises";
|
|
7
7
|
import path from "path";
|
|
8
|
+
function isReunion(value) {
|
|
9
|
+
return typeof value === "object" && value !== null && "uid" in value;
|
|
10
|
+
}
|
|
8
11
|
export async function processOneReunionMatch(args) {
|
|
9
12
|
const { agenda, best, baseDir, dataDir, session, options, writeIfChanged, lastByVideo, getAgendaSegmentTimecodes, buildSenatVodMasterM3u8FromNvs, } = args;
|
|
10
13
|
const reunionUid = agenda.uid;
|
|
@@ -14,7 +17,7 @@ export async function processOneReunionMatch(args) {
|
|
|
14
17
|
dataTxt = await fsp.readFile(path.join(baseDir, "data.nvs"), "utf-8");
|
|
15
18
|
finalTxt = await fsp.readFile(path.join(baseDir, "finalplayer.nvs"), "utf-8");
|
|
16
19
|
}
|
|
17
|
-
catch
|
|
20
|
+
catch {
|
|
18
21
|
console.warn(`[skip] Missing NVS files for reunion ${reunionUid}`);
|
|
19
22
|
return;
|
|
20
23
|
}
|
|
@@ -43,9 +46,10 @@ export async function processOneReunionMatch(args) {
|
|
|
43
46
|
if (prev && prev.agendaJsonPath !== agendaJsonPath) {
|
|
44
47
|
// micro-safety: do not close with an earlier timecode
|
|
45
48
|
if (timecodeDebutVideo <= prev.start) {
|
|
46
|
-
console.warn(
|
|
47
|
-
`prev=${prev.agendaUid}(${prev.start}s) ->
|
|
48
|
-
`
|
|
49
|
+
console.warn("[warn] timecode order inversion on same video: " +
|
|
50
|
+
`prev=${prev.agendaUid}(${prev.start}s) -> ` +
|
|
51
|
+
`cur=${agenda.uid}(${timecodeDebutVideo}s). ` +
|
|
52
|
+
"Skip closing prev to avoid negative segment.");
|
|
49
53
|
}
|
|
50
54
|
else {
|
|
51
55
|
await patchAgendaTimecodeFin({
|
|
@@ -63,10 +67,14 @@ export async function processOneReunionMatch(args) {
|
|
|
63
67
|
try {
|
|
64
68
|
obj = JSON.parse(raw);
|
|
65
69
|
}
|
|
66
|
-
catch
|
|
70
|
+
catch {
|
|
67
71
|
console.warn(`[warn] invalid JSON in ${agendaJsonPath}`);
|
|
68
72
|
return;
|
|
69
73
|
}
|
|
74
|
+
if (!isReunion(obj)) {
|
|
75
|
+
console.warn(`[warn] invalid reunion payload in ${agendaJsonPath}`);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
70
78
|
const next = { ...obj, urlVideo: master, startTime: agenda.startTime, urlPageVideo: best?.pageUrl };
|
|
71
79
|
if (timecodeDebutVideo != null) {
|
|
72
80
|
next.timecodeDebutVideo = timecodeDebutVideo;
|
|
@@ -98,7 +106,7 @@ export async function processBisIfNeeded(args) {
|
|
|
98
106
|
};
|
|
99
107
|
const baseDirBis = path.join(path.dirname(ctx.baseDir), bisUid);
|
|
100
108
|
await fs.ensureDir(baseDirBis);
|
|
101
|
-
await ensureBisAgendaJson({ agenda, agendaBis, dataDir: ctx.dataDir, session: ctx.session
|
|
109
|
+
await ensureBisAgendaJson({ agenda, agendaBis, dataDir: ctx.dataDir, session: ctx.session });
|
|
102
110
|
await downloadNvsForMatch(secondBest, baseDirBis);
|
|
103
111
|
await processOneReunionMatch({
|
|
104
112
|
agenda: agendaBis,
|
|
@@ -114,7 +122,7 @@ export async function processBisIfNeeded(args) {
|
|
|
114
122
|
});
|
|
115
123
|
}
|
|
116
124
|
async function ensureBisAgendaJson(args) {
|
|
117
|
-
const { agenda, agendaBis, dataDir, session
|
|
125
|
+
const { agenda, agendaBis, dataDir, session } = args;
|
|
118
126
|
const agendaJsonPath = path.join(dataDir, AGENDA_FOLDER, DATA_TRANSFORMED_FOLDER, String(session), `${agenda.uid}.json`);
|
|
119
127
|
const agendaBisJsonPath = path.join(dataDir, AGENDA_FOLDER, DATA_TRANSFORMED_FOLDER, String(session), `${agendaBis.uid}.json`);
|
|
120
128
|
if (!(await fs.pathExists(agendaJsonPath))) {
|
|
@@ -125,7 +133,8 @@ async function ensureBisAgendaJson(args) {
|
|
|
125
133
|
const raw = await fsp.readFile(agendaJsonPath, "utf-8");
|
|
126
134
|
const obj = JSON.parse(raw);
|
|
127
135
|
if (!obj || typeof obj !== "object" || Array.isArray(obj)) {
|
|
128
|
-
console.warn(`[bis] cannot clone agenda json: expected object in ${agendaJsonPath},
|
|
136
|
+
console.warn(`[bis] cannot clone agenda json: expected object in ${agendaJsonPath}, ` +
|
|
137
|
+
`got ${Array.isArray(obj) ? "array" : typeof obj}`);
|
|
129
138
|
return;
|
|
130
139
|
}
|
|
131
140
|
await writeIfChanged(agendaBisJsonPath, JSON.stringify(agendaBis, null, 2));
|
|
@@ -167,6 +176,10 @@ async function patchAgendaTimecodeFin(args) {
|
|
|
167
176
|
console.warn(`[warn] invalid JSON in ${agendaJsonPath}`);
|
|
168
177
|
return;
|
|
169
178
|
}
|
|
179
|
+
if (typeof obj !== "object" || obj === null || Array.isArray(obj)) {
|
|
180
|
+
console.warn(`[warn] invalid reunion payload in ${agendaJsonPath}`);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
170
183
|
const next = { ...obj, timecodeFinVideo };
|
|
171
184
|
await writeIfChanged(agendaJsonPath, JSON.stringify(next, null, 2));
|
|
172
185
|
}
|
package/lib/src/videos/search.js
CHANGED
|
@@ -55,7 +55,9 @@ export async function fetchCandidatesForAgenda(agenda, options) {
|
|
|
55
55
|
const pages = await fetchAllSearchPages(searchParams);
|
|
56
56
|
if (!pages.length) {
|
|
57
57
|
if (!options["silent"]) {
|
|
58
|
-
console.log(`[miss] ${agenda.uid} no candidates
|
|
58
|
+
console.log(`[miss] ${agenda.uid} no candidates ` +
|
|
59
|
+
`(videotype=${searchParams.videotype}, organe=${searchParams.organe || "-"}, ` +
|
|
60
|
+
`date=${searchParams.begin || "-"})`);
|
|
59
61
|
}
|
|
60
62
|
return null;
|
|
61
63
|
}
|
|
@@ -63,7 +65,9 @@ export async function fetchCandidatesForAgenda(agenda, options) {
|
|
|
63
65
|
const candidates = extractCandidatesFromSearchHtml(combinedHtml).slice(0, MAX_CANDIDATES);
|
|
64
66
|
if (!candidates.length) {
|
|
65
67
|
if (!options["silent"]) {
|
|
66
|
-
console.log(`[miss] ${agenda.uid} no candidates after parse
|
|
68
|
+
console.log(`[miss] ${agenda.uid} no candidates after parse ` +
|
|
69
|
+
`(videotype=${searchParams.videotype}, organe=${searchParams.organe || "-"}, ` +
|
|
70
|
+
`date=${searchParams.begin || "-"})`);
|
|
67
71
|
}
|
|
68
72
|
return null;
|
|
69
73
|
}
|
package/lib/strings.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function slugify(string: string, replacement?: string): string;
|
package/lib/strings.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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/strings.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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/strings.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import originalSlugify from "slug"
|
|
2
|
+
|
|
3
|
+
const slugifyCharmap = {
|
|
4
|
+
...originalSlugify.defaults.charmap,
|
|
5
|
+
"'": " ",
|
|
6
|
+
"@": " ",
|
|
7
|
+
".": " ",
|
|
8
|
+
"-": "_",
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Options {
|
|
12
|
+
charmap: { [c: string]: string }
|
|
13
|
+
mode: string
|
|
14
|
+
replacement?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function slugify(string: string, replacement?: string): string {
|
|
18
|
+
const options: Options = {
|
|
19
|
+
charmap: slugifyCharmap,
|
|
20
|
+
mode: "rfc3986",
|
|
21
|
+
}
|
|
22
|
+
if (replacement) {
|
|
23
|
+
options.replacement = replacement
|
|
24
|
+
}
|
|
25
|
+
return originalSlugify(string, options)
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|