diff options
author | Joel Kronqvist <work.joelkronqvist@gmail.com> | 2022-10-24 16:43:53 +0300 |
---|---|---|
committer | Joel Kronqvist <work.joelkronqvist@gmail.com> | 2022-10-24 16:43:53 +0300 |
commit | 569fe38f54b21d9b7de5a8b48cbf14987383281d (patch) | |
tree | 711b62a7c91708ddcba30d8c41c37b1c729ad260 | |
parent | a760ac4091d400b2ae1f461550eed5004b444844 (diff) | |
download | LYLLRuoka-569fe38f54b21d9b7de5a8b48cbf14987383281d.tar.gz LYLLRuoka-569fe38f54b21d9b7de5a8b48cbf14987383281d.zip |
Added removal of dumb header in shifts that crashed the parsing
-rw-r--r-- | classes.txt | 8 | ||||
-rw-r--r-- | dbparse.js | 1 |
2 files changed, 1 insertions, 8 deletions
diff --git a/classes.txt b/classes.txt deleted file mode 100644 index ce5663b..0000000 --- a/classes.txt +++ /dev/null @@ -1,8 +0,0 @@ -ÄI7.1: A205 -FY5.2: B102 -MA8.4: B101 -EA5.2: B209 -FI2.6: B103 -EA5.6: B211 -BI4.2: A102 -HI2.4: B210 @@ -71,6 +71,7 @@ async function writeShifts(data, DB) DB.query_raw("DELETE FROM shiftnames") ]); + data = data.replace(/RUOKAILUVUOROT.*/, ""); const dbOperations = []; const shiftRegex = /((?:MAANANTAI|TIISTAI|KESKIVIIKKO|TORSTAI|PERJANTAI)?.*)\s*(RUOKAILU.*)\s*(.*)/gmi; const shifts = data.matchAll(shiftRegex); |