Created bulk medicaments database downloader
This commit is contained in:
parent
c671b886f4
commit
f9f2b48689
0
api/data/bdpm/.gitkeep
Normal file
0
api/data/bdpm/.gitkeep
Normal file
8
api/data/database.links.txt
Normal file
8
api/data/database.links.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
CIS_bdpm.txt
|
||||||
|
CIS_CIP_bdpm.txt
|
||||||
|
CIS_COMPO_bdpm.txt
|
||||||
|
CIS_HAS_SMR_bdpm.txt
|
||||||
|
CIS_HAS_ASMR_bdpm.txt
|
||||||
|
HAS_LiensPageCT_bdpm.txt
|
||||||
|
CIS_CPD_bdpm.txt
|
||||||
|
CIS_InfoImportantes.txt
|
12
api/utils/get_database.sh
Executable file
12
api/utils/get_database.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#! /usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
DATABASE_DOWNLOAD_ENDPOINT="https://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier="
|
||||||
|
|
||||||
|
for file in $(cat ./data/database.links.txt); do
|
||||||
|
if [[ -z "$file" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
echo "Downloading $file"
|
||||||
|
wget -O "./data/bdpm/${file}" "${DATABASE_DOWNLOAD_ENDPOINT}${file}"
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user