added keywords (originals, type) from osgameclones, changed readme categories not as list anymore

This commit is contained in:
Trilarion
2019-08-20 16:20:06 +02:00
parent c06ef46efe
commit afaa1bba84
138 changed files with 575 additions and 354 deletions

View File

@ -52,17 +52,21 @@ def update_readme_and_tocs(infos):
# create all toc and readme entry
title = 'All'
file = '_all.md'
update = ['- **[{}](games/{}#{})** ({})\n'.format(title, file, title, len(infos))]
update_prefix = '**[{}](games/{}#{})** ({})'.format(title, file, title, len(infos))
create_toc(title, file, infos)
update = []
for keyword in recommended_keywords:
infos_filtered = [x for x in infos if keyword in x['keywords']]
title = keyword.capitalize()
name = keyword.replace(' ', '-')
file = '_{}.md'.format(name)
update.append('- **[{}](games/{}#{})** ({})\n'.format(title, file, name, len(infos_filtered)))
update.append('**[{}](games/{}#{})** ({})'.format(title, file, name, len(infos_filtered)))
create_toc(title, file, infos_filtered)
update = ''.join(update)
update.sort()
update.insert(0, update_prefix)
update = ', '.join(update)
update += '\n'
# insert new text in the middle (the \n before the second comment is necessary, otherwise Markdown displays it as part of the bullet list)
text = start + "[comment]: # (start of autogenerated content, do not edit)\n" + update + "\n[comment]: # (end of autogenerated content)" + end