Closed Jumaruba closed 2 years ago
A makefile automation was added to the project. It ease the execution of the following tasks:
make
mkdir fetcher/data
copy mysql/sql/1_faculty.sql fetcher/data/
copy mysql/sql/2_course.sql fetcher/data/
copy mysql/sql/3_course_unit.sql fetcher/data/
copy mysql/sql/4_schedule.sql fetcher/data/
make upload
The output should be similar to this:
{"status":"success","data":{"url":"https://tmpfiles.org/30588/1_faculty.sql"}} {"status":"success","data":{"url":"https://tmpfiles.org/30589/2_course.sql"}} {"status":"success","data":{"url":"https://tmpfiles.org/30590/3_course_unit.sql"}} {"status":"success","data":{"url":"https://tmpfiles.org/30591/4_schedule.sql"}}
Copy the URL fields from the upload section to fetcher/config.cfg. It should look similar to this:
fetcher/config.cfg
[urls] 1_faculty=https://tmpfiles.org/dl/30588/1_faculty.sql 2_course=https://tmpfiles.org/dl/30589/2_course.sql 3_course_unit=https://tmpfiles.org/dl/30590/3_course_unit.sql 4_schedule=https://tmpfiles.org/dl/30591/4_schedule.sql [upload] url=https://tmpfiles.org/api/v1/upload param_name=file path=./data
Execute:
make download
clean fetcher
fetcher/data
clean_database
mysql/data
💡 Additions
A makefile automation was added to the project. It ease the execution of the following tasks:
✔️ Testing
Initialize the project
make
Upload
mkdir fetcher/data
copy mysql/sql/1_faculty.sql fetcher/data/
copy mysql/sql/2_course.sql fetcher/data/
copy mysql/sql/3_course_unit.sql fetcher/data/
copy mysql/sql/4_schedule.sql fetcher/data/
make upload
The output should be similar to this:
Download
Copy the URL fields from the upload section to
fetcher/config.cfg
. It should look similar to this:Execute:
make download
Clean
Execute:
clean fetcher
fetcher/data
folder was deletedclean_database
mysql/data
folder was deleted