Skip to content

Commit

Permalink
rename of entries fields to get only singular field names
Browse files Browse the repository at this point in the history
  • Loading branch information
Trilarion committed Sep 28, 2020
1 parent 2d52caf commit 873679f
Show file tree
Hide file tree
Showing 1,453 changed files with 2,944 additions and 2,943 deletions.
6 changes: 2 additions & 4 deletions code/backlog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ http://icculus.org/jugglemaster/
http://icculus.org/pyddr/
http://icculus.org/toby/
http://iichantra.ru/en/
https://github.com/armory3d/iron
https://github.com/AxioDL/urde
https://github.com/Gramps/GodotSteam
http://insideastarfilledsky.net/
http://lazerbears.wixsite.com/lazerbears/cr-editor
http://libagar.org/agar/index.html.en
Expand All @@ -51,7 +48,6 @@ http://roguebasin.roguelikedevelopment.org/index.php?title=Main_Page
http://sam.zoy.org/monsterz/
http://senseis.xmp.net/?GoPlayingPrograms
http://sio2interactive.com/
https://github.com/EasyRPG/Editor-Qt
http://slick.ninjacave.com/
http://snowstorm.sourceforge.net/cgi-bin/site.cgi
http://sol.gfxile.net/ambrose3d/index.html
Expand Down Expand Up @@ -208,6 +204,7 @@ https://github.com/adriengivry/Overload
https://github.com/aloisdeniel/awesome-monogame
https://github.com/Alzter/TuxBuilder
https://github.com/amerkoleci/Vortice.Windows
https://github.com/armory3d/iron
https://github.com/arturkot/the-house-game
https://github.com/asweigart/PythonStdioGames
https://github.com/AtomicGameEngine/AtomicGameEngine
Expand Down Expand Up @@ -275,6 +272,7 @@ https://github.com/GNOME/quadrapassel
https://github.com/godot-extended-libraries/godot-next
https://github.com/godot-mega-man/Mega-Man-Engine
https://github.com/godotengine/godot-design
https://github.com/Gramps/GodotSteam
https://github.com/grantjenks/free-python-games (check all)
https://github.com/guillaumechereau/goxel
https://github.com/H-uru/Plasma
Expand Down
41 changes: 20 additions & 21 deletions code/generate_static_website.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,28 @@
# TODO index.html tiles, content
# TODO index.html image (maybe downloaded and assembled from osgameclones)
# TODO index.html only count games
# TODO Font awesome 5 (icons for OS, for Github, Gitlab and maybe others)
# TODO contribute.html tiles? content
# TODO games pages links to licenses (wikipedia)
# TODO Font awesome 4 or others (icons for OS, for Github, Gitlab and maybe others like external link)
# TODO contribute.html tiles? content?
# TODO games: links to licenses (wikipedia)
# TODO indexes: make categories bold that have a certain amount of entries!
# TODO everywhere: style URLs (Github, Wikipedia, Internet archive, SourceForge, ...)
# TODO developers pages links to games and more information, styles
# TODO inspirations pages, add link to games and more information, styles
# TODO navbar add is active
# TODO developers: links to games and more information, styles
# TODO inspirations: add link to games and more information, styles
# TODO statistics page: better and more statistics with links where possible
# TODO meaningful information (links, license, last updated with lower precision)
# TODO singular, plural everywhere (game, entries, items)
# TODO background and shadow for the boxes
# TODO line breaks and spaces in html source and output
# TODO rename fields (Home to Homepage, Inspirations to Inspiration)
# TODO developers contact expand to links to Github, Sourceforge
# TODO games keywords as labels (some as links)
# TODO games links to licenses and languages
# TODO platforms as labels and with links
# TODO split games in libraries/tools/frameworks and real games
# TODO developers: contact expand to links to Github, Sourceforge
# TODO games: keywords as labels (some as links)
# TODO games: links languages
# TODO games: platforms as labels and with links
# TODO split games in libraries/tools/frameworks and real games, add menu
# TODO statistics with nice graphics (pie charts in SVG) with matplotlib, seaborn, plotly?
# TODO statistics, get it from common statistics generator
# TODO optimize jinja for line breaks and indention
# TODO @notices in entries
# TODO optimize jinja for line breaks and indention and minimal amount of spaces
# TODO replace or remove @notices in entries (maybe different entries format)
# TODO icons: for the main categories (devs, games, statistics, home, ...)
# TODO SEO optimizations, google search ...

import os
import shutil
Expand All @@ -49,7 +48,7 @@
developers_path = 'developers'

plurals = {k: k+'s' for k in ('Assets license', 'Contact', 'Code language', 'Code license', 'Developer', 'Download', 'Inspiration', 'Game', 'Home', 'Organization', 'Platform')}
for k in ('Media', 'Play', 'Keywords'):
for k in ('Media', 'Play', 'Keyword'):
plurals[k] = k
for k in ('Code repository', 'Code dependency'):
plurals[k] = k[:-1] + 'ies'
Expand Down Expand Up @@ -308,10 +307,10 @@ def convert_entries(entries, inspirations, developers):
developer_references = {developer['Name']: developer['href'] for developer in developers}
for entry in entries:
fields = []
for field in ('Home', 'Inspirations', 'Media', 'Download', 'Play', 'Developer', 'Keywords'):
for field in ('Home', 'Inspiration', 'Media', 'Download', 'Play', 'Developer', 'Keyword'):
if field in entry:
e = entry[field]
if field == 'Inspirations':
if field == 'Inspiration':
field = 'Inspiration' # TODO this is a bug, rename in entries
if isinstance(e[0], osg.osg_parse.ValueWithComment):
e = [x.value for x in e]
Expand All @@ -331,12 +330,12 @@ def convert_entries(entries, inspirations, developers):
if 'Note' in entry:
fields.append({'entries': [{'href': '', 'name': entry['Note']}]})
fields.append({'title': 'Technical info', 'entries': []})
for field in ('Platform', 'Code language', 'Code license', 'Code repository', 'Code dependencies', 'Assets license'):
for field in ('Platform', 'Code language', 'Code license', 'Code repository', 'Code dependency', 'Assets license'):
if field in entry:
e = entry[field]
if not e:
continue
if field == 'Code dependencies':
if field == 'Code dependency':
field = 'Code dependency' # bug, rename field
if isinstance(e[0], osg.osg_parse.ValueWithComment):
e = [x.value for x in e]
Expand Down Expand Up @@ -386,7 +385,7 @@ def generate(entries, inspirations, developers):
developers_by_alphabet = sort_into_categories(developers, extended_alphabet, lambda item, category: category == item['letter'])

genres = [keyword.capitalize() for keyword in c.recommended_keywords]
games_by_genre = sort_into_categories(entries, genres, lambda item, category: category.lower() in item['Keywords'])
games_by_genre = sort_into_categories(entries, genres, lambda item, category: category.lower() in item['Keyword'])
games_by_platform = sort_into_categories(entries, c.valid_platforms, lambda item, category: category in item.get('Platform', []), 'Unspecified')
games_by_language = sort_into_categories(entries, c.known_languages, lambda item, category: category in item['Code language'])

Expand Down
26 changes: 13 additions & 13 deletions code/maintenance_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def check_inconsistencies(self):
# get all keywords and print similar keywords
keywords = []
for entry in self.entries:
keywords.extend(entry['Keywords'])
if b'first\xe2\x80\x90person'.decode() in entry['Keywords']:
keywords.extend(entry['Keyword'])
if b'first\xe2\x80\x90person'.decode() in entry['Keyword']:
print(entry['File'])
keywords = [x.value for x in keywords]

Expand All @@ -142,7 +142,7 @@ def check_inconsistencies(self):
# get all names of frameworks and library also using osg.code_dependencies_aliases
valid_dependencies = list(c.general_code_dependencies_without_entry.keys())
for entry in self.entries:
if any((x in ('framework', 'library', 'game engine') for x in entry['Keywords'])):
if any((x in ('framework', 'library', 'game engine') for x in entry['Keyword'])):
name = entry['Title']
if name in c.code_dependencies_aliases:
valid_dependencies.extend(c.code_dependencies_aliases[name])
Expand All @@ -152,7 +152,7 @@ def check_inconsistencies(self):
# get all referenced code dependencies
referenced_dependencies = {}
for entry in self.entries:
deps = entry.get('Code dependencies', [])
deps = entry.get('Code dependency', [])
for dependency in deps:
dependency = dependency.value
if dependency in referenced_dependencies:
Expand Down Expand Up @@ -376,10 +376,10 @@ def update_readme_tocs(self):
tocs_text = ''

# split into games, tools, frameworks, libraries
games = [x for x in self.entries if not any([y in x['Keywords'] for y in ('tool', 'framework', 'library')])]
tools = [x for x in self.entries if 'tool' in x['Keywords']]
frameworks = [x for x in self.entries if 'framework' in x['Keywords']]
libraries = [x for x in self.entries if 'library' in x['Keywords']]
games = [x for x in self.entries if not any([y in x['Keyword'] for y in ('tool', 'framework', 'library')])]
tools = [x for x in self.entries if 'tool' in x['Keyword']]
frameworks = [x for x in self.entries if 'framework' in x['Keyword']]
libraries = [x for x in self.entries if 'library' in x['Keyword']]

# create games, tools, frameworks, libraries tocs
title = 'Games'
Expand All @@ -405,7 +405,7 @@ def update_readme_tocs(self):
# create by category
categories_text = []
for keyword in c.recommended_keywords:
filtered = [x for x in self.entries if keyword in x['Keywords']]
filtered = [x for x in self.entries if keyword in x['Keyword']]
title = keyword.capitalize()
name = keyword.replace(' ', '-')
file = '_{}.md'.format(name)
Expand Down Expand Up @@ -506,7 +506,7 @@ def update_statistics(self):

# Keywords
statistics += '## Keywords\n\n'
field = 'Keywords'
field = 'Keyword'

# get all keywords together
keywords = []
Expand Down Expand Up @@ -556,7 +556,7 @@ def update_statistics(self):

# Code dependencies
statistics += '## Code dependencies\n\n'
field = 'Code dependencies'
field = 'Code dependency'

# get all code dependencies together
code_dependencies = []
Expand Down Expand Up @@ -653,7 +653,7 @@ def update_html(self):
return

# make database out of it
db = {'headings': ['Game', 'Description', 'Download', 'State', 'Keywords', 'Source']}
db = {'headings': ['Game', 'Description', 'Download', 'State', 'Keyword', 'Source']}

entries = []
for info in self.entries:
Expand All @@ -676,7 +676,7 @@ def update_html(self):
'inactive since {}'.format(osg.extract_inactive_year(info)) if osg.is_inactive(info) else 'active'))

# keywords
keywords = info['Keywords']
keywords = info['Keyword']
keywords = [x.value for x in keywords]
entry.append(', '.join(keywords))

Expand Down
4 changes: 2 additions & 2 deletions code/maintenance_inspirations.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def check_for_missing_inspirations_in_entries(self):
print('Entry "{}" listed in inspiration "{}" but this entry does not exist'.format(entry_name, inspiration_name))
else:
entry = x[0]
if 'Inspirations' not in entry or inspiration_name not in entry['Inspirations']:
if 'Inspiration' not in entry or inspiration_name not in entry['Inspiration']:
print('Entry "{}" listed in inspiration "{}" but not listed in this entry'.format(entry_name, inspiration_name))
print('missed inspirations checked')

Expand All @@ -90,7 +90,7 @@ def update_inspired_entries(self):
# loop over all entries and add to inspirations of entry
for entry in self.entries:
entry_name = entry['Title']
for inspiration in entry.get('Inspirations', []):
for inspiration in entry.get('Inspiration', []):
inspiration = inspiration.value
if inspiration in self.inspirations:
self.inspirations[inspiration]['Inspired entries'].append(entry_name)
Expand Down
10 changes: 5 additions & 5 deletions code/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ def get_config(key):
generic_comment_string = '[comment]: # (partly autogenerated content, edit with care, read the manual before)'

# these fields have to be present in each entry (in this order)
essential_fields = ('File', 'Title', 'Home', 'State', 'Keywords', 'Code repository', 'Code language', 'Code license')

valid_properties = ('Home', 'Media', 'Inspirations', 'State', 'Play', 'Download', 'Platform', 'Keywords', 'Code repository', 'Code language',
'Code license', 'Code dependencies', 'Assets license', 'Developer')
essential_fields = ('File', 'Title', 'Home', 'State', 'Keyword', 'Code repository', 'Code language', 'Code license')

# only these fields can be used currently (in this order)
valid_properties = ('Home', 'Media', 'Inspiration', 'State', 'Play', 'Download', 'Platform', 'Keyword', 'Code repository', 'Code language',
'Code license', 'Code dependency', 'Assets license', 'Developer')

valid_fields = ('File', 'Title') + valid_properties + ('Note', 'Building')

url_fields = ('Home', 'Media', 'Play', 'Download', 'Code repository')

valid_url_prefixes = ('http://', 'https://', 'git://', 'svn://', 'ftp://', 'bzr://')
extended_valid_url_prefixes = valid_url_prefixes + ('@see-', '@not-', '?')

valid_building_properties = ('Build system', 'Build instructions')
valid_building_properties = ('Build system', 'Build instruction')
valid_building_fields = valid_building_properties + ('Note',)

# these are the only valid platforms currently (and must be given in this order)
Expand Down
Loading

0 comments on commit 873679f

Please sign in to comment.