diff --git a/src/extraeDatos.sh b/src/extraeDatos.sh new file mode 100644 index 0000000..c43bfd7 --- /dev/null +++ b/src/extraeDatos.sh @@ -0,0 +1,22 @@ +echo "extrayendo usuarios..." +curl https://reymota.es/usuarios/api/usuarios/ > mediafiles/usuarios.json + +echo "Extrayendo artistas de lyrics..." + +curl https://reymota.es/lyrics/api/artistas/ > mediafiles/artistas.json + +echo "Extrayendo albums de lyrics..." + +curl https://reymota.es/lyrics/api/albumes/ > mediafiles/albumes.json + +echo "Extrayendo canciones de lyrics..." + +curl https://reymota.es/lyrics/api/canciones/ > mediafiles/canciones.json + +echo "Extrayendo vehiculos de repostajes..." + +curl https://reymota.es/repostajes/api/vehiculos/ > mediafiles/vehiculos.json + +echo "Extrayendo repostajes..." + +curl https://reymota.es/repostajes/api/repostajes/ > mediafiles/repostajes.json diff --git a/src/importaDatos.sh b/src/importaDatos.sh new file mode 100644 index 0000000..915e0c3 --- /dev/null +++ b/src/importaDatos.sh @@ -0,0 +1,9 @@ +#!/bin/bash +./manage.py importar_artistas mediafiles/artistas.json +./manage.py importar_albumes mediafiles/albumes.json +./manage.py importar_canciones mediafiles/canciones.json + +./manage.py importar_usuarios mediafiles/usuarios.json + +./manage.py importar_vehiculos mediafiles/vehiculos.json +./manage.py importar_repostajes mediafiles/repostajes.json