[game-data-packager] 03/03: yaml2json: use a clearer way to get the game name
Simon McVittie
smcv at debian.org
Wed Sep 30 23:46:18 UTC 2015
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository game-data-packager.
commit c07cc7c4e63697c64ccb00258bf684df6ebbd393
Author: Simon McVittie <smcv at debian.org>
Date: Thu Oct 1 00:45:46 2015 +0100
yaml2json: use a clearer way to get the game name
---
tools/yaml2json.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/yaml2json.py b/tools/yaml2json.py
index 2a73199..513b615 100755
--- a/tools/yaml2json.py
+++ b/tools/yaml2json.py
@@ -23,7 +23,7 @@ import yaml
def main(f, out):
data = yaml.load(open(f, encoding='utf-8'), Loader=yaml.CLoader)
- game = f[5:].split('.')[0]
+ game = os.path.splitext(os.path.basename(f))[0]
with open('data/wikipedia.csv', 'r', encoding='utf8') as csv:
for line in csv.readlines():
shortname, url = line.strip().split(';', 1)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list