@tricoteuses/assemblee 2.5.2 → 2.5.3
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 +28 -28
- package/README.md +152 -152
- package/lib/loaders.js +42 -35
- package/lib/schemas/compte_rendu_commission/CompteRenduCommission.json +63 -63
- package/lib/schemas/debats.json +1 -1
- package/package.json +126 -126
package/LICENSE.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
# Tricoteuses-Assemblee
|
|
2
|
-
|
|
3
|
-
## _Retrieve, clean up & handle French Assemblée nationale's open data_
|
|
4
|
-
|
|
5
|
-
By:
|
|
6
|
-
* Henry Boisgibault <mailto:h.boisgibault@gmail.com>
|
|
7
|
-
* Loïc Dachary <mailto:loic@dachary.org>
|
|
8
|
-
* Emmanuel Raviart <mailto:emmanuel@raviart.com>
|
|
9
|
-
|
|
10
|
-
Copyright:
|
|
11
|
-
* © 2019, 2020, 2021 Loïc Dachary & Emmanuel Raviart
|
|
12
|
-
* © 2022 Emmanuel Raviart
|
|
13
|
-
* © 2023 Henry Boisgibault & Emmanuel Raviart
|
|
14
|
-
|
|
15
|
-
https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee
|
|
16
|
-
|
|
17
|
-
> Tricoteuses-Assemblee is free software; you can redistribute it and/or modify
|
|
18
|
-
> it under the terms of the GNU Affero General Public License as
|
|
19
|
-
> published by the Free Software Foundation, either version 3 of the
|
|
20
|
-
> License, or (at your option) any later version.
|
|
21
|
-
>
|
|
22
|
-
> Tricoteuses-Assemblee is distributed in the hope that it will be useful,
|
|
23
|
-
> but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
24
|
-
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
25
|
-
> GNU Affero General Public License for more details.
|
|
26
|
-
>
|
|
27
|
-
> You should have received a copy of the GNU Affero General Public License
|
|
28
|
-
> along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
1
|
+
# Tricoteuses-Assemblee
|
|
2
|
+
|
|
3
|
+
## _Retrieve, clean up & handle French Assemblée nationale's open data_
|
|
4
|
+
|
|
5
|
+
By:
|
|
6
|
+
* Henry Boisgibault <mailto:h.boisgibault@gmail.com>
|
|
7
|
+
* Loïc Dachary <mailto:loic@dachary.org>
|
|
8
|
+
* Emmanuel Raviart <mailto:emmanuel@raviart.com>
|
|
9
|
+
|
|
10
|
+
Copyright:
|
|
11
|
+
* © 2019, 2020, 2021 Loïc Dachary & Emmanuel Raviart
|
|
12
|
+
* © 2022 Emmanuel Raviart
|
|
13
|
+
* © 2023 Henry Boisgibault & Emmanuel Raviart
|
|
14
|
+
|
|
15
|
+
https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee
|
|
16
|
+
|
|
17
|
+
> Tricoteuses-Assemblee is free software; you can redistribute it and/or modify
|
|
18
|
+
> it under the terms of the GNU Affero General Public License as
|
|
19
|
+
> published by the Free Software Foundation, either version 3 of the
|
|
20
|
+
> License, or (at your option) any later version.
|
|
21
|
+
>
|
|
22
|
+
> Tricoteuses-Assemblee is distributed in the hope that it will be useful,
|
|
23
|
+
> but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
24
|
+
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
25
|
+
> GNU Affero General Public License for more details.
|
|
26
|
+
>
|
|
27
|
+
> You should have received a copy of the GNU Affero General Public License
|
|
28
|
+
> along with this program. If not, see <http://www.gnu.org/licenses/>.
|
package/README.md
CHANGED
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
# Tricoteuses-Assemblee
|
|
2
|
-
|
|
3
|
-
## _Retrieve, clean up & handle French Assemblée nationale's open data_
|
|
4
|
-
|
|
5
|
-
_Tricoteuses Légifrance_ is free and open source software.
|
|
6
|
-
|
|
7
|
-
- [software repository](https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee)
|
|
8
|
-
- [GNU Affero General Public License version 3 or greater](https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee/-/tree/master/LICENSE.md)
|
|
9
|
-
|
|
10
|
-
## documentation
|
|
11
|
-
|
|
12
|
-
- [Architecture](doc/architecture.md)
|
|
13
|
-
- [TypeScript API](doc/api/)
|
|
14
|
-
- Main interfaces:
|
|
15
|
-
- [Acteur : personne physique élue ou nommée dans des organes](doc/api/README/interfaces/Acteur.md)
|
|
16
|
-
- [Amendement](doc/api/README/interfaces/Amendement.md)
|
|
17
|
-
- [CompteRendu : compte-rendu d'un débat parlementaire](doc/api/README/interfaces/CompteRendu.md)
|
|
18
|
-
- [Document : texte d'un projet de loi, d'une proposition de loi, d'un rapport, etc](doc/api/README/interfaces/Document.md)
|
|
19
|
-
- [DossierParlementaire : Dossier de suivi d'un projet ou d'une proposition de loi, d'une résolution, etc](doc/api/README/interfaces/DossierParlementaire.md)
|
|
20
|
-
- [Organe : commission, groupe politique, groupe d'étude, groupe d'amitié, etc](doc/api/README/interfaces/Organe.md)
|
|
21
|
-
- [Question : question au Gouvernement](doc/api/README/interfaces/Question.md)
|
|
22
|
-
- [Reunion : séance publique, réunion de commission, de groupe d'étude, etc](doc/api/README/interfaces/Reunion.md)
|
|
23
|
-
- [Scrutin : vote de chaque député lors d'un scrutin public](doc/api/README/interfaces/Scrutin.md)
|
|
24
|
-
- [JSON Schemas](src/schemas)
|
|
25
|
-
|
|
26
|
-
## Requirements
|
|
27
|
-
|
|
28
|
-
- Node >= 18
|
|
29
|
-
|
|
30
|
-
## Installation
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
git clone https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee
|
|
34
|
-
cd tricoteuses-assemblee/
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
npm install
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Download and clean data
|
|
42
|
-
|
|
43
|
-
### Basic usage
|
|
44
|
-
|
|
45
|
-
Create a directory to store the data, then run the following command to download, reorganize and clean the data.
|
|
46
|
-
```bash
|
|
47
|
-
mkdir ../assemblee-data/
|
|
48
|
-
npm run data:download ../assemblee-data
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Available Commands
|
|
52
|
-
|
|
53
|
-
- `npm run data:download <dir>`: Download, reorganize, and clean data
|
|
54
|
-
- `npm run data:retrieve_open_data <dir>`: Download raw data files.
|
|
55
|
-
- `npm run data:reorganize_data <dir>`: Reorganize raw files by entity.
|
|
56
|
-
- `npm run data:clean_data <dir>`: Clean and validate reorganized files.
|
|
57
|
-
- `npm run data:retrieve_deputes_photos <dir>`: Retrieval of députés' pictures from Assemblée nationale's website
|
|
58
|
-
- `npm run data:retrieve_senateurs_photos <dir>`: Retrieval of sénateurs' pictures from Assemblée nationale's website
|
|
59
|
-
- `npm run data:retrieve_documents <dir>`: Retrieval of legislative documents from Assemblée nationale's website
|
|
60
|
-
- `npm run data:retrieve_pending_amendements <dir>`: Retrieval of pending amendments from Assemblée nationale's website (waiting to be processed by Assemblée services)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
_Notes_:
|
|
64
|
-
|
|
65
|
-
- Reorganized files (generated by the _data:reorganize_data_ command) are also available in [Tricoteuses / Data / Données brutes de l'Assemblée](https://git.en-root.org/tricoteuses/data/assemblee-brut). They are updated on a regular basis.
|
|
66
|
-
- Split & cleaned files (generated by the _data:clean_data_ command) are also available in [Tricoteuses / Data / Données nettoyées de l'Assemblée](https://git.en-root.org/tricoteuses/data/assemblee-nettoye) with the `_nettoye` suffix. They are updated on a regular basis.
|
|
67
|
-
|
|
68
|
-
### Filtering Options
|
|
69
|
-
|
|
70
|
-
Downloading and cleaning all the data is long and takes up a lot of disk space. It is possible to choose the type of data that you want to retrieve to reduce the load.
|
|
71
|
-
|
|
72
|
-
Examples:
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
# Only download amendments
|
|
76
|
-
npm run data:download ../assemblee-data -- -k Amendements
|
|
77
|
-
|
|
78
|
-
# Only process 16th and 17th legislatures
|
|
79
|
-
npm run data:download ../assemblee-data -- -l 16 -l 17
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### Common Options
|
|
83
|
-
|
|
84
|
-
- `--categories` or `-k <name>`: Filter by dataset categories (Available options : `ActeursEtOrganes`, `Agendas`, `Amendements`, `DossiersLegislatifs`, `Photos`, `Scrutins`, `Questions`, `ComptesRendusSeances`)
|
|
85
|
-
|
|
86
|
-
- `--legislature` or `-l <number>`: Specify one or more legislatures to process (e.g., `-l 15 -l 16`)
|
|
87
|
-
- `--dataDir <path>` (Mandatory): Path to the working directory where all data is stored (required)
|
|
88
|
-
- `--silent` or `-s`: Disable logging
|
|
89
|
-
- `--verbose` or `-v`: Enable verbose logging
|
|
90
|
-
- `--fetch` or `-f`: Force re-download of data even if already present
|
|
91
|
-
- `--commit` or `-c`: Automatically commit cleaned data
|
|
92
|
-
- `--pull` or `-p`: Pull repositories before starting
|
|
93
|
-
- `--clone` or `-C <url>`: Clone Git repositories from a remote group or organization
|
|
94
|
-
- `--remote` or `-r <name>`: Push commits to specified Git remote(s)
|
|
95
|
-
|
|
96
|
-
If you use such options, use them in all subsequent commands too (_data:regorganize_data_ and _data:clean_data_).
|
|
97
|
-
|
|
98
|
-
### Options for Cleaning Data
|
|
99
|
-
|
|
100
|
-
- `--dataset` or `-d <name>`: Clean a specific dataset only
|
|
101
|
-
- `--no-reset-after-commit`: Skip Git reset after committing (useful to preserve local changes)
|
|
102
|
-
- `--no-validate` or `-V`: Skip schema validation during cleaning
|
|
103
|
-
- `--fetchDocuments` : Specify to retrieve documents
|
|
104
|
-
- `--parseDocuments`: Specify to parse documents into cleaned json
|
|
105
|
-
- `--fetchVideos`: Retrieve videos
|
|
106
|
-
|
|
107
|
-
### Options for Retrieving Documents
|
|
108
|
-
|
|
109
|
-
- `--full` or `-f`: Retrieve all documents, even those already downloaded
|
|
110
|
-
- `--document-type` or `-T <type>`: Restrict to specific document types (e.g., `PION`)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
## Download using Docker
|
|
114
|
-
|
|
115
|
-
A Docker image that downloads and cleans the data all at once is available. Build it locally or run it from the container registry.
|
|
116
|
-
Use the environment variables `LEGISLATURE` and `CATEGORIES` if needed.
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
docker run --pull always --name tricoteuses-assemblee -v ../assemblee-data:/app/assemblee-data -e LEGISLATURE=17 -d git.tricoteuses.fr/logiciels/tricoteuses-assemblee:latest
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## Using the data
|
|
123
|
-
|
|
124
|
-
Once the data is downloaded and cleaned, you can use loaders to retrieve it.
|
|
125
|
-
To use loaders in your project, you can install the _@tricoteuses/assemblee_ package, and import the iterator functions that you need.
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
npm install @tricoteuses/assemblee
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
```js
|
|
132
|
-
import {
|
|
133
|
-
iterLoadAssembleeActeurs,
|
|
134
|
-
iterLoadAssembleeOrganes,
|
|
135
|
-
iterLoadAssembleeReunions,
|
|
136
|
-
iterLoadAssembleeScrutins,
|
|
137
|
-
iterLoadAssembleeDocuments,
|
|
138
|
-
iterLoadAssembleeDossiersParlementaires,
|
|
139
|
-
iterLoadAssembleeAmendements,
|
|
140
|
-
iterLoadAssembleeQuestions,
|
|
141
|
-
iterLoadAssembleeComptesRendus,
|
|
142
|
-
} from "@tricoteuses/assemblee/loaders";
|
|
143
|
-
|
|
144
|
-
// Pass data directory and legislature as arguments
|
|
145
|
-
for (const { acteur } of iterLoadAssembleeActeurs("../assemblee-data", 17)) {
|
|
146
|
-
console.log(acteur.uid)
|
|
147
|
-
}
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
## Generating schemas and documentation (for contributors only)
|
|
151
|
-
|
|
152
|
-
View instructions [here](https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee/-/blob/master/src/types)
|
|
1
|
+
# Tricoteuses-Assemblee
|
|
2
|
+
|
|
3
|
+
## _Retrieve, clean up & handle French Assemblée nationale's open data_
|
|
4
|
+
|
|
5
|
+
_Tricoteuses Légifrance_ is free and open source software.
|
|
6
|
+
|
|
7
|
+
- [software repository](https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee)
|
|
8
|
+
- [GNU Affero General Public License version 3 or greater](https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee/-/tree/master/LICENSE.md)
|
|
9
|
+
|
|
10
|
+
## documentation
|
|
11
|
+
|
|
12
|
+
- [Architecture](doc/architecture.md)
|
|
13
|
+
- [TypeScript API](doc/api/)
|
|
14
|
+
- Main interfaces:
|
|
15
|
+
- [Acteur : personne physique élue ou nommée dans des organes](doc/api/README/interfaces/Acteur.md)
|
|
16
|
+
- [Amendement](doc/api/README/interfaces/Amendement.md)
|
|
17
|
+
- [CompteRendu : compte-rendu d'un débat parlementaire](doc/api/README/interfaces/CompteRendu.md)
|
|
18
|
+
- [Document : texte d'un projet de loi, d'une proposition de loi, d'un rapport, etc](doc/api/README/interfaces/Document.md)
|
|
19
|
+
- [DossierParlementaire : Dossier de suivi d'un projet ou d'une proposition de loi, d'une résolution, etc](doc/api/README/interfaces/DossierParlementaire.md)
|
|
20
|
+
- [Organe : commission, groupe politique, groupe d'étude, groupe d'amitié, etc](doc/api/README/interfaces/Organe.md)
|
|
21
|
+
- [Question : question au Gouvernement](doc/api/README/interfaces/Question.md)
|
|
22
|
+
- [Reunion : séance publique, réunion de commission, de groupe d'étude, etc](doc/api/README/interfaces/Reunion.md)
|
|
23
|
+
- [Scrutin : vote de chaque député lors d'un scrutin public](doc/api/README/interfaces/Scrutin.md)
|
|
24
|
+
- [JSON Schemas](src/schemas)
|
|
25
|
+
|
|
26
|
+
## Requirements
|
|
27
|
+
|
|
28
|
+
- Node >= 18
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
git clone https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee
|
|
34
|
+
cd tricoteuses-assemblee/
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Download and clean data
|
|
42
|
+
|
|
43
|
+
### Basic usage
|
|
44
|
+
|
|
45
|
+
Create a directory to store the data, then run the following command to download, reorganize and clean the data.
|
|
46
|
+
```bash
|
|
47
|
+
mkdir ../assemblee-data/
|
|
48
|
+
npm run data:download ../assemblee-data
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Available Commands
|
|
52
|
+
|
|
53
|
+
- `npm run data:download <dir>`: Download, reorganize, and clean data
|
|
54
|
+
- `npm run data:retrieve_open_data <dir>`: Download raw data files.
|
|
55
|
+
- `npm run data:reorganize_data <dir>`: Reorganize raw files by entity.
|
|
56
|
+
- `npm run data:clean_data <dir>`: Clean and validate reorganized files.
|
|
57
|
+
- `npm run data:retrieve_deputes_photos <dir>`: Retrieval of députés' pictures from Assemblée nationale's website
|
|
58
|
+
- `npm run data:retrieve_senateurs_photos <dir>`: Retrieval of sénateurs' pictures from Assemblée nationale's website
|
|
59
|
+
- `npm run data:retrieve_documents <dir>`: Retrieval of legislative documents from Assemblée nationale's website
|
|
60
|
+
- `npm run data:retrieve_pending_amendements <dir>`: Retrieval of pending amendments from Assemblée nationale's website (waiting to be processed by Assemblée services)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
_Notes_:
|
|
64
|
+
|
|
65
|
+
- Reorganized files (generated by the _data:reorganize_data_ command) are also available in [Tricoteuses / Data / Données brutes de l'Assemblée](https://git.en-root.org/tricoteuses/data/assemblee-brut). They are updated on a regular basis.
|
|
66
|
+
- Split & cleaned files (generated by the _data:clean_data_ command) are also available in [Tricoteuses / Data / Données nettoyées de l'Assemblée](https://git.en-root.org/tricoteuses/data/assemblee-nettoye) with the `_nettoye` suffix. They are updated on a regular basis.
|
|
67
|
+
|
|
68
|
+
### Filtering Options
|
|
69
|
+
|
|
70
|
+
Downloading and cleaning all the data is long and takes up a lot of disk space. It is possible to choose the type of data that you want to retrieve to reduce the load.
|
|
71
|
+
|
|
72
|
+
Examples:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Only download amendments
|
|
76
|
+
npm run data:download ../assemblee-data -- -k Amendements
|
|
77
|
+
|
|
78
|
+
# Only process 16th and 17th legislatures
|
|
79
|
+
npm run data:download ../assemblee-data -- -l 16 -l 17
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Common Options
|
|
83
|
+
|
|
84
|
+
- `--categories` or `-k <name>`: Filter by dataset categories (Available options : `ActeursEtOrganes`, `Agendas`, `Amendements`, `DossiersLegislatifs`, `Photos`, `Scrutins`, `Questions`, `ComptesRendusSeances`)
|
|
85
|
+
|
|
86
|
+
- `--legislature` or `-l <number>`: Specify one or more legislatures to process (e.g., `-l 15 -l 16`)
|
|
87
|
+
- `--dataDir <path>` (Mandatory): Path to the working directory where all data is stored (required)
|
|
88
|
+
- `--silent` or `-s`: Disable logging
|
|
89
|
+
- `--verbose` or `-v`: Enable verbose logging
|
|
90
|
+
- `--fetch` or `-f`: Force re-download of data even if already present
|
|
91
|
+
- `--commit` or `-c`: Automatically commit cleaned data
|
|
92
|
+
- `--pull` or `-p`: Pull repositories before starting
|
|
93
|
+
- `--clone` or `-C <url>`: Clone Git repositories from a remote group or organization
|
|
94
|
+
- `--remote` or `-r <name>`: Push commits to specified Git remote(s)
|
|
95
|
+
|
|
96
|
+
If you use such options, use them in all subsequent commands too (_data:regorganize_data_ and _data:clean_data_).
|
|
97
|
+
|
|
98
|
+
### Options for Cleaning Data
|
|
99
|
+
|
|
100
|
+
- `--dataset` or `-d <name>`: Clean a specific dataset only
|
|
101
|
+
- `--no-reset-after-commit`: Skip Git reset after committing (useful to preserve local changes)
|
|
102
|
+
- `--no-validate` or `-V`: Skip schema validation during cleaning
|
|
103
|
+
- `--fetchDocuments` : Specify to retrieve documents
|
|
104
|
+
- `--parseDocuments`: Specify to parse documents into cleaned json
|
|
105
|
+
- `--fetchVideos`: Retrieve videos
|
|
106
|
+
|
|
107
|
+
### Options for Retrieving Documents
|
|
108
|
+
|
|
109
|
+
- `--full` or `-f`: Retrieve all documents, even those already downloaded
|
|
110
|
+
- `--document-type` or `-T <type>`: Restrict to specific document types (e.g., `PION`)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
## Download using Docker
|
|
114
|
+
|
|
115
|
+
A Docker image that downloads and cleans the data all at once is available. Build it locally or run it from the container registry.
|
|
116
|
+
Use the environment variables `LEGISLATURE` and `CATEGORIES` if needed.
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
docker run --pull always --name tricoteuses-assemblee -v ../assemblee-data:/app/assemblee-data -e LEGISLATURE=17 -d git.tricoteuses.fr/logiciels/tricoteuses-assemblee:latest
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Using the data
|
|
123
|
+
|
|
124
|
+
Once the data is downloaded and cleaned, you can use loaders to retrieve it.
|
|
125
|
+
To use loaders in your project, you can install the _@tricoteuses/assemblee_ package, and import the iterator functions that you need.
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
npm install @tricoteuses/assemblee
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
```js
|
|
132
|
+
import {
|
|
133
|
+
iterLoadAssembleeActeurs,
|
|
134
|
+
iterLoadAssembleeOrganes,
|
|
135
|
+
iterLoadAssembleeReunions,
|
|
136
|
+
iterLoadAssembleeScrutins,
|
|
137
|
+
iterLoadAssembleeDocuments,
|
|
138
|
+
iterLoadAssembleeDossiersParlementaires,
|
|
139
|
+
iterLoadAssembleeAmendements,
|
|
140
|
+
iterLoadAssembleeQuestions,
|
|
141
|
+
iterLoadAssembleeComptesRendus,
|
|
142
|
+
} from "@tricoteuses/assemblee/loaders";
|
|
143
|
+
|
|
144
|
+
// Pass data directory and legislature as arguments
|
|
145
|
+
for (const { acteur } of iterLoadAssembleeActeurs("../assemblee-data", 17)) {
|
|
146
|
+
console.log(acteur.uid)
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Generating schemas and documentation (for contributors only)
|
|
151
|
+
|
|
152
|
+
View instructions [here](https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee/-/blob/master/src/types)
|
package/lib/loaders.js
CHANGED
|
@@ -752,18 +752,25 @@ function* z(t, s, e, r, l, d = "json", { enriched: _ = !1, log: j = !1, noValida
|
|
|
752
752
|
_ ? "_enrichi" : "_nettoye"
|
|
753
753
|
)
|
|
754
754
|
);
|
|
755
|
-
for (const
|
|
756
|
-
if (!
|
|
755
|
+
for (const V of P(x, l)) {
|
|
756
|
+
if (!V[V.length - 1].endsWith(".json"))
|
|
757
757
|
continue;
|
|
758
|
-
const
|
|
759
|
-
j && console.log(`Loading file: ${
|
|
760
|
-
let
|
|
761
|
-
|
|
762
|
-
|
|
758
|
+
const D = i.join(x, ...V);
|
|
759
|
+
j && console.log(`Loading file: ${D}…`);
|
|
760
|
+
let $ = n.readFileSync(D, { encoding: "utf8" }), X;
|
|
761
|
+
try {
|
|
762
|
+
X = y ? JSON.parse($) : r($);
|
|
763
|
+
} catch (p) {
|
|
764
|
+
console.warn(
|
|
765
|
+
`[iterLoadAssembleeItems] skipped invalid JSON: ${D} (${p.message})`
|
|
766
|
+
);
|
|
767
|
+
continue;
|
|
768
|
+
}
|
|
769
|
+
F.has(X.uid) || (F.add(X.uid), yield {
|
|
763
770
|
datasetLegislature: v.legislature,
|
|
764
|
-
filePath:
|
|
765
|
-
item:
|
|
766
|
-
},
|
|
771
|
+
filePath: D,
|
|
772
|
+
item: X
|
|
773
|
+
}, $ = null);
|
|
767
774
|
}
|
|
768
775
|
}
|
|
769
776
|
F.clear();
|
|
@@ -1019,7 +1026,7 @@ function ve(t, s, e, { enriched: r = !1, log: l = !1 } = {}) {
|
|
|
1019
1026
|
v[f.uid] === void 0 && (v[f.uid] = f);
|
|
1020
1027
|
}
|
|
1021
1028
|
}
|
|
1022
|
-
const b = {}, x = {},
|
|
1029
|
+
const b = {}, x = {}, V = {}, O = {};
|
|
1023
1030
|
if (s & I.DossiersLegislatifs)
|
|
1024
1031
|
for (const o of A.dossiersLegislatifs) {
|
|
1025
1032
|
if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
|
|
@@ -1046,10 +1053,10 @@ function ve(t, s, e, { enriched: r = !1, log: l = !1 } = {}) {
|
|
|
1046
1053
|
const S = n.readFileSync(g, {
|
|
1047
1054
|
encoding: "utf8"
|
|
1048
1055
|
}), f = R.toDossierParlementaire(S), L = f.titreDossier;
|
|
1049
|
-
L.senatChemin && x[L.senatChemin] === void 0 && (x[L.senatChemin] = f), L.titreChemin &&
|
|
1056
|
+
L.senatChemin && x[L.senatChemin] === void 0 && (x[L.senatChemin] = f), L.titreChemin && V[L.titreChemin] === void 0 && (V[L.titreChemin] = f), O[f.uid] === void 0 && (O[f.uid] = f);
|
|
1050
1057
|
}
|
|
1051
1058
|
}
|
|
1052
|
-
let
|
|
1059
|
+
let D = {};
|
|
1053
1060
|
if (s & I.Photos) {
|
|
1054
1061
|
{
|
|
1055
1062
|
const o = i.join(
|
|
@@ -1061,7 +1068,7 @@ function ve(t, s, e, { enriched: r = !1, log: l = !1 } = {}) {
|
|
|
1061
1068
|
if (n.existsSync(o)) {
|
|
1062
1069
|
l && console.log(`Loading file: ${o}`);
|
|
1063
1070
|
const m = n.readFileSync(o, { encoding: "utf8" });
|
|
1064
|
-
Object.assign(
|
|
1071
|
+
Object.assign(D, JSON.parse(m));
|
|
1065
1072
|
} else l && console.log(`Ignoring missing file: ${o}`);
|
|
1066
1073
|
}
|
|
1067
1074
|
{
|
|
@@ -1073,11 +1080,11 @@ function ve(t, s, e, { enriched: r = !1, log: l = !1 } = {}) {
|
|
|
1073
1080
|
if (n.existsSync(o)) {
|
|
1074
1081
|
l && console.log(`Loading file: ${o}`);
|
|
1075
1082
|
const m = n.readFileSync(o, { encoding: "utf8" });
|
|
1076
|
-
Object.assign(
|
|
1083
|
+
Object.assign(D, JSON.parse(m));
|
|
1077
1084
|
} else l && console.log(`Ignoring missing file: ${o}`);
|
|
1078
1085
|
}
|
|
1079
1086
|
}
|
|
1080
|
-
const
|
|
1087
|
+
const $ = {};
|
|
1081
1088
|
if (s & I.Scrutins)
|
|
1082
1089
|
for (const o of A.scrutins) {
|
|
1083
1090
|
if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
|
|
@@ -1094,10 +1101,10 @@ function ve(t, s, e, { enriched: r = !1, log: l = !1 } = {}) {
|
|
|
1094
1101
|
const S = n.readFileSync(g, {
|
|
1095
1102
|
encoding: "utf8"
|
|
1096
1103
|
}), f = Z.toScrutin(S);
|
|
1097
|
-
|
|
1104
|
+
$[f.uid] === void 0 && ($[f.uid] = f);
|
|
1098
1105
|
}
|
|
1099
1106
|
}
|
|
1100
|
-
const
|
|
1107
|
+
const X = {};
|
|
1101
1108
|
if (s & I.Questions)
|
|
1102
1109
|
for (const o of A.questions) {
|
|
1103
1110
|
if (o.ignoreForWeb || e !== a.All && o.legislature !== a.All && e !== o.legislature)
|
|
@@ -1114,7 +1121,7 @@ function ve(t, s, e, { enriched: r = !1, log: l = !1 } = {}) {
|
|
|
1114
1121
|
const S = n.readFileSync(g, {
|
|
1115
1122
|
encoding: "utf8"
|
|
1116
1123
|
}), f = B.toQuestion(S);
|
|
1117
|
-
|
|
1124
|
+
X[f.uid] === void 0 && (X[f.uid] = f);
|
|
1118
1125
|
}
|
|
1119
1126
|
}
|
|
1120
1127
|
const p = {};
|
|
@@ -1142,15 +1149,15 @@ function ve(t, s, e, { enriched: r = !1, log: l = !1 } = {}) {
|
|
|
1142
1149
|
amendementByUid: v,
|
|
1143
1150
|
documentByUid: b,
|
|
1144
1151
|
dossierParlementaireBySenatChemin: x,
|
|
1145
|
-
dossierParlementaireByTitreChemin:
|
|
1152
|
+
dossierParlementaireByTitreChemin: V,
|
|
1146
1153
|
dossierParlementaireByUid: O,
|
|
1147
1154
|
organeByUid: _,
|
|
1148
|
-
photoByUid:
|
|
1155
|
+
photoByUid: D,
|
|
1149
1156
|
reunionByUid: j,
|
|
1150
1157
|
reunionsByDay: y,
|
|
1151
1158
|
reunionsByDossierUid: F,
|
|
1152
|
-
scrutinByUid:
|
|
1153
|
-
questionByUid:
|
|
1159
|
+
scrutinByUid: $,
|
|
1160
|
+
questionByUid: X,
|
|
1154
1161
|
compteRenduByUid: p
|
|
1155
1162
|
};
|
|
1156
1163
|
}
|
|
@@ -1211,7 +1218,7 @@ function Ie(t, s, e, { log: r = !1 } = {}) {
|
|
|
1211
1218
|
for (const g of c.amendements)
|
|
1212
1219
|
F[g.uid] === void 0 && (F[g.uid] = g);
|
|
1213
1220
|
}
|
|
1214
|
-
const v = {}, b = {}, x = {},
|
|
1221
|
+
const v = {}, b = {}, x = {}, V = {};
|
|
1215
1222
|
if (s & I.DossiersLegislatifs)
|
|
1216
1223
|
for (const p of A.dossiersLegislatifs) {
|
|
1217
1224
|
if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
|
|
@@ -1226,7 +1233,7 @@ function Ie(t, s, e, { log: r = !1 } = {}) {
|
|
|
1226
1233
|
v[c.uid] === void 0 && (v[c.uid] = c);
|
|
1227
1234
|
for (const c of u.dossiersParlementaires) {
|
|
1228
1235
|
const g = c.titreDossier;
|
|
1229
|
-
g.senatChemin && b[g.senatChemin] === void 0 && (b[g.senatChemin] = c), g.titreChemin && x[g.titreChemin] === void 0 && (x[g.titreChemin] = c),
|
|
1236
|
+
g.senatChemin && b[g.senatChemin] === void 0 && (b[g.senatChemin] = c), g.titreChemin && x[g.titreChemin] === void 0 && (x[g.titreChemin] = c), V[c.uid] === void 0 && (V[c.uid] = c);
|
|
1230
1237
|
}
|
|
1231
1238
|
}
|
|
1232
1239
|
const O = {};
|
|
@@ -1258,7 +1265,7 @@ function Ie(t, s, e, { log: r = !1 } = {}) {
|
|
|
1258
1265
|
} else r && console.log(`Ignoring missing file: ${o}`);
|
|
1259
1266
|
}
|
|
1260
1267
|
}
|
|
1261
|
-
const
|
|
1268
|
+
const D = {};
|
|
1262
1269
|
if (s & I.Scrutins)
|
|
1263
1270
|
for (const p of A.scrutins) {
|
|
1264
1271
|
if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
|
|
@@ -1270,9 +1277,9 @@ function Ie(t, s, e, { log: r = !1 } = {}) {
|
|
|
1270
1277
|
r && console.log(`Loading file: ${o}`);
|
|
1271
1278
|
const m = n.readFileSync(o, { encoding: "utf8" }), u = Z.toScrutins(m);
|
|
1272
1279
|
for (const c of u.scrutins)
|
|
1273
|
-
|
|
1280
|
+
D[c.uid] === void 0 && (D[c.uid] = c);
|
|
1274
1281
|
}
|
|
1275
|
-
const
|
|
1282
|
+
const $ = {};
|
|
1276
1283
|
if (s & I.Questions)
|
|
1277
1284
|
for (const p of A.questions) {
|
|
1278
1285
|
if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
|
|
@@ -1284,9 +1291,9 @@ function Ie(t, s, e, { log: r = !1 } = {}) {
|
|
|
1284
1291
|
r && console.log(`Loading file: ${o}`);
|
|
1285
1292
|
const m = n.readFileSync(o, { encoding: "utf8" }), u = B.toQuestions(m);
|
|
1286
1293
|
for (const c of u.questions)
|
|
1287
|
-
|
|
1294
|
+
$[c.uid] === void 0 && ($[c.uid] = c);
|
|
1288
1295
|
}
|
|
1289
|
-
const
|
|
1296
|
+
const X = {};
|
|
1290
1297
|
if (s & I.ComptesRendusSeances)
|
|
1291
1298
|
for (const p of A.comptesRendusSeances) {
|
|
1292
1299
|
if (p.ignoreForWeb || e !== a.All && p.legislature !== a.All && e !== p.legislature)
|
|
@@ -1298,7 +1305,7 @@ function Ie(t, s, e, { log: r = !1 } = {}) {
|
|
|
1298
1305
|
r && console.log(`Loading file: ${o}`);
|
|
1299
1306
|
const m = n.readFileSync(o, { encoding: "utf8" }), u = J.toComptesRendus(m);
|
|
1300
1307
|
for (const c of u.comptesRendus)
|
|
1301
|
-
|
|
1308
|
+
X[c.uid] === void 0 && (X[c.uid] = c);
|
|
1302
1309
|
}
|
|
1303
1310
|
return {
|
|
1304
1311
|
acteurByUid: l,
|
|
@@ -1306,15 +1313,15 @@ function Ie(t, s, e, { log: r = !1 } = {}) {
|
|
|
1306
1313
|
documentByUid: v,
|
|
1307
1314
|
dossierParlementaireBySenatChemin: b,
|
|
1308
1315
|
dossierParlementaireByTitreChemin: x,
|
|
1309
|
-
dossierParlementaireByUid:
|
|
1316
|
+
dossierParlementaireByUid: V,
|
|
1310
1317
|
organeByUid: d,
|
|
1311
1318
|
photoByUid: O,
|
|
1312
1319
|
reunionByUid: _,
|
|
1313
1320
|
reunionsByDay: j,
|
|
1314
1321
|
reunionsByDossierUid: y,
|
|
1315
|
-
scrutinByUid:
|
|
1316
|
-
questionByUid:
|
|
1317
|
-
compteRenduByUid:
|
|
1322
|
+
scrutinByUid: D,
|
|
1323
|
+
questionByUid: $,
|
|
1324
|
+
compteRenduByUid: X
|
|
1318
1325
|
};
|
|
1319
1326
|
}
|
|
1320
1327
|
function be(t, s, e) {
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "CompteRenduCommission",
|
|
4
|
-
"description": "Compte-rendu d'une réunion en commission d'examen d'un texte de loi",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"reunionRef": {
|
|
8
|
-
"description": "Référence vers la réunion",
|
|
9
|
-
"type": "string"
|
|
10
|
-
},
|
|
11
|
-
"interventions": {
|
|
12
|
-
"type": "array",
|
|
13
|
-
"items": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"description": "Prise de parole d'un orateur",
|
|
16
|
-
"properties": {
|
|
17
|
-
"acteurRef": {
|
|
18
|
-
"description": "Référence à l'acteur",
|
|
19
|
-
"type": "string"
|
|
20
|
-
},
|
|
21
|
-
"nomActeur": {
|
|
22
|
-
"description": "Nom de l'orateur",
|
|
23
|
-
"type": "string"
|
|
24
|
-
},
|
|
25
|
-
"groupe": {
|
|
26
|
-
"description": "Groupe parlementaire de l'orateur",
|
|
27
|
-
"type": "string"
|
|
28
|
-
},
|
|
29
|
-
"amendementRef": {
|
|
30
|
-
"description": "Amendement relatif à la prise de parole",
|
|
31
|
-
"type": "string"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"required": [
|
|
35
|
-
"nomActeur"
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"scrutins": {
|
|
40
|
-
"type": "array",
|
|
41
|
-
"items": {
|
|
42
|
-
"type": "object",
|
|
43
|
-
"description": "Prise de parole d'un orateur",
|
|
44
|
-
"properties": {
|
|
45
|
-
"amendementRef": {
|
|
46
|
-
"description": "Référence à l'amendement",
|
|
47
|
-
"type": "string"
|
|
48
|
-
},
|
|
49
|
-
"resultat": {
|
|
50
|
-
"description": "Résultat du scrutin",
|
|
51
|
-
"type": "string"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"required": [
|
|
55
|
-
"amendementRef"
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"required": [
|
|
61
|
-
"interventions"
|
|
62
|
-
]
|
|
63
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "CompteRenduCommission",
|
|
4
|
+
"description": "Compte-rendu d'une réunion en commission d'examen d'un texte de loi",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"reunionRef": {
|
|
8
|
+
"description": "Référence vers la réunion",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"interventions": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"description": "Prise de parole d'un orateur",
|
|
16
|
+
"properties": {
|
|
17
|
+
"acteurRef": {
|
|
18
|
+
"description": "Référence à l'acteur",
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"nomActeur": {
|
|
22
|
+
"description": "Nom de l'orateur",
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"groupe": {
|
|
26
|
+
"description": "Groupe parlementaire de l'orateur",
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
"amendementRef": {
|
|
30
|
+
"description": "Amendement relatif à la prise de parole",
|
|
31
|
+
"type": "string"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"required": [
|
|
35
|
+
"nomActeur"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"scrutins": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"description": "Prise de parole d'un orateur",
|
|
44
|
+
"properties": {
|
|
45
|
+
"amendementRef": {
|
|
46
|
+
"description": "Référence à l'amendement",
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"resultat": {
|
|
50
|
+
"description": "Résultat du scrutin",
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": [
|
|
55
|
+
"amendementRef"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"required": [
|
|
61
|
+
"interventions"
|
|
62
|
+
]
|
|
63
|
+
}
|
package/lib/schemas/debats.json
CHANGED
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
}
|
|
690
690
|
},
|
|
691
691
|
"transform": {
|
|
692
|
-
"$comment": "(\
|
|
692
|
+
"$comment": "(\n val: any,\n typ: any,\n getProps: any,\n key: any = \"\",\n parent: any = \"\") => any",
|
|
693
693
|
"type": "object",
|
|
694
694
|
"properties": {
|
|
695
695
|
"namedArgs": {
|
package/package.json
CHANGED
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tricoteuses/assemblee",
|
|
3
|
-
"version": "2.5.
|
|
4
|
-
"description": "Retrieve, clean up & handle French Assemblée nationale's open data",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"Assemblée nationale",
|
|
7
|
-
"France",
|
|
8
|
-
"open data",
|
|
9
|
-
"Parliament"
|
|
10
|
-
],
|
|
11
|
-
"author": "Emmanuel Raviart <emmanuel@raviart.com>",
|
|
12
|
-
"contributors": [
|
|
13
|
-
"Henry Boisgibault <h.boisgibault@gmail.com>",
|
|
14
|
-
"Loïc Dachary <loic@dachary.org>"
|
|
15
|
-
],
|
|
16
|
-
"bugs": {
|
|
17
|
-
"url": "https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee/issues"
|
|
18
|
-
},
|
|
19
|
-
"homepage": "https://tricoteuses.fr/",
|
|
20
|
-
"license": "AGPL-3.0-or-later",
|
|
21
|
-
"repository": {
|
|
22
|
-
"type": "git",
|
|
23
|
-
"url": "https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee.git"
|
|
24
|
-
},
|
|
25
|
-
"type": "module",
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": ">=20.0.0"
|
|
28
|
-
},
|
|
29
|
-
"files": [
|
|
30
|
-
"lib"
|
|
31
|
-
],
|
|
32
|
-
"exports": {
|
|
33
|
-
".": {
|
|
34
|
-
"typedoc": "./src/index.ts",
|
|
35
|
-
"import": "./lib/index.js",
|
|
36
|
-
"types": "./lib/index.d.ts"
|
|
37
|
-
},
|
|
38
|
-
"./cleaners": {
|
|
39
|
-
"typedoc": "./src/cleaners/index.ts",
|
|
40
|
-
"import": "./lib/cleaners.js",
|
|
41
|
-
"types": "./lib/cleaners/index.d.ts"
|
|
42
|
-
},
|
|
43
|
-
"./git": {
|
|
44
|
-
"typedoc": "./src/git.ts",
|
|
45
|
-
"import": "./lib/git.js",
|
|
46
|
-
"types": "./lib/git.d.ts"
|
|
47
|
-
},
|
|
48
|
-
"./loaders": {
|
|
49
|
-
"typedoc": "./src/loaders.ts",
|
|
50
|
-
"import": "./lib/loaders.js",
|
|
51
|
-
"types": "./lib/loaders.d.ts"
|
|
52
|
-
},
|
|
53
|
-
"./parsers": {
|
|
54
|
-
"typedoc": "./src/parsers/index.ts",
|
|
55
|
-
"import": "./lib/parsers.js",
|
|
56
|
-
"types": "./lib/parsers/index.d.ts"
|
|
57
|
-
},
|
|
58
|
-
"./package.json": "./package.json"
|
|
59
|
-
},
|
|
60
|
-
"publishConfig": {
|
|
61
|
-
"access": "public"
|
|
62
|
-
},
|
|
63
|
-
"scripts": {
|
|
64
|
-
"build": "vite build && npm run build:doc:api && npm run build:json-schemas && npm run prettier",
|
|
65
|
-
"build:doc:api": "typedoc --plugin typedoc-plugin-markdown --out ./doc/api --readme none",
|
|
66
|
-
"build:json-schemas": "tsx src/scripts/generate-json-schemas.ts && tsx src/scripts/copy-schemas.ts",
|
|
67
|
-
"clean": "rimraf lib",
|
|
68
|
-
"data:clean_data": "tsx src/scripts/clean_reorganized_data.ts --no-validate",
|
|
69
|
-
"data:download": "tsx src/scripts/data-download.ts",
|
|
70
|
-
"data:reorganize_data": "tsx src/scripts/reorganize_data.ts --no-validate-raw",
|
|
71
|
-
"data:retrieve_deputes_photos": "tsx src/scripts/retrieve_deputes_photos.ts --fetch",
|
|
72
|
-
"data:retrieve_documents": "tsx src/scripts/retrieve_documents.ts",
|
|
73
|
-
"data:retrieve_open_data": "tsx src/scripts/retrieve_open_data.ts --fetch",
|
|
74
|
-
"data:retrieve_pending_amendements": "tsx src/scripts/retrieve_pending_amendments.ts --incremental",
|
|
75
|
-
"data:retrieve_senateurs_photos": "tsx src/scripts/retrieve_senateurs_photos.ts --fetch",
|
|
76
|
-
"lint": "eslint .",
|
|
77
|
-
"prepare": "npm run build",
|
|
78
|
-
"prettier": "prettier --write \"src/**/*.ts\"",
|
|
79
|
-
"test:iter_load": "tsx src/scripts/test_iter_load.ts",
|
|
80
|
-
"type-check": "tsc --noEmit",
|
|
81
|
-
"type-check:watch": "npm run type-check -- --watch"
|
|
82
|
-
},
|
|
83
|
-
"dependencies": {
|
|
84
|
-
"cheerio": "^1.1.0",
|
|
85
|
-
"command-line-args": "^6.0.1",
|
|
86
|
-
"command-line-usage": "^7.0.3",
|
|
87
|
-
"date-fns": "^4.1.0",
|
|
88
|
-
"deep-equal": "^2.2.3",
|
|
89
|
-
"deep-object-diff": "^1.1.0",
|
|
90
|
-
"fast-xml-parser": "^5.0.8",
|
|
91
|
-
"front-matter": "^4.0.2",
|
|
92
|
-
"fs-extra": "^11.2.0",
|
|
93
|
-
"glob": "^11.0.0",
|
|
94
|
-
"js-yaml": "^4.0.0",
|
|
95
|
-
"node-html-parser": "^7.0.1",
|
|
96
|
-
"node-stream-zip": "^1.11.6",
|
|
97
|
-
"p-limit": "^7.2.0",
|
|
98
|
-
"sharp": "^0.34.2"
|
|
99
|
-
},
|
|
100
|
-
"devDependencies": {
|
|
101
|
-
"@eslint/js": "^9.27.0",
|
|
102
|
-
"@types/command-line-args": "^5.2.3",
|
|
103
|
-
"@types/command-line-usage": "^5.0.4",
|
|
104
|
-
"@types/deep-equal": "^1.0.4",
|
|
105
|
-
"@types/fs-extra": "^11.0.4",
|
|
106
|
-
"@types/js-yaml": "^4.0.0",
|
|
107
|
-
"@types/node": "^22.7.6",
|
|
108
|
-
"@types/temp": "^0.9.0",
|
|
109
|
-
"@types/unzipper": "^0.10.3",
|
|
110
|
-
"ajv": "^8.0.4",
|
|
111
|
-
"eslint": "^9.27.0",
|
|
112
|
-
"globals": "^16.1.0",
|
|
113
|
-
"prettier": "^3.5.3",
|
|
114
|
-
"rimraf": "^6.0.1",
|
|
115
|
-
"temp": "^0.9.1",
|
|
116
|
-
"ts-json-schema-generator": "^2.4.0",
|
|
117
|
-
"tslib": "^2.0.2",
|
|
118
|
-
"tsx": "^4.0.0",
|
|
119
|
-
"typedoc": "^0.28.5",
|
|
120
|
-
"typedoc-plugin-markdown": "^4.6.4",
|
|
121
|
-
"typescript": "^5.8.3",
|
|
122
|
-
"typescript-eslint": "^8.32.1",
|
|
123
|
-
"vite": "^7.0.4",
|
|
124
|
-
"vite-plugin-dts": "^4.5.4"
|
|
125
|
-
}
|
|
126
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tricoteuses/assemblee",
|
|
3
|
+
"version": "2.5.3",
|
|
4
|
+
"description": "Retrieve, clean up & handle French Assemblée nationale's open data",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"Assemblée nationale",
|
|
7
|
+
"France",
|
|
8
|
+
"open data",
|
|
9
|
+
"Parliament"
|
|
10
|
+
],
|
|
11
|
+
"author": "Emmanuel Raviart <emmanuel@raviart.com>",
|
|
12
|
+
"contributors": [
|
|
13
|
+
"Henry Boisgibault <h.boisgibault@gmail.com>",
|
|
14
|
+
"Loïc Dachary <loic@dachary.org>"
|
|
15
|
+
],
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee/issues"
|
|
18
|
+
},
|
|
19
|
+
"homepage": "https://tricoteuses.fr/",
|
|
20
|
+
"license": "AGPL-3.0-or-later",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee.git"
|
|
24
|
+
},
|
|
25
|
+
"type": "module",
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=20.0.0"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"lib"
|
|
31
|
+
],
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"typedoc": "./src/index.ts",
|
|
35
|
+
"import": "./lib/index.js",
|
|
36
|
+
"types": "./lib/index.d.ts"
|
|
37
|
+
},
|
|
38
|
+
"./cleaners": {
|
|
39
|
+
"typedoc": "./src/cleaners/index.ts",
|
|
40
|
+
"import": "./lib/cleaners.js",
|
|
41
|
+
"types": "./lib/cleaners/index.d.ts"
|
|
42
|
+
},
|
|
43
|
+
"./git": {
|
|
44
|
+
"typedoc": "./src/git.ts",
|
|
45
|
+
"import": "./lib/git.js",
|
|
46
|
+
"types": "./lib/git.d.ts"
|
|
47
|
+
},
|
|
48
|
+
"./loaders": {
|
|
49
|
+
"typedoc": "./src/loaders.ts",
|
|
50
|
+
"import": "./lib/loaders.js",
|
|
51
|
+
"types": "./lib/loaders.d.ts"
|
|
52
|
+
},
|
|
53
|
+
"./parsers": {
|
|
54
|
+
"typedoc": "./src/parsers/index.ts",
|
|
55
|
+
"import": "./lib/parsers.js",
|
|
56
|
+
"types": "./lib/parsers/index.d.ts"
|
|
57
|
+
},
|
|
58
|
+
"./package.json": "./package.json"
|
|
59
|
+
},
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "vite build && npm run build:doc:api && npm run build:json-schemas && npm run prettier",
|
|
65
|
+
"build:doc:api": "typedoc --plugin typedoc-plugin-markdown --out ./doc/api --readme none",
|
|
66
|
+
"build:json-schemas": "tsx src/scripts/generate-json-schemas.ts && tsx src/scripts/copy-schemas.ts",
|
|
67
|
+
"clean": "rimraf lib",
|
|
68
|
+
"data:clean_data": "tsx src/scripts/clean_reorganized_data.ts --no-validate",
|
|
69
|
+
"data:download": "tsx src/scripts/data-download.ts",
|
|
70
|
+
"data:reorganize_data": "tsx src/scripts/reorganize_data.ts --no-validate-raw",
|
|
71
|
+
"data:retrieve_deputes_photos": "tsx src/scripts/retrieve_deputes_photos.ts --fetch",
|
|
72
|
+
"data:retrieve_documents": "tsx src/scripts/retrieve_documents.ts",
|
|
73
|
+
"data:retrieve_open_data": "tsx src/scripts/retrieve_open_data.ts --fetch",
|
|
74
|
+
"data:retrieve_pending_amendements": "tsx src/scripts/retrieve_pending_amendments.ts --incremental",
|
|
75
|
+
"data:retrieve_senateurs_photos": "tsx src/scripts/retrieve_senateurs_photos.ts --fetch",
|
|
76
|
+
"lint": "eslint .",
|
|
77
|
+
"prepare": "npm run build",
|
|
78
|
+
"prettier": "prettier --write \"src/**/*.ts\"",
|
|
79
|
+
"test:iter_load": "tsx src/scripts/test_iter_load.ts",
|
|
80
|
+
"type-check": "tsc --noEmit",
|
|
81
|
+
"type-check:watch": "npm run type-check -- --watch"
|
|
82
|
+
},
|
|
83
|
+
"dependencies": {
|
|
84
|
+
"cheerio": "^1.1.0",
|
|
85
|
+
"command-line-args": "^6.0.1",
|
|
86
|
+
"command-line-usage": "^7.0.3",
|
|
87
|
+
"date-fns": "^4.1.0",
|
|
88
|
+
"deep-equal": "^2.2.3",
|
|
89
|
+
"deep-object-diff": "^1.1.0",
|
|
90
|
+
"fast-xml-parser": "^5.0.8",
|
|
91
|
+
"front-matter": "^4.0.2",
|
|
92
|
+
"fs-extra": "^11.2.0",
|
|
93
|
+
"glob": "^11.0.0",
|
|
94
|
+
"js-yaml": "^4.0.0",
|
|
95
|
+
"node-html-parser": "^7.0.1",
|
|
96
|
+
"node-stream-zip": "^1.11.6",
|
|
97
|
+
"p-limit": "^7.2.0",
|
|
98
|
+
"sharp": "^0.34.2"
|
|
99
|
+
},
|
|
100
|
+
"devDependencies": {
|
|
101
|
+
"@eslint/js": "^9.27.0",
|
|
102
|
+
"@types/command-line-args": "^5.2.3",
|
|
103
|
+
"@types/command-line-usage": "^5.0.4",
|
|
104
|
+
"@types/deep-equal": "^1.0.4",
|
|
105
|
+
"@types/fs-extra": "^11.0.4",
|
|
106
|
+
"@types/js-yaml": "^4.0.0",
|
|
107
|
+
"@types/node": "^22.7.6",
|
|
108
|
+
"@types/temp": "^0.9.0",
|
|
109
|
+
"@types/unzipper": "^0.10.3",
|
|
110
|
+
"ajv": "^8.0.4",
|
|
111
|
+
"eslint": "^9.27.0",
|
|
112
|
+
"globals": "^16.1.0",
|
|
113
|
+
"prettier": "^3.5.3",
|
|
114
|
+
"rimraf": "^6.0.1",
|
|
115
|
+
"temp": "^0.9.1",
|
|
116
|
+
"ts-json-schema-generator": "^2.4.0",
|
|
117
|
+
"tslib": "^2.0.2",
|
|
118
|
+
"tsx": "^4.0.0",
|
|
119
|
+
"typedoc": "^0.28.5",
|
|
120
|
+
"typedoc-plugin-markdown": "^4.6.4",
|
|
121
|
+
"typescript": "^5.8.3",
|
|
122
|
+
"typescript-eslint": "^8.32.1",
|
|
123
|
+
"vite": "^7.0.4",
|
|
124
|
+
"vite-plugin-dts": "^4.5.4"
|
|
125
|
+
}
|
|
126
|
+
}
|