From 27a5bae53428625bdf57ec37cfab08cd19308831 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 11 May 2020 23:43:21 +0200 Subject: [PATCH] move path creation to separate file --- bin/functions.php | 10 ++++++++++ bin/import-game-data.php | 6 +----- 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 bin/functions.php diff --git a/bin/functions.php b/bin/functions.php new file mode 100644 index 0000000..fe94108 --- /dev/null +++ b/bin/functions.php @@ -0,0 +1,10 @@ + diff --git a/bin/import-game-data.php b/bin/import-game-data.php index 14996c4..11ed6b3 100755 --- a/bin/import-game-data.php +++ b/bin/import-game-data.php @@ -7,6 +7,7 @@ * @author Christian Weiske */ ini_set('xdebug.halt_level', E_WARNING|E_NOTICE|E_USER_WARNING|E_USER_NOTICE); +require_once __DIR__ . '/functions.php'; require_once __DIR__ . '/filters.php'; if (!isset($argv[1])) { error('Pass the path to a "folders" file with game data json files folder names'); @@ -698,11 +699,6 @@ function buildDiscoverGameTile($game) ]; } -function categoryPath($title) -{ - return str_replace(['/', '\\', ' ', '+', '?'], '_', $title); -} - function getAllAges($games) { $ages = []; -- 2.30.2