improved static website

This commit is contained in:
Trilarion
2020-09-21 10:23:12 +02:00
parent c18b225780
commit 9d65ee912b
16 changed files with 381 additions and 155 deletions

View File

@ -85,6 +85,14 @@ known_licenses = (
'LGPL-2.1', 'LGPL-3.0', 'MAME', 'MIT', 'MPL-1.1', 'MPL-2.0', 'MS-PL', 'MS-RL', 'NetHack General Public License',
'None', 'Proprietary', 'Public domain', 'SWIG license', 'Unlicense', 'WTFPL', 'wxWindows license', 'zlib', '?')
license_urls = {
'2-clause BSD': 'https://en.wikipedia.org/wiki/BSD_licenses#2-clause_license_(%22Simplified_BSD_License%22_or_%22FreeBSD_License%22)',
'3-clause BSD': 'https://en.wikipedia.org/wiki/BSD_licenses#3-clause_license_(%22BSD_License_2.0%22,_%22Revised_BSD_License%22,_%22New_BSD_License%22,_or_%22Modified_BSD_License%22)',
'AFL-3.0': 'https://en.wikipedia.org/wiki/Academic_Free_License',
'AGPL-3.0': 'https://en.wikipedia.org/wiki/GNU_Affero_General_Public_License',
'Apache-2.0': 'https://en.wikipedia.org/wiki/Apache_License'
}
# valid multiplayer modes (can be combined with "+" )
valid_multiplayer_modes = (
'competitive', 'co-op', 'hotseat', 'LAN', 'local', 'massive', 'matchmaking', 'online', 'split-screen')

View File

@ -38,9 +38,9 @@ def entry_iterator():
yield entry, entry_path, content
def canonical_entry_name(name):
def canonical_name(name):
"""
Derives a canonical game name from an actual game name (suitable for file names, ...)
Derives a canonical name from an actual name (suitable for file names, anchor names, ...)
"""
name = name.casefold()
name = name.replace('ö', 'o').replace('ä', 'a').replace('ü', 'u')
@ -302,7 +302,7 @@ def check_and_process_entry(entry):
# check canonical file name
file = entry['File']
canonical_file_name = canonical_entry_name(entry['Title']) + '.md'
canonical_file_name = canonical_name(entry['Title']) + '.md'
# we also allow -X with X =2..9 as possible extension (because of duplicate canonical file names)
if canonical_file_name != file and canonical_file_name != file[:-5] + '.md':
message += 'file name should be {}\n'.format(canonical_file_name)