-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.sh (deprecated)
41 lines (37 loc) · 1.4 KB
/
data.sh (deprecated)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# #!/usr/bin/bash
# make_tmp () {
# mkdir -p "data_preprocessing/tmp"
# }
# db () {
# text=$(find -name output.txt)
# maker=$(find -name makeDB.py)
# cat $text | python3 $maker
# }
# txt () {
# converter=$(find -name makeTxt4DB.py)
# python3 $converter
# }
# if [ "$1" == "make" ]
# then
# make_tmp
# txt
# db
# elif [ "$1" == "db" ]
# then
# db
# elif [ "$1" == "txt" ]
# then
# txt
# elif [ "$1" == "view" ]
# then
# maker=$(find -name makeCSV.py)
# py $maker
# else
# printf "Please enter one of the following commands:\n\n"
# printf "./data.sh make:\n\tConvert the csv files at data_preprocessing/input into a sqlite3 database at ./program/server/data/database.db.\n\n"
# printf "./data.sh db:\n\tConvert txt files from data_preprocessing/tmp into a sqlite3 database at ./program/server/data/database.db.\n"
# printf "\t- This is an intermediary step for database creation; 'db' runs only this step in the creation.\n\n"
# printf "./data.sh txt:\n\tCreates the .txt files used in creating the database from .csv files at data_preprocessing/input.py\n"
# printf "\t- This is an intermediary step for database creation; 'txt' runs only this step in the creation.\n\n"
# printf "./data.sh view: \n\tConverts all tables in database.db into .csv files for further analysis. Files will be created at data_preprocessing/csv."
# fi