@tricoteuses/senat 2.5.2 → 2.5.4
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/LICENSE.md +1 -1
- package/README.md +4 -2
- package/lib/model/agenda.js +4 -3
- package/lib/model/dosleg.d.ts +0 -6
- package/lib/model/dosleg.js +0 -8
- package/package.json +3 -3
package/LICENSE.md
CHANGED
|
@@ -6,7 +6,7 @@ By: Emmanuel Raviart <mailto:emmanuel@raviart.com>
|
|
|
6
6
|
|
|
7
7
|
Copyright (C) 2019, 2020, 2021 Emmanuel Raviart
|
|
8
8
|
|
|
9
|
-
https://git.
|
|
9
|
+
https://git.tricoteuses.fr/logiciels/tricoteuses-senat
|
|
10
10
|
|
|
11
11
|
> Tricoteuses-Senat is free software; you can redistribute it and/or modify
|
|
12
12
|
> it under the terms of the GNU Affero General Public License as
|
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# This repository has been migrated to https://git.tricoteuses.fr/logiciels/tricoteuses-senat.
|
|
2
|
+
|
|
1
3
|
# Tricoteuses-Senat
|
|
2
4
|
|
|
3
5
|
## _Retrieve, clean up & handle French Sénat's open data_
|
|
@@ -9,7 +11,7 @@
|
|
|
9
11
|
## Installation
|
|
10
12
|
|
|
11
13
|
```bash
|
|
12
|
-
git clone https://git.
|
|
14
|
+
git clone https://git.tricoteuses.fr/logiciels/tricoteuses-senat
|
|
13
15
|
cd tricoteuses-senat/
|
|
14
16
|
```
|
|
15
17
|
|
|
@@ -67,7 +69,7 @@ A Docker image that downloads and cleans the data all at once is available. Crea
|
|
|
67
69
|
|
|
68
70
|
```bash
|
|
69
71
|
docker volume create senat-data # Create a volume to download the data
|
|
70
|
-
docker run --name tricoteuses-senat -v senat-data:/app/senat-data -d
|
|
72
|
+
docker run --name tricoteuses-senat -v senat-data:/app/senat-data -d git.tricoteuses.fr/logiciels/tricoteuses-senat:latest
|
|
71
73
|
```
|
|
72
74
|
|
|
73
75
|
Use the environment variable `CATEGORIES` and `FROM_SESSION` if needed.
|
package/lib/model/agenda.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSDOM } from "jsdom";
|
|
2
2
|
import { DateTime } from "luxon";
|
|
3
3
|
import path from "path";
|
|
4
|
+
const FR_TZ = "Europe/Paris";
|
|
4
5
|
function getEventType(eventClasses) {
|
|
5
6
|
const typeClass = [...eventClasses]
|
|
6
7
|
.find(className => className.startsWith("evt-"))
|
|
@@ -48,12 +49,12 @@ function getStartAndEndTimes(timeStr) {
|
|
|
48
49
|
if (timeMatches?.groups) {
|
|
49
50
|
const { startTime, endTime } = timeMatches.groups;
|
|
50
51
|
return {
|
|
51
|
-
startTime: startTime ? DateTime.fromFormat(startTime, "H'h'mm").toISOTime() : null,
|
|
52
|
-
endTime: endTime ? DateTime.fromFormat(endTime, "H'h'mm").toISOTime() : null,
|
|
52
|
+
startTime: startTime ? DateTime.fromFormat(startTime, "H'h'mm").setZone(FR_TZ).toISOTime() : null,
|
|
53
|
+
endTime: endTime ? DateTime.fromFormat(endTime, "H'h'mm").setZone(FR_TZ).toISOTime() : null,
|
|
53
54
|
};
|
|
54
55
|
}
|
|
55
56
|
return {
|
|
56
|
-
startTime: normalizedTime ? DateTime.fromFormat(normalizedTime, "H'h'mm").toISOTime() : null,
|
|
57
|
+
startTime: normalizedTime ? DateTime.fromFormat(normalizedTime, "H'h'mm").setZone(FR_TZ).toISOTime() : null,
|
|
57
58
|
endTime: null,
|
|
58
59
|
};
|
|
59
60
|
}
|
package/lib/model/dosleg.d.ts
CHANGED
|
@@ -130,9 +130,6 @@ declare const findAllQuery: import("kysely").SelectQueryBuilder<{
|
|
|
130
130
|
nom_usuel: string;
|
|
131
131
|
matricule: string | null;
|
|
132
132
|
}[];
|
|
133
|
-
organismes: {
|
|
134
|
-
libelle: string;
|
|
135
|
-
}[];
|
|
136
133
|
}[];
|
|
137
134
|
dates_seances: {
|
|
138
135
|
date: string;
|
|
@@ -198,9 +195,6 @@ export declare function findAll(): AsyncIterableIterator<{
|
|
|
198
195
|
nom_usuel: string;
|
|
199
196
|
matricule: string | null;
|
|
200
197
|
}[];
|
|
201
|
-
organismes: {
|
|
202
|
-
libelle: string;
|
|
203
|
-
}[];
|
|
204
198
|
}[];
|
|
205
199
|
dates_seances: {
|
|
206
200
|
date: string;
|
package/lib/model/dosleg.js
CHANGED
|
@@ -13,13 +13,6 @@ function datesSeances(lectureAssembleeId) {
|
|
|
13
13
|
toDateString(ref("date_seance.date_s")).as("date"),
|
|
14
14
|
]));
|
|
15
15
|
}
|
|
16
|
-
function organismesRapport(rapportId) {
|
|
17
|
-
return jsonArrayFrom(dbDosleg
|
|
18
|
-
.selectFrom("org")
|
|
19
|
-
.leftJoin("raporg", "raporg.orgcod", "org.orgcod")
|
|
20
|
-
.where("raporg.rapcod", "=", rapportId)
|
|
21
|
-
.select(["org.orgnom as libelle"]));
|
|
22
|
-
}
|
|
23
16
|
function auteursRapport(rapportId) {
|
|
24
17
|
return jsonArrayFrom(dbDosleg
|
|
25
18
|
.selectFrom("auteur")
|
|
@@ -58,7 +51,6 @@ function rapports(lectureAssembleeId) {
|
|
|
58
51
|
toDateString(ref("rap.date_depot")).as("date"),
|
|
59
52
|
"sesann as session",
|
|
60
53
|
auteursRapport(ref("rap.rapcod")).as("auteurs"),
|
|
61
|
-
organismesRapport(ref("rap.rapcod")).as("organismes"),
|
|
62
54
|
]));
|
|
63
55
|
}
|
|
64
56
|
function auteursTexte(texteId) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tricoteuses/senat",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.4",
|
|
4
4
|
"description": "Handle French Sénat's open data",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"France",
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
],
|
|
11
11
|
"author": "Emmanuel Raviart <emmanuel@raviart.com>",
|
|
12
12
|
"bugs": {
|
|
13
|
-
"url": "https://git.
|
|
13
|
+
"url": "https://git.tricoteuses.fr/logiciels/tricoteuses-senat/issues"
|
|
14
14
|
},
|
|
15
15
|
"homepage": "https://tricoteuses.fr/",
|
|
16
16
|
"license": "AGPL-3.0-or-later",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "https://git.
|
|
19
|
+
"url": "https://git.tricoteuses.fr/logiciels/tricoteuses-senat.git"
|
|
20
20
|
},
|
|
21
21
|
"type": "module",
|
|
22
22
|
"engines": {
|