X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=parse%2Fparse-wiki-songlist.pl;h=5a35d67a51fe69e711e7c038bbeb876b0a22ca5f;hp=169dbd26552cbde95c68eaf7dae5e7958a063256;hb=d660a4666bdc97237f19a8d1d3afbb137c753691;hpb=4df0f31f45e22db83701a52dd2e5dc9ecc3ea67b diff --git a/parse/parse-wiki-songlist.pl b/parse/parse-wiki-songlist.pl index 169dbd2..5a35d67 100644 --- a/parse/parse-wiki-songlist.pl +++ b/parse/parse-wiki-songlist.pl @@ -4,11 +4,13 @@ use warnings; # Parses songlist from the DDRNO wiki +print "begin;\n"; + while (<>) { m/ \| \s* \[\[ (.*?) \]\] \s* # song name \|\| \s* \[\[ (.*?) \]\] \s* # artist - \|\| \s* (\d+(-\d+)?) \s* # bpm + \|\| \s* (\d+(?:-(\d+))?) \s* # bpm \|\| \s* (\d+) \s* # single beginner \|\| \s* (\d+) \s* # single standard \|\| \s* (\d+) \s* # single difficult @@ -46,5 +48,6 @@ while (<>) { printf "INSERT INTO songratings (song,playmode,difficulty,feetrating) VALUES ((SELECT song FROM songs WHERE title='%s'),'%s','%s',%u);\n", $songname, $t->[0], $t->[1], $t->[2]; } - } + +printf "commit;\n";