diff --git a/api/data/bdpm/.gitkeep b/api/data/bdpm/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/api/data/database.links.txt b/api/data/database.links.txt new file mode 100644 index 0000000..5fd8d04 --- /dev/null +++ b/api/data/database.links.txt @@ -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 \ No newline at end of file diff --git a/api/utils/get_database.sh b/api/utils/get_database.sh new file mode 100755 index 0000000..78ab85d --- /dev/null +++ b/api/utils/get_database.sh @@ -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 \ No newline at end of file