1 | # fiches-travail-data
|
2 |
|
3 | > Json formated data from from set of page of travail-emploi website
|
4 | You can include json data
|
5 |
|
6 | [![Node.js CI](https://github.com/SocialGouv/fiches-travail-data/workflows/Node.js%20CI/badge.svg)](https://github.com/SocialGouv/fiches-travail-data/actions?query=workflow%3A%22Node.js+CI%22+branch%3Amaster)
|
7 | [![Release](https://github.com/SocialGouv/fiches-travail-data/workflows/Release/badge.svg)](https://github.com/SocialGouv/fiches-travail-data/actions?query=workflow%3ARelease+branch%3Amaster)
|
8 | [![codecov](https://codecov.io/gh/SocialGouv/fiches-travail-data/branch/master/graph/badge.svg)](https://codecov.io/gh/SocialGouv/fiches-travail-data)
|
9 |
|
10 | <br>
|
11 | <br>
|
12 |
|
13 | ## Usage
|
14 |
|
15 | ```js
|
16 | const { decodeEmail} = require("@socialgouv/fiches-travail-data");
|
17 | const fichesMT = require("@socialgouv/fiches-travail-data/data/fiches-travail.json");
|
18 | ```
|
19 |
|
20 |
|
21 | ## Development
|
22 |
|
23 | Build dist folder once
|
24 |
|
25 | ```sh
|
26 | $ yarn build
|
27 | ```
|
28 |
|
29 | Make sure references are good
|
30 |
|
31 | ```sh
|
32 | $ yarn checkRefs
|
33 | ```
|
34 |
|
35 | Fetch fiches from https://travail-emploi.gouv.fr
|
36 |
|
37 | ```sh
|
38 | $ yarn start
|
39 | ```
|
40 |
|
41 | ## Tests
|
42 |
|
43 | ```sh
|
44 | $ yarn test
|
45 | ```
|
46 |
|
47 | ## Release policy
|
48 |
|
49 | The release job is schedule every day at 23.00PM ans also trigger after each commit in the master branch.
|
50 | If data had changed, a new release will be made.
|
51 |
|
52 | ### Manual release
|
53 |
|
54 | If you need to trigger the release job manually, you can do it using curl
|
55 | You will need to provide a valid token.
|
56 |
|
57 | ```sh
|
58 | curl -H "Accept: application/vnd.github.everest-preview+json" \
|
59 | -H "Authorization: token <your-token-here>" \
|
60 | --request POST \
|
61 | --data '{"event_type": "manual_release"}' \
|
62 | https://api.github.com/repos/SocialGouv/fiches-travail-data/dispatches
|
63 | ```
|
64 |
|
65 | ### email
|
66 |
|
67 | There are some email adresses in the data. To prevent email sniffing
|
68 | we transform the `@` into `_@`.
|