--- /dev/null
+<?php declare(strict_types=1);
+
+require('common.php');
+
+$songHashMap = foldMap(
+ ☐(∘(field(0), delemit(' ')))(∘(field(5), delemit('/')))
+)(foldMap(∘(lines, 'trim', 'file_get_contents'))(glob(PATH_TO_GROOVENET . '/songs.*.txt')));
+
+file_put_contents(__DIR__ . '/hashmap.txt', serialize($songHashMap));
'Edit' => '📓'
];
-$songHashMap = foldMap(
- ☐(∘(field(0), delemit(' ')))(∘(field(5), delemit('/')))
-)(foldMap(∘(lines, 'trim', 'file_get_contents'))(glob(PATH_TO_GROOVENET . '/songs.*.txt')));
-
+$songHashMap = unserialize(file_get_contents(__DIR__ . '/hashmap.txt'));
$scoreFiles = foldMap(∘(☐(lhead)(null), 'file_get_contents'))(glob(PATH_TO_GROOVENET . '/*.scores.txt'));
$faveFiles = foldMap(☐(null)(∘(lines, 'trim', 'file_get_contents')))(glob(PATH_TO_GROOVENET . '/*.favourites.txt'));
$names = map(☐(produceValue(0))(null))(array_keys($faveFiles));