@tricoteuses/senat 1.3.5 → 2.1.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 +10 -9
- package/lib/datasets.d.ts +4 -3
- package/lib/datasets.js +3 -3
- package/lib/index.d.ts +1 -4
- package/lib/index.js +1 -4
- package/lib/loaders.d.ts +4 -3
- package/lib/loaders.js +7 -6
- package/lib/model/agenda.d.ts +2 -0
- package/lib/model/agenda.js +85 -0
- package/lib/model/ameli.d.ts +2 -2
- package/lib/model/ameli.js +14 -6
- package/lib/model/dosleg.d.ts +2 -2
- package/lib/model/dosleg.js +4 -2
- package/lib/scripts/convert_data.js +116 -102
- package/lib/scripts/datautil.d.ts +1 -2
- package/lib/scripts/datautil.js +1 -1
- package/lib/scripts/parse_textes.js +4 -4
- package/lib/scripts/retrieve_agenda.d.ts +1 -0
- package/lib/scripts/retrieve_agenda.js +73 -0
- package/lib/scripts/retrieve_documents.js +11 -16
- package/lib/scripts/retrieve_open_data.js +4 -3
- package/lib/scripts/shared/cli_helpers.d.ts +11 -0
- package/lib/scripts/shared/cli_helpers.js +8 -1
- package/lib/types/agenda.d.ts +12 -0
- package/lib/types/agenda.js +1 -0
- package/lib/types/ameli.d.ts +0 -5
- package/lib/types/ameli.js +1 -13
- package/lib/types/debats.d.ts +0 -2
- package/lib/types/debats.js +1 -2
- package/lib/types/dosleg.d.ts +0 -28
- package/lib/types/dosleg.js +1 -151
- package/lib/types/sessions.d.ts +5 -42
- package/lib/types/sessions.js +84 -43
- package/package.json +3 -2
package/lib/scripts/datautil.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DateTime, Settings } from "luxon";
|
|
2
|
+
import { UNDEFINED_SESSION } from "../types/sessions";
|
|
2
3
|
Settings.twoDigitCutoffYear = 50;
|
|
3
4
|
export const SIGNET_STRUCTURE_REGEXP = /^(?<type>[a-z]+)(?<session>\d{2,4})-?(?<numTexte>\d+)?/;
|
|
4
5
|
export const AKN_IDENTIFICATION_STRUCTURE_REGEXP = /^\/akn\/fr\/(?<type>[a-z]+)\/(?<session>\d{4}-\d{4})\/?(?<numTexte>\d+)\/fr@(?<version>\b(?:RECT|RECT_BIS|RECT_TER|RECT_QUATER|RECT_QUINQUIES)\b)?/;
|
|
5
6
|
export const AKN_WORKFLOW_IDENTIFICATION_STRUCTURE_REGEXP = /^\/akn\/fr\/(?<type>[a-z]+)\/(?<session>\d{2,4})\/?(?<numTexte>[a-zA-Z0-9]+)\/fr@(?<version>\b(?:RECT|RECT_BIS|RECT_TER|RECT_QUATER|RECT_QUINQUIES)\b)?/;
|
|
6
|
-
export const UNDEFINED_SESSION = "0";
|
|
7
7
|
export function formatToFourDigitSession(session) {
|
|
8
8
|
if (session.length >= 2) {
|
|
9
9
|
const sessionFirstTwoDigits = session.substring(0, 2);
|
|
@@ -2,7 +2,7 @@ import assert from "assert";
|
|
|
2
2
|
import commandLineArgs from "command-line-args";
|
|
3
3
|
import fs from "fs-extra";
|
|
4
4
|
import path from "path";
|
|
5
|
-
import { iterFilePaths, TEXTE_FOLDER,
|
|
5
|
+
import { iterFilePaths, TEXTE_FOLDER, DATA_ORIGINAL_FOLDER, DATA_TRANSFORMED_FOLDER, } from "../loaders";
|
|
6
6
|
import { parseExposeDesMotifsFromFile, parseTexteFromFile, } from "../model/texte";
|
|
7
7
|
import { commonOptions } from "./shared/cli_helpers";
|
|
8
8
|
import { ensureAndClearDir } from "./shared/util";
|
|
@@ -11,14 +11,14 @@ const options = commandLineArgs(optionsDefinitions);
|
|
|
11
11
|
async function main() {
|
|
12
12
|
const dataDir = options["dataDir"];
|
|
13
13
|
assert(dataDir, "Missing argument: data directory");
|
|
14
|
-
const transformedTextesDir = path.join(options["dataDir"], TEXTE_FOLDER,
|
|
14
|
+
const transformedTextesDir = path.join(options["dataDir"], TEXTE_FOLDER, DATA_TRANSFORMED_FOLDER);
|
|
15
15
|
ensureAndClearDir(transformedTextesDir);
|
|
16
|
-
for (const filePath of iterFilePaths(path.join(dataDir, TEXTE_FOLDER,
|
|
16
|
+
for (const filePath of iterFilePaths(path.join(dataDir, TEXTE_FOLDER, DATA_ORIGINAL_FOLDER))) {
|
|
17
17
|
const parsedFilePath = path.parse(filePath);
|
|
18
18
|
if (parsedFilePath.ext !== ".xml") {
|
|
19
19
|
continue;
|
|
20
20
|
}
|
|
21
|
-
const texteDirFromOriginal = parsedFilePath.dir.substring(filePath.indexOf(
|
|
21
|
+
const texteDirFromOriginal = parsedFilePath.dir.substring(filePath.indexOf(DATA_ORIGINAL_FOLDER) + DATA_ORIGINAL_FOLDER.length);
|
|
22
22
|
const transformedTexteDir = path.join(transformedTextesDir, texteDirFromOriginal);
|
|
23
23
|
fs.ensureDirSync(transformedTexteDir);
|
|
24
24
|
if (!options["silent"]) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import assert from "assert";
|
|
2
|
+
import commandLineArgs from "command-line-args";
|
|
3
|
+
import fs from "fs-extra";
|
|
4
|
+
import { DateTime } from "luxon";
|
|
5
|
+
import path from "path";
|
|
6
|
+
import { AGENDA_FOLDER, DATA_ORIGINAL_FOLDER } from "../loaders";
|
|
7
|
+
import { getSessionsFromStart } from "../types/sessions";
|
|
8
|
+
import { commonOptions } from "./shared/cli_helpers";
|
|
9
|
+
import { ensureAndClearDir } from "./shared/util";
|
|
10
|
+
const optionsDefinitions = [
|
|
11
|
+
...commonOptions,
|
|
12
|
+
{
|
|
13
|
+
help: "parse and convert documents into JSON (textes only for now, requires format xml)",
|
|
14
|
+
name: "parseDocuments",
|
|
15
|
+
type: Boolean,
|
|
16
|
+
},
|
|
17
|
+
];
|
|
18
|
+
const options = commandLineArgs(optionsDefinitions);
|
|
19
|
+
const SENAT_GLOBAL_AGENDA_URL_ROOT = "https://www.senat.fr/aglae/Global";
|
|
20
|
+
async function retrieveAgenda(dataDir, sessions) {
|
|
21
|
+
const agendaRootDir = path.join(dataDir, AGENDA_FOLDER);
|
|
22
|
+
ensureAndClearDir(agendaRootDir);
|
|
23
|
+
const originalAgendaDir = path.join(agendaRootDir, DATA_ORIGINAL_FOLDER);
|
|
24
|
+
fs.ensureDirSync(originalAgendaDir);
|
|
25
|
+
for (const session of sessions) {
|
|
26
|
+
if (!options["silent"]) {
|
|
27
|
+
console.log(`Retrieving Agenda for session ${session}…`);
|
|
28
|
+
}
|
|
29
|
+
const agendaSessionDir = path.join(originalAgendaDir, `${session}`);
|
|
30
|
+
fs.ensureDirSync(agendaSessionDir);
|
|
31
|
+
const fifteenDaysFromNow = new Date();
|
|
32
|
+
fifteenDaysFromNow.setDate(fifteenDaysFromNow.getDate() + 15);
|
|
33
|
+
for (const date = new Date(session, 0, 1); date <= new Date(session, 11, 31) && date <= fifteenDaysFromNow; date.setDate(date.getDate() + 1)) {
|
|
34
|
+
const agendaName = DateTime.fromJSDate(date).toFormat("ddMMyyyy");
|
|
35
|
+
try {
|
|
36
|
+
const response = await fetch(`${SENAT_GLOBAL_AGENDA_URL_ROOT}/agl${agendaName}.html`);
|
|
37
|
+
if (!response.ok) {
|
|
38
|
+
if (response.status === 404) {
|
|
39
|
+
console.warn(`Agenda ${agendaName} not found`);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
console.error(`An error occurred while retrieving Agenda ${agendaName}: ${response.status}`);
|
|
43
|
+
}
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const agendaContent = await response.arrayBuffer();
|
|
47
|
+
if (!agendaContent) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
fs.writeFileSync(path.join(agendaSessionDir, agendaName), Buffer.from(agendaContent));
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
console.error(error.message);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async function main() {
|
|
59
|
+
const dataDir = options["dataDir"];
|
|
60
|
+
assert(dataDir, "Missing argument: data directory");
|
|
61
|
+
const sessions = getSessionsFromStart(options["fromSession"]);
|
|
62
|
+
console.time("agenda processing time");
|
|
63
|
+
await retrieveAgenda(dataDir, sessions);
|
|
64
|
+
if (!options["silent"]) {
|
|
65
|
+
console.timeEnd("agenda processing time");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
main()
|
|
69
|
+
.then(() => process.exit(0))
|
|
70
|
+
.catch((error) => {
|
|
71
|
+
console.log(error);
|
|
72
|
+
process.exit(1);
|
|
73
|
+
});
|
|
@@ -2,19 +2,13 @@ import assert from "assert";
|
|
|
2
2
|
import commandLineArgs from "command-line-args";
|
|
3
3
|
import fs from "fs-extra";
|
|
4
4
|
import path from "path";
|
|
5
|
-
import { iterLoadSenatDossiersLegislatifsRapportUrls, iterLoadSenatDossiersLegislatifsTexteUrls, RAPPORT_FOLDER, TEXTE_FOLDER,
|
|
5
|
+
import { iterLoadSenatDossiersLegislatifsRapportUrls, iterLoadSenatDossiersLegislatifsTexteUrls, RAPPORT_FOLDER, TEXTE_FOLDER, DATA_ORIGINAL_FOLDER, DATA_TRANSFORMED_FOLDER, } from "../loaders";
|
|
6
6
|
import { parseExposeDesMotifs, parseTexte, parseTexteFromFile, } from "../model/texte";
|
|
7
|
-
import { UNDEFINED_SESSION } from "
|
|
7
|
+
import { getSessionsFromStart, UNDEFINED_SESSION } from "../types/sessions";
|
|
8
8
|
import { commonOptions } from "./shared/cli_helpers";
|
|
9
9
|
import { ensureAndClearDir, fetchWithRetry, isOptionEmptyOrHasValue, } from "./shared/util";
|
|
10
10
|
const optionsDefinitions = [
|
|
11
11
|
...commonOptions,
|
|
12
|
-
{
|
|
13
|
-
help: "sessions of textes to retrieve; leave empty for all",
|
|
14
|
-
multiple: true,
|
|
15
|
-
name: "sessions",
|
|
16
|
-
type: String,
|
|
17
|
-
},
|
|
18
12
|
{
|
|
19
13
|
help: "parse and convert documents into JSON (textes only for now, requires format xml)",
|
|
20
14
|
name: "parseDocuments",
|
|
@@ -63,18 +57,18 @@ async function retrieveDocument(documentUrl) {
|
|
|
63
57
|
return null;
|
|
64
58
|
}
|
|
65
59
|
}
|
|
66
|
-
async function retrieveTextes(dataDir) {
|
|
60
|
+
async function retrieveTextes(dataDir, sessions) {
|
|
67
61
|
const textesDir = path.join(dataDir, TEXTE_FOLDER);
|
|
68
62
|
fs.ensureDirSync(textesDir);
|
|
69
|
-
const originalTextesDir = path.join(textesDir,
|
|
70
|
-
const transformedTextesDir = path.join(textesDir,
|
|
63
|
+
const originalTextesDir = path.join(textesDir, DATA_ORIGINAL_FOLDER);
|
|
64
|
+
const transformedTextesDir = path.join(textesDir, DATA_TRANSFORMED_FOLDER);
|
|
71
65
|
if (options["parseDocuments"]) {
|
|
72
66
|
ensureAndClearDir(transformedTextesDir);
|
|
73
67
|
}
|
|
74
68
|
let retrievedTextesCount = 0;
|
|
75
69
|
const texteUrlsNotFoundOrError = [];
|
|
76
70
|
const texteUrlsParseError = [];
|
|
77
|
-
for (const session of
|
|
71
|
+
for (const session of sessions) {
|
|
78
72
|
for (const { item: texteMetadata, } of iterLoadSenatDossiersLegislatifsTexteUrls(dataDir, session)) {
|
|
79
73
|
const texteDir = path.join(originalTextesDir, `${texteMetadata.session ?? UNDEFINED_SESSION}`, texteMetadata.name);
|
|
80
74
|
fs.ensureDirSync(texteDir);
|
|
@@ -180,12 +174,12 @@ async function retrieveTextes(dataDir) {
|
|
|
180
174
|
}
|
|
181
175
|
}
|
|
182
176
|
}
|
|
183
|
-
async function retrieveRapports(dataDir) {
|
|
177
|
+
async function retrieveRapports(dataDir, sessions) {
|
|
184
178
|
const rapportsDir = path.join(dataDir, RAPPORT_FOLDER);
|
|
185
179
|
fs.ensureDirSync(rapportsDir);
|
|
186
180
|
let retrievedRapportsCount = 0;
|
|
187
181
|
const rapportUrlsNotFoundOrError = [];
|
|
188
|
-
for (const session of
|
|
182
|
+
for (const session of sessions) {
|
|
189
183
|
for (const { item: rapportMetadata, } of iterLoadSenatDossiersLegislatifsRapportUrls(dataDir, session)) {
|
|
190
184
|
const rapportDir = path.join(rapportsDir, `${rapportMetadata.session ?? UNDEFINED_SESSION}`, rapportMetadata.name);
|
|
191
185
|
fs.ensureDirSync(rapportDir);
|
|
@@ -231,12 +225,13 @@ async function retrieveRapports(dataDir) {
|
|
|
231
225
|
async function main() {
|
|
232
226
|
const dataDir = options["dataDir"];
|
|
233
227
|
assert(dataDir, "Missing argument: data directory");
|
|
228
|
+
const sessions = getSessionsFromStart(options["fromSession"]);
|
|
234
229
|
console.time("documents processing time");
|
|
235
230
|
if (isOptionEmptyOrHasValue(options["types"], "textes")) {
|
|
236
|
-
await retrieveTextes(dataDir);
|
|
231
|
+
await retrieveTextes(dataDir, sessions);
|
|
237
232
|
}
|
|
238
233
|
if (isOptionEmptyOrHasValue(options["types"], "rapports")) {
|
|
239
|
-
await retrieveRapports(dataDir);
|
|
234
|
+
await retrieveRapports(dataDir, sessions);
|
|
240
235
|
}
|
|
241
236
|
if (!options["silent"]) {
|
|
242
237
|
console.timeEnd("documents processing time");
|
|
@@ -10,7 +10,7 @@ import readline from "readline";
|
|
|
10
10
|
// import util from "util"
|
|
11
11
|
import windows1252 from "windows-1252";
|
|
12
12
|
import config from "../config";
|
|
13
|
-
import { datasets,
|
|
13
|
+
import { datasets, getChosenDatasets, getEnabledDatasets } from "../datasets";
|
|
14
14
|
import { commonOptions } from "./shared/cli_helpers";
|
|
15
15
|
const badWindows1252CharacterRegex = /[\u0080-\u009f]/g;
|
|
16
16
|
const optionsDefinitions = [
|
|
@@ -201,8 +201,9 @@ async function retrieveOpenData() {
|
|
|
201
201
|
encoding: "utf-8",
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
const
|
|
205
|
-
|
|
204
|
+
const enabledDatasets = getEnabledDatasets(options["categories"]);
|
|
205
|
+
const chosenDatasets = getChosenDatasets(enabledDatasets);
|
|
206
|
+
for (const dataset of chosenDatasets) {
|
|
206
207
|
await retrieveDataset(dataDir, dataset);
|
|
207
208
|
}
|
|
208
209
|
if (!options["silent"]) {
|
|
@@ -12,6 +12,12 @@ export declare const dataDirDefaultOption: {
|
|
|
12
12
|
name: string;
|
|
13
13
|
type: StringConstructor;
|
|
14
14
|
};
|
|
15
|
+
export declare const fromSessionOption: {
|
|
16
|
+
defaultValue: number;
|
|
17
|
+
help: string;
|
|
18
|
+
name: string;
|
|
19
|
+
type: NumberConstructor;
|
|
20
|
+
};
|
|
15
21
|
export declare const silentOption: {
|
|
16
22
|
alias: string;
|
|
17
23
|
help: string;
|
|
@@ -36,6 +42,11 @@ export declare const commonOptions: ({
|
|
|
36
42
|
help: string;
|
|
37
43
|
name: string;
|
|
38
44
|
type: StringConstructor;
|
|
45
|
+
} | {
|
|
46
|
+
defaultValue: number;
|
|
47
|
+
help: string;
|
|
48
|
+
name: string;
|
|
49
|
+
type: NumberConstructor;
|
|
39
50
|
} | {
|
|
40
51
|
alias: string;
|
|
41
52
|
help: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const categoriesOption = {
|
|
2
2
|
alias: "k",
|
|
3
3
|
defaultValue: ["All"],
|
|
4
|
-
help: "categories of datasets to reorganize",
|
|
4
|
+
help: "categories of datasets to reorganize; default All",
|
|
5
5
|
multiple: true,
|
|
6
6
|
name: "categories",
|
|
7
7
|
type: String,
|
|
@@ -12,6 +12,12 @@ export const dataDirDefaultOption = {
|
|
|
12
12
|
name: "dataDir",
|
|
13
13
|
type: String,
|
|
14
14
|
};
|
|
15
|
+
export const fromSessionOption = {
|
|
16
|
+
defaultValue: 2023,
|
|
17
|
+
help: "session year to retrieve data from; default 2023",
|
|
18
|
+
name: "fromSession",
|
|
19
|
+
type: Number,
|
|
20
|
+
};
|
|
15
21
|
export const silentOption = {
|
|
16
22
|
alias: "s",
|
|
17
23
|
help: "don't log anything",
|
|
@@ -27,6 +33,7 @@ export const verboseOption = {
|
|
|
27
33
|
export const commonOptions = [
|
|
28
34
|
categoriesOption,
|
|
29
35
|
dataDirDefaultOption,
|
|
36
|
+
fromSessionOption,
|
|
30
37
|
silentOption,
|
|
31
38
|
verboseOption,
|
|
32
39
|
];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface AgendaEvent {
|
|
2
|
+
type: string | null;
|
|
3
|
+
heureDebut: string | null;
|
|
4
|
+
heureFin: string | null;
|
|
5
|
+
timeOriginal: string | null;
|
|
6
|
+
titre: string | null;
|
|
7
|
+
organe: string | null;
|
|
8
|
+
objet: string | null;
|
|
9
|
+
lieu: string | null;
|
|
10
|
+
url_dossier_senat: string | null;
|
|
11
|
+
url_video: string | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/types/ameli.d.ts
CHANGED
|
@@ -3,8 +3,3 @@ export type { Ses, Sub };
|
|
|
3
3
|
export interface TxtAmeli extends txt_ameli {
|
|
4
4
|
subids?: subFields.id[];
|
|
5
5
|
}
|
|
6
|
-
export declare const sesFieldsToParseInt: string[];
|
|
7
|
-
export declare const sesFieldsToTrim: string[];
|
|
8
|
-
export declare const subFieldsToParseInt: string[];
|
|
9
|
-
export declare const subFieldsToTrim: string[];
|
|
10
|
-
export declare const txtAmeliFieldsToTrim: string[];
|
package/lib/types/ameli.js
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export const sesFieldsToTrim = ["lil"];
|
|
3
|
-
export const subFieldsToParseInt = ["pos", "posder", "prires"];
|
|
4
|
-
export const subFieldsToTrim = ["lic", "lib", "sig", "style"];
|
|
5
|
-
export const txtAmeliFieldsToTrim = [
|
|
6
|
-
"num",
|
|
7
|
-
"int",
|
|
8
|
-
"inl",
|
|
9
|
-
"libdelim",
|
|
10
|
-
"libcplnat",
|
|
11
|
-
"doslegsignet",
|
|
12
|
-
"ordsnddelib",
|
|
13
|
-
];
|
|
1
|
+
export {};
|
package/lib/types/debats.d.ts
CHANGED
package/lib/types/debats.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export const lecassdebFieldsToTrim = ["lecassidt"];
|
|
1
|
+
export {};
|
package/lib/types/dosleg.d.ts
CHANGED
|
@@ -68,31 +68,3 @@ export interface Texte extends texte {
|
|
|
68
68
|
txtAmeli?: TxtAmeli;
|
|
69
69
|
txtAmeliId: txt_ameliFields.id;
|
|
70
70
|
}
|
|
71
|
-
export declare const assFieldsToTrim: string[];
|
|
72
|
-
export declare const audFieldsToTrim: string[];
|
|
73
|
-
export declare const auteurFieldsToTrim: string[];
|
|
74
|
-
export declare const dateSeanceFieldsToTrim: string[];
|
|
75
|
-
export declare const deccocFieldsToTrim: string[];
|
|
76
|
-
export declare const denrapFieldsToTrim: string[];
|
|
77
|
-
export declare const docattFieldsToParseInt: string[];
|
|
78
|
-
export declare const docattFieldsToTrim: string[];
|
|
79
|
-
export declare const ecrFieldsToTrim: string[];
|
|
80
|
-
export declare const etaloiFieldsToTrim: string[];
|
|
81
|
-
export declare const lecassFieldsToTrim: string[];
|
|
82
|
-
export declare const lecassrapFieldsToTrim: string[];
|
|
83
|
-
export declare const lectureFieldsToTrim: string[];
|
|
84
|
-
export declare const loiFieldsToTrim: string[];
|
|
85
|
-
export declare const orgFieldsToTrim: string[];
|
|
86
|
-
export declare const oritxtFieldsToTrim: string[];
|
|
87
|
-
export declare const quaFieldsToTrim: string[];
|
|
88
|
-
export declare const rapFieldsToParseInt: string[];
|
|
89
|
-
export declare const rapFieldsToTrim: string[];
|
|
90
|
-
export declare const raporgFieldsToTrim: string[];
|
|
91
|
-
export declare const scrFieldsToTrim: string[];
|
|
92
|
-
export declare const texteFieldsToParseInt: string[];
|
|
93
|
-
export declare const texteFieldsToTrim: string[];
|
|
94
|
-
export declare const typattFieldsToTrim: string[];
|
|
95
|
-
export declare const typlecFieldsToTrim: string[];
|
|
96
|
-
export declare const typloiFieldsToTrim: string[];
|
|
97
|
-
export declare const typtxtFieldsToTrim: string[];
|
|
98
|
-
export declare const typurlFieldsToTrim: string[];
|
package/lib/types/dosleg.js
CHANGED
|
@@ -1,151 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export const audFieldsToTrim = ["lecassidt", "audtit", "audurl", "orgcod"];
|
|
3
|
-
export const auteurFieldsToTrim = [
|
|
4
|
-
"autcod",
|
|
5
|
-
"quacod",
|
|
6
|
-
"typautcod",
|
|
7
|
-
"nomuse",
|
|
8
|
-
"prenom",
|
|
9
|
-
"nomtec",
|
|
10
|
-
"autmat",
|
|
11
|
-
"autfct",
|
|
12
|
-
];
|
|
13
|
-
export const dateSeanceFieldsToTrim = ["lecidt", "statut"];
|
|
14
|
-
export const deccocFieldsToTrim = ["deccoccod", "deccoclib"];
|
|
15
|
-
export const denrapFieldsToTrim = [
|
|
16
|
-
"coddenrap",
|
|
17
|
-
"typraprap",
|
|
18
|
-
"libdenrap",
|
|
19
|
-
"denrapmin",
|
|
20
|
-
"denraptit",
|
|
21
|
-
"denrapstymin",
|
|
22
|
-
"solnatrapcod",
|
|
23
|
-
];
|
|
24
|
-
export const docattFieldsToParseInt = ["docattcle", "rapcod"];
|
|
25
|
-
export const docattFieldsToTrim = ["docatturl"];
|
|
26
|
-
export const ecrFieldsToTrim = ["autcod", "ecrqua"];
|
|
27
|
-
export const etaloiFieldsToTrim = ["etaloilib"];
|
|
28
|
-
export const lecassFieldsToTrim = [
|
|
29
|
-
"lecassidt",
|
|
30
|
-
"lecidt",
|
|
31
|
-
"ptlurl",
|
|
32
|
-
"ptlnumcpl",
|
|
33
|
-
"ptlnot",
|
|
34
|
-
"ptlurl2",
|
|
35
|
-
"ptlnot2",
|
|
36
|
-
"ptlurl3",
|
|
37
|
-
"ptlnot3",
|
|
38
|
-
"ptlnumcpl2",
|
|
39
|
-
"ptlnumcpl3",
|
|
40
|
-
"lecassame",
|
|
41
|
-
"orgcod",
|
|
42
|
-
"loiintmod",
|
|
43
|
-
"reucom",
|
|
44
|
-
"debatsurl",
|
|
45
|
-
"libppr",
|
|
46
|
-
"ptlurlcom",
|
|
47
|
-
"aliasppr",
|
|
48
|
-
"lecassamecom",
|
|
49
|
-
];
|
|
50
|
-
export const lecassrapFieldsToTrim = ["lecassidt"];
|
|
51
|
-
export const lectureFieldsToTrim = ["lecidt", "loicod", "typleccod", "leccom"];
|
|
52
|
-
export const loiFieldsToTrim = [
|
|
53
|
-
"loicod",
|
|
54
|
-
"typloicod",
|
|
55
|
-
"deccoccod",
|
|
56
|
-
"numero",
|
|
57
|
-
"loient",
|
|
58
|
-
"motclef",
|
|
59
|
-
"loitit",
|
|
60
|
-
"loiint",
|
|
61
|
-
"url_jo",
|
|
62
|
-
"loinumjo",
|
|
63
|
-
"loititjo",
|
|
64
|
-
"url_jo2",
|
|
65
|
-
"loinumjo2",
|
|
66
|
-
"deccocurl",
|
|
67
|
-
"num_decision",
|
|
68
|
-
"loicodmai",
|
|
69
|
-
"loinoudelibcod",
|
|
70
|
-
"motionloiorigcod",
|
|
71
|
-
"url_ordonnance",
|
|
72
|
-
"saisine_par",
|
|
73
|
-
"loinumjo3",
|
|
74
|
-
"url_jo3",
|
|
75
|
-
"url_an",
|
|
76
|
-
"url_presart",
|
|
77
|
-
"signetalt",
|
|
78
|
-
"orgcod",
|
|
79
|
-
"doscocurl",
|
|
80
|
-
"loiintori",
|
|
81
|
-
];
|
|
82
|
-
export const orgFieldsToTrim = [
|
|
83
|
-
"orgcod",
|
|
84
|
-
"typorgcod",
|
|
85
|
-
"orgnom",
|
|
86
|
-
"orgliblon",
|
|
87
|
-
"orglibaff",
|
|
88
|
-
"orgurl",
|
|
89
|
-
"orglibcou",
|
|
90
|
-
"org_de",
|
|
91
|
-
"urltra",
|
|
92
|
-
"inttra",
|
|
93
|
-
"orgnomcouv",
|
|
94
|
-
"senorgcod",
|
|
95
|
-
"html_color",
|
|
96
|
-
];
|
|
97
|
-
export const oritxtFieldsToTrim = ["oritxtcod", "oritxtlib", "oritxtlibfem"];
|
|
98
|
-
export const quaFieldsToTrim = ["quacod", "qualic", "quaabr", "quaabrplu"];
|
|
99
|
-
export const rapFieldsToParseInt = ["rapcod", "sesann", "rapnum", "rapnuman"];
|
|
100
|
-
export const rapFieldsToTrim = [
|
|
101
|
-
"coddenrap",
|
|
102
|
-
"blecod",
|
|
103
|
-
"raptitcou",
|
|
104
|
-
"raptil",
|
|
105
|
-
"rapurl",
|
|
106
|
-
"url2",
|
|
107
|
-
"url3",
|
|
108
|
-
"url4",
|
|
109
|
-
"url2txt",
|
|
110
|
-
"url3txt",
|
|
111
|
-
"url4txt",
|
|
112
|
-
"prix",
|
|
113
|
-
"numerobis",
|
|
114
|
-
"rapsoustit",
|
|
115
|
-
"rapres",
|
|
116
|
-
"forpubcod",
|
|
117
|
-
];
|
|
118
|
-
export const raporgFieldsToTrim = ["orgcod"];
|
|
119
|
-
export const scrFieldsToTrim = ["scrint", "soslib"];
|
|
120
|
-
export const texteFieldsToParseInt = ["texcod", "sesann", "texnum"];
|
|
121
|
-
export const texteFieldsToTrim = [
|
|
122
|
-
"oritxtcod",
|
|
123
|
-
"typtxtcod",
|
|
124
|
-
"lecassidt",
|
|
125
|
-
"orgcod",
|
|
126
|
-
"texurl",
|
|
127
|
-
"url2",
|
|
128
|
-
"url3",
|
|
129
|
-
"url4",
|
|
130
|
-
"url2txt",
|
|
131
|
-
"url3txt",
|
|
132
|
-
"url4txt",
|
|
133
|
-
"prix",
|
|
134
|
-
"numerobis",
|
|
135
|
-
"reserve_comspe",
|
|
136
|
-
];
|
|
137
|
-
export const typattFieldsToTrim = ["typattlib"];
|
|
138
|
-
export const typlecFieldsToTrim = ["typleccod", "typleclib"];
|
|
139
|
-
export const typloiFieldsToTrim = [
|
|
140
|
-
"typloicod",
|
|
141
|
-
"typloilib",
|
|
142
|
-
"groupe",
|
|
143
|
-
"typloiden",
|
|
144
|
-
"typloigen",
|
|
145
|
-
"typloitit",
|
|
146
|
-
"typloidenplu",
|
|
147
|
-
"typloide",
|
|
148
|
-
"typloiabr",
|
|
149
|
-
];
|
|
150
|
-
export const typtxtFieldsToTrim = ["typtxtcod", "typtxtlib"];
|
|
151
|
-
export const typurlFieldsToTrim = ["libtypurl"];
|
|
1
|
+
export {};
|
package/lib/types/sessions.d.ts
CHANGED
|
@@ -1,42 +1,5 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"2016-2017" = 2016,
|
|
7
|
-
"2017-2018" = 2017,
|
|
8
|
-
"2018-2019" = 2018,
|
|
9
|
-
"2019-2020" = 2019,
|
|
10
|
-
"2020-2021" = 2020,
|
|
11
|
-
"2021-2022" = 2021,
|
|
12
|
-
"2022-2023" = 2022,
|
|
13
|
-
"2023-2024" = 2023,
|
|
14
|
-
"2024-2025" = 2024,
|
|
15
|
-
"2025-2026" = 2025,
|
|
16
|
-
"2026-2027" = 2026,
|
|
17
|
-
"2027-2028" = 2027,
|
|
18
|
-
"2028-2029" = 2028,
|
|
19
|
-
"2029-2030" = 2029,
|
|
20
|
-
"2030-2031" = 2030,
|
|
21
|
-
"2031-2032" = 2031,
|
|
22
|
-
"2032-2033" = 2032,
|
|
23
|
-
"2033-2034" = 2033,
|
|
24
|
-
"2034-2035" = 2034,
|
|
25
|
-
"2035-2036" = 2035,
|
|
26
|
-
"2036-2037" = 2036,
|
|
27
|
-
"2037-2038" = 2037,
|
|
28
|
-
"2038-2039" = 2038,
|
|
29
|
-
"2039-2040" = 2039,
|
|
30
|
-
"2040-2041" = 2040,
|
|
31
|
-
"2041-2042" = 2041,
|
|
32
|
-
"2042-2043" = 2042,
|
|
33
|
-
"2043-2044" = 2043,
|
|
34
|
-
"2044-2045" = 2044,
|
|
35
|
-
"2045-2046" = 2045,
|
|
36
|
-
"2046-2047" = 2046,
|
|
37
|
-
"2047-2048" = 2047,
|
|
38
|
-
"2048-2049" = 2048,
|
|
39
|
-
"2049-2050" = 2049,
|
|
40
|
-
"2050-2051" = 2050,
|
|
41
|
-
"All" = 0
|
|
42
|
-
}
|
|
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 {};
|