synchronization with osgameclones

This commit is contained in:
Trilarion
2019-11-20 16:18:26 +01:00
parent 5c23a828b9
commit 523c0ca55a
106 changed files with 284 additions and 251 deletions

View File

@ -160,8 +160,8 @@ def parse_entry(content):
for field in ['home', 'download', 'play', 'code repository']:
if field in info:
for url in info[field]:
if not (url.startswith('http://') or url.startswith('https://') or url.startswith('git://') or url.startswith('svn://')):
raise RuntimeError('URL "{}" in entry "{}" does not start with http'.format(url, info['name']))
if not any([url.startswith(x) for x in ['http://', 'https://', 'git://', 'svn://', 'ftp://']]):
raise RuntimeError('URL "{}" in entry "{}" does not start with http/https/git/svn/ftp'.format(url, info['name']))
if ' ' in url:
raise RuntimeError('URL "{}" in entry "{}" contains a space'.format(url, info['name']))

View File

@ -269,7 +269,7 @@ def unzip(zip_file, destination_directory):
def strip_url(url):
for prefix in ('http://', 'https://', 'www.'):
for prefix in ('http://', 'https://', 'svn://', 'www.'):
if url.startswith(prefix):
url = url[len(prefix):]
for suffix in ('/', '.git', '/en', '/index.html'):