aboutsummaryrefslogtreecommitdiff
path: root/dbparse.js
diff options
context:
space:
mode:
authorJoel Kronqvist <work.joelkronqvist@gmail.com>2022-10-24 16:43:53 +0300
committerJoel Kronqvist <work.joelkronqvist@gmail.com>2022-10-24 16:43:53 +0300
commit569fe38f54b21d9b7de5a8b48cbf14987383281d (patch)
tree711b62a7c91708ddcba30d8c41c37b1c729ad260 /dbparse.js
parenta760ac4091d400b2ae1f461550eed5004b444844 (diff)
downloadLYLLRuoka-569fe38f54b21d9b7de5a8b48cbf14987383281d.tar.gz
LYLLRuoka-569fe38f54b21d9b7de5a8b48cbf14987383281d.zip
Added removal of dumb header in shifts that crashed the parsing
Diffstat (limited to 'dbparse.js')
-rw-r--r--dbparse.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/dbparse.js b/dbparse.js
index a65add0..7e8d8fd 100644
--- a/dbparse.js
+++ b/dbparse.js
@@ -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);