README.md 2.1 KB
Newer Older
Emmanuel Raviart's avatar
Emmanuel Raviart committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# EZ-DDI

_Fetch, validate, convert & serve CESSDA-compliants DDI repositories._

## Installation

```bash
git clone https://git.nomics.world/progedo/ez-ddi.git
cd ez-ddi/
npm install
```

## Usage

Emmanuel Raviart's avatar
Emmanuel Raviart committed
15
16
### Fetching Nesstar Servers

Emmanuel Raviart's avatar
Emmanuel Raviart committed
17
18
```bash
npx tsc
19
# ADISP
20
npx babel-node --extensions ".ts" src/scripts/retrieve_nesstar_ddis.js --url http://nesstar.progedo-adisp.fr/ ../public_data/adisp-ddi/
21
# CDSP Sciences Po
22
npx babel-node --extensions ".ts" src/scripts/retrieve_nesstar_ddis.js --url http://nesstar.sciences-po.fr/ ../public_data/cdsp-ddi/
23
# INED
24
npx babel-node --extensions ".ts" src/scripts/retrieve_nesstar_ddis.js --url http://nesstar.ined.fr/ ../public_data/ined-ddi/
25
# INED - Generations and Gender Survey
26
npx babel-node --extensions ".ts" src/scripts/retrieve_nesstar_ddis.js --url http://ggpsurvey.ined.fr/ ../public_data/ined-gpgsurvey-ddi/
27
# UK Data Service
28
npx babel-node --extensions ".ts" src/scripts/retrieve_nesstar_ddis.js --url http://nesstar.ukdataservice.ac.uk/ ../public_data/ukdataservice-ddi/
29
# Norwegian Centre for Research Data
30
npx babel-node --extensions ".ts" src/scripts/retrieve_nesstar_ddis.js --url http://nsddata.nsd.uib.no ../public_data/nsddata-ddi/
Emmanuel Raviart's avatar
Emmanuel Raviart committed
31
```
Emmanuel Raviart's avatar
Emmanuel Raviart committed
32
33
34
35

### Extracting TypeScript Raw Types from DDI files

```bash
36
npx babel-node --extensions ".ts" --max-old-space-size=10240 src/scripts/raw_types_from_ddi_files.ts ../public_data/adisp-ddi/ ../public_data/adisp-ddi/ ../public_data/ined-ddi/ --target=src/raw_types/enquetes.ts
Emmanuel Raviart's avatar
Emmanuel Raviart committed
37
38
npx babel-node --extensions ".ts" --max-old-space-size=8192 src/scripts/raw_types_from_ddi_files.ts ../public_data/xml-ddi-adisp/ --target=src/raw_types/enquetes_adisp_fournies.ts
npx babel-node --extensions ".ts" --max-old-space-size=8192 src/scripts/raw_types_from_ddi_files.ts ../public_data/adisp-ddi/ --target=src/raw_types/enquetes_adisp.ts
39
40
npx babel-node --extensions ".ts" src/scripts/raw_types_from_ddi_files.ts ../public_data/cdsp-ddi/ --target=src/raw_types/enquetes_cdsp.ts
npx babel-node --extensions ".ts" src/scripts/raw_types_from_ddi_files.ts ../public_data/ined-ddi/ --target=src/raw_types/enquetes_ined.ts
Emmanuel Raviart's avatar
Emmanuel Raviart committed
41
42
43
44

# Prettify generated TypeScript files:
npm run prettier
```