From 4328dd17bfcd4c33a77c4405d52c3660a6c62bf5 Mon Sep 17 00:00:00 2001 From: nil0j Date: Fri, 27 Sep 2024 17:27:02 +0200 Subject: update --- rust/.ignore | 1 + rust/Cargo.toml | 1 + rust/scripts/create_db.sh | 5 ++- rust/scripts/create_user.sql | 4 +- rust/scripts/populate.sh | 13 ++++++ rust/scripts/populate/.gitignore | 3 ++ rust/scripts/populate/albums.py | 38 +++++++++++++++++ rust/scripts/populate/api.py | 21 ++++++++++ rust/scripts/populate/create_db.sql | 39 +++++++++++++++++ rust/scripts/populate/database.py | 83 +++++++++++++++++++++++++++++++++++++ rust/scripts/populate/main.py | 46 ++++++++++++++++++++ rust/scripts/populate/parser.py | 83 +++++++++++++++++++++++++++++++++++++ rust/scripts/populate/structures.py | 13 ++++++ scrap/.gitignore | 3 -- scrap/albums.py | 38 ----------------- scrap/api.py | 21 ---------- scrap/create_db.sql | 38 ----------------- scrap/database.py | 83 ------------------------------------- scrap/main.py | 46 -------------------- scrap/parser.py | 78 ---------------------------------- scrap/structures.py | 12 ------ 21 files changed, 347 insertions(+), 322 deletions(-) create mode 100644 rust/.ignore create mode 100644 rust/scripts/populate.sh create mode 100644 rust/scripts/populate/.gitignore create mode 100644 rust/scripts/populate/albums.py create mode 100644 rust/scripts/populate/api.py create mode 100644 rust/scripts/populate/create_db.sql create mode 100644 rust/scripts/populate/database.py create mode 100644 rust/scripts/populate/main.py create mode 100644 rust/scripts/populate/parser.py create mode 100644 rust/scripts/populate/structures.py delete mode 100644 scrap/.gitignore delete mode 100644 scrap/albums.py delete mode 100644 scrap/api.py delete mode 100644 scrap/create_db.sql delete mode 100644 scrap/database.py delete mode 100644 scrap/main.py delete mode 100644 scrap/parser.py delete mode 100644 scrap/structures.py diff --git a/rust/.ignore b/rust/.ignore new file mode 100644 index 0000000..0b68341 --- /dev/null +++ b/rust/.ignore @@ -0,0 +1 @@ +# scripts/populate/ diff --git a/rust/Cargo.toml b/rust/Cargo.toml index bc8db03..b4a8000 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -11,6 +11,7 @@ tokio = "1.40.0" [package.metadata.scripts] db_create = "bash ./scripts/create_db.sh" +db_populate = "bash ./scripts/populate.sh" # db_start = "sudo docker start sqlx" # db_start = "sudo docker stop sqlx" # db_remove = "sudo docker rm sqlx" diff --git a/rust/scripts/create_db.sh b/rust/scripts/create_db.sh index cddcdd9..4e6ebc1 100644 --- a/rust/scripts/create_db.sh +++ b/rust/scripts/create_db.sh @@ -1,10 +1,11 @@ #!/bin/bash -echo "choose a password for the database: 'input;" +echo "choose a password for the database:" read input -echo $(pwd) echo "creating database..." sudo mariadb -u root <