imports from osgameclones, added backlog and rejected lists, started libregamewiki synchronization

This commit is contained in:
Trilarion
2019-08-26 15:39:29 +02:00
parent acb0763f59
commit 135d5b3968
67 changed files with 1468 additions and 188 deletions

View File

@ -3,16 +3,22 @@ Specific functions working on the games.
"""
import re
from difflib import SequenceMatcher
from utils.utils import *
essential_fields = ('Home', 'State', 'Keywords', 'Code repository', 'Code language', 'Code license')
valid_fields = ('Home', 'Media', 'State', 'Play', 'Download', 'Platform', 'Keywords', 'Code repository', 'Code language',
'Code license', 'Code dependencies', 'Assets license', 'Build system', 'Build instructions')
valid_platforms = ('Windows', 'Linux', 'macOS', 'Android', 'Web')
valid_platforms = ('Windows', 'Linux', 'macOS', 'Android', 'iOS', 'Web')
recommended_keywords = ('action', 'arcade', 'adventure', 'visual novel', 'sports', 'platform', 'puzzle', 'role playing', 'simulation', 'strategy', 'card game', 'board game', 'music', 'educational', 'tool', 'game engine', 'framework', 'library', 'remake')
regex_sanitize_name = re.compile(r"[^A-Za-z 0-9-]+")
regex_sanitize_name_space_eater = re.compile(r" +")
def game_name_similarity(a, b):
return SequenceMatcher(None, str.casefold(a), str.casefold(b)).ratio()
def entry_iterator(games_path):
"""