summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro <[email protected]>2024-05-31 23:12:49 -0600
committerAlejandro <[email protected]>2024-05-31 23:12:49 -0600
commitc68fcffccef9ddf63af598a76edecfa499ad8fa3 (patch)
tree62e83b9b2c5655c780b5e0761d2f31d4abdfa6f8
parentcbe3d53b2195d15945fcf946ca7f2117ade9ee4a (diff)
Added: Script files for randomizing and compiling
-rw-r--r--pdf-compile.sh3
-rw-r--r--random-values.sh48
2 files changed, 51 insertions, 0 deletions
diff --git a/pdf-compile.sh b/pdf-compile.sh
new file mode 100644
index 0000000..4fe9cab
--- /dev/null
+++ b/pdf-compile.sh
@@ -0,0 +1,3 @@
+for i in {1..150}; do
+ pdflatex -jobname="$i" template.tex
+done
diff --git a/random-values.sh b/random-values.sh
new file mode 100644
index 0000000..66ae9ab
--- /dev/null
+++ b/random-values.sh
@@ -0,0 +1,48 @@
+for i in {1..150}; do
+ AGE=$(shuf -i 20-40 -n 1)
+ HEARTRATE=$(shuf -i 60-100 -n 1)
+ BREATHRATE=$(shuf -i 12-20 -n 1)
+ TENSIONSISTOLICA=$(shuf -i 120-139 -n 1)
+ TEENSIONDIASTOLICA=$(shuf -i 80-89 -n 1)
+ NAMENUMBER=$(shuf -i 1-100 -n 1)
+ HEIGHTCENTIMETERS=$(shuf -i 165-185 -n 1)
+ if (("$HEIGHTCENTIMETERS" >= 165 && "$HEIGHTCENTIMETERS" <= 180)); then
+ WEIGHTNUMBER=$(shuf -i 1-11 -n 1)
+ else
+ WEIGHTNUMBER=$(shuf -i 11-26 -n 1)
+ fi
+ WEIGHT=$(sed -n "$WEIGHTNUMBER"p weight-list.txt)
+ NAME=$(sed -n "$NAMENUMBER"p name-list.txt)
+ FIRSTAPELLIDONUM=$(shuf -i 1-100 -n 1)
+ SECONDAPELLIDONUM=$(shuf -i 1-100 -n 1)
+ FIRSTAPELLIDO=$(sed -n "$FIRSTAPELLIDONUM"p apellidos-list.txt)
+ SECONDAPELLIDO=$(sed -n "$SECONDAPELLIDONUM"p apellidos-list.txt)
+ if (("$NAMENUMBER" >= 1 && "$NAMENUMBER" <= 59)); then
+ ASAB="Masculino"
+ else
+ ASAB="Femenino"
+ fi
+ if(("$AGE" >= 20 && "$AGE" <= 28));then
+ UNDERGRADNUM=$(shuf -i 0-1 -n 1)
+ else
+ UNDERGRADNUM=0
+ fi
+ [ "$UNDERGRADNUM" == 1 ] && UNDERGRAD="Si"
+ [ "$UNDERGRADNUM" == 0 ] && UNDERGRAD="No"
+ [ "$UNDERGRAD" == "Si" ] && CAREERNUMBER=$(shuf -i 1-17 -n 1) && CAREER=$(sed -n "$CAREERNUMBER"p career-list.txt)
+ [ "$UNDERGRAD" == "No" ] && CAREERNUMBER=$(shuf -i 1-56 -n 1) && CAREER=$(sed -n "$CAREERNUMBER"p job-list.txt)
+ EXERCISEHOEURS=$(shuf -i 2-12 -n 1)
+ [ "$CAREER" == "Medicina" ] || [ "$CAREER" == "Enfermería" ] || [ "$CAREER" == "Médico" ] || [ "$CAREER" == "Profesional en ciencias del deporte" ] && EXERCISEHOEURS=$(shuf -i 7-14 -n 1)
+
+ echo "\\def\\age{$AGE}
+ \\def\\asab{$ASAB}
+ \\def\\weight{$WEIGHT kg}
+ \\def\\talla{$HEIGHTCENTIMETERS cm}
+ \\def\\undergrad{$UNDERGRAD}
+ \\def\\career{$CAREER}
+ \\def\\horasejercicio{$EXERCISEHOEURS horas}
+ \\def\\heartrate{$HEARTRATE}
+ \\def\\breathrate{$BREATHRATE}
+ \\def\\presion{$TENSIONSISTOLICA/$TEENSIONDIASTOLICA mmHg}
+ \\def\\name{$NAME $FIRSTAPELLIDO $SECONDAPELLIDO}" > "$i".info
+done