You've already forked etude_lego_jurassic_world
Premiers éléments de l'étude
This commit is contained in:
25
scripts/download_parts_data.py
Normal file
25
scripts/download_parts_data.py
Normal file
@@ -0,0 +1,25 @@
|
||||
"""Télécharge les fichiers nécessaires aux pièces LEGO depuis Rebrickable."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from lib.rebrickable.downloader import download_rebrickable_files
|
||||
|
||||
|
||||
FILES_TO_DOWNLOAD = [
|
||||
"inventories.csv.gz",
|
||||
"inventory_parts.csv.gz",
|
||||
"parts.csv.gz",
|
||||
"colors.csv.gz",
|
||||
"inventory_minifigs.csv.gz",
|
||||
"minifigs.csv.gz"
|
||||
]
|
||||
DESTINATION_DIR = Path("data/raw")
|
||||
|
||||
|
||||
def main() -> None:
|
||||
"""Lance le téléchargement des fichiers liés aux pièces LEGO."""
|
||||
download_rebrickable_files(FILES_TO_DOWNLOAD, DESTINATION_DIR)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user