From 8d5b43e441a4fffd7588fa8ae4b1dddeb92f801a Mon Sep 17 00:00:00 2001 From: Trilarion Date: Fri, 4 Dec 2020 13:19:14 +0100 Subject: [PATCH] update static website generation --- README.md | 6 +- code/archives.json | 1 + code/backlog.txt | 40 +++++------ code/generate_static_website.py | 63 +++++++++++++----- code/html/base.jinja | 6 +- code/html/categorical_index.jinja | 15 +++-- code/html/collage_games.jpg | Bin 312757 -> 286870 bytes code/html/index.jinja | 4 +- code/html/listing_developers.jinja | 4 +- code/html/listing_entries.jinja | 4 +- code/html/listing_inspirations.jinja | 4 +- ...meclones_download_images_create_collage.py | 12 +++- code/utils/constants.py | 53 +++++++++++++-- developers.md | 18 +++-- entries/augustus.md | 21 ++++++ entries/tocs/_games.md | 1 + entries/tocs/_linux.md | 1 + entries/tocs/_macos.md | 1 + entries/tocs/_remake.md | 1 + entries/tocs/_simulation.md | 1 + entries/tocs/_windows.md | 1 + entries/vortice.md | 2 +- inspirations.md | 4 +- statistics.md | 30 ++++----- 24 files changed, 204 insertions(+), 89 deletions(-) create mode 100644 entries/augustus.md diff --git a/README.md b/README.md index 89fd9dde..3c797a34 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,11 @@ **[Dynamic HTML table](https://trilarion.github.io/opensourcegames/)** of the entries / Development **[Blog](https://trilarion.blogspot.com/search/label/osgames)** / **[Statistics](statistics.md#statistics)** [comment]: # (start of autogenerated content, do not edit) -**[Games](entries/tocs/_games.md#Games)** (1276) - **[Tools](entries/tocs/_tools.md#Tools)** (42) - **[Frameworks](entries/tocs/_frameworks.md#Frameworks)** (81) - **[Libraries](entries/tocs/_libraries.md#Libraries)** (49) +**[Games](entries/tocs/_games.md#Games)** (1277) - **[Tools](entries/tocs/_tools.md#Tools)** (42) - **[Frameworks](entries/tocs/_frameworks.md#Frameworks)** (81) - **[Libraries](entries/tocs/_libraries.md#Libraries)** (49) -By category: **[Action](entries/tocs/_action.md#action)** (237), **[Adventure](entries/tocs/_adventure.md#adventure)** (52), **[Arcade](entries/tocs/_arcade.md#arcade)** (116), **[Board](entries/tocs/_board.md#board)** (23), **[Cards](entries/tocs/_cards.md#cards)** (17), **[Educational](entries/tocs/_educational.md#educational)** (12), **[Framework](entries/tocs/_framework.md#framework)** (81), **[Game engine](entries/tocs/_game-engine.md#game-engine)** (116), **[Library](entries/tocs/_library.md#library)** (49), **[Music](entries/tocs/_music.md#music)** (14), **[Platform](entries/tocs/_platform.md#platform)** (56), **[Puzzle](entries/tocs/_puzzle.md#puzzle)** (140), **[Remake](entries/tocs/_remake.md#remake)** (527), **[Role playing](entries/tocs/_role-playing.md#role-playing)** (191), **[Simulation](entries/tocs/_simulation.md#simulation)** (108), **[Sports](entries/tocs/_sports.md#sports)** (23), **[Strategy](entries/tocs/_strategy.md#strategy)** (266), **[Tool](entries/tocs/_tool.md#tool)** (42), **[Visual novel](entries/tocs/_visual-novel.md#visual-novel)** (6) +By category: **[Action](entries/tocs/_action.md#action)** (237), **[Adventure](entries/tocs/_adventure.md#adventure)** (52), **[Arcade](entries/tocs/_arcade.md#arcade)** (116), **[Board](entries/tocs/_board.md#board)** (23), **[Cards](entries/tocs/_cards.md#cards)** (17), **[Educational](entries/tocs/_educational.md#educational)** (12), **[Framework](entries/tocs/_framework.md#framework)** (81), **[Game engine](entries/tocs/_game-engine.md#game-engine)** (116), **[Library](entries/tocs/_library.md#library)** (49), **[Music](entries/tocs/_music.md#music)** (14), **[Platform](entries/tocs/_platform.md#platform)** (56), **[Puzzle](entries/tocs/_puzzle.md#puzzle)** (140), **[Remake](entries/tocs/_remake.md#remake)** (528), **[Role playing](entries/tocs/_role-playing.md#role-playing)** (191), **[Simulation](entries/tocs/_simulation.md#simulation)** (109), **[Sports](entries/tocs/_sports.md#sports)** (23), **[Strategy](entries/tocs/_strategy.md#strategy)** (266), **[Tool](entries/tocs/_tool.md#tool)** (42), **[Visual novel](entries/tocs/_visual-novel.md#visual-novel)** (6) -By platform: **[Windows](entries/tocs/_windows.md#windows)** (438), **[Linux](entries/tocs/_linux.md#linux)** (427), **[macOS](entries/tocs/_macos.md#macos)** (236), **[Android](entries/tocs/_android.md#android)** (68), **[iOS](entries/tocs/_ios.md#ios)** (15), **[Web](entries/tocs/_web.md#web)** (89) +By platform: **[Windows](entries/tocs/_windows.md#windows)** (439), **[Linux](entries/tocs/_linux.md#linux)** (428), **[macOS](entries/tocs/_macos.md#macos)** (237), **[Android](entries/tocs/_android.md#android)** (68), **[iOS](entries/tocs/_ios.md#ios)** (15), **[Web](entries/tocs/_web.md#web)** (89) [comment]: # (end of autogenerated content) diff --git a/code/archives.json b/code/archives.json index fae840e5..4c78862c 100644 --- a/code/archives.json +++ b/code/archives.json @@ -244,6 +244,7 @@ "https://github.com/KDE/blinken.git", "https://github.com/KOBUGE-Games/minilens.git", "https://github.com/KaidemonLP/Open-Fortress-Source.git", + "https://github.com/Keriew/augustus.git", "https://github.com/Kerndog73/EnTT-Pacman.git", "https://github.com/Kinniken/NoxImperii.git", "https://github.com/Kromster80/kam_remake.git", diff --git a/code/backlog.txt b/code/backlog.txt index 7353e745..4a17f81e 100644 --- a/code/backlog.txt +++ b/code/backlog.txt @@ -2,22 +2,6 @@ ftp://ftp.tuxpaint.org/unix/ (all of them) ftp://ftp.tuxpaint.org/unix/x/ http://antongerdelan.net/blog/ (other projects besides TestDrive) http://cdetect.sourceforge.net/ -https://github.com/godlikepanos/anki-3d-engine -https://github.com/MrFrenik/gunslinger -https://github.com/rockbite/talos -https://github.com/Ogmo-Editor-3/OgmoEditor3-CE -https://github.com/eduard-permyakov/permafrost-engine -https://github.com/codenamecpp/carnage3d -https://github.com/WohlSoft/PGE-Project -https://github.com/wesnoth/haldric -https://github.com/project-imprimis/imprimis -https://github.com/WohlSoft/PGE-Project -https://github.com/mgerhardy/engine -https://github.com/GDQuest/godot-visual-effects -https://sourceforge.net/projects/freetrain/ -https://github.com/ttencate/jfxr -https://github.com/godotengine/escoria -https://github.com/awkwardpolygons/cartographer http://circularstudios.com/ http://cyxdown.free.fr/bs/ http://cyxdown.free.fr/f2b/ @@ -28,8 +12,6 @@ http://evolonline.org/about http://game-editor.com/Main_Page http://giderosmobile.com/ http://haxepunk.com/ -https://github.com/rockbite/talos -https://github.com/MrFrenik/gunslinger http://hcsoftware.sourceforge.net/jason-rohrer/ (various games there) http://hge.relishgames.com/ http://hgm.nubati.net/ @@ -48,11 +30,6 @@ http://icculus.org/toby/ http://iichantra.ru/en/ http://insideastarfilledsky.net/ http://lazerbears.wixsite.com/lazerbears/cr-editor -https://github.com/vini-guerrero/Godot_Game_Tools -https://github.com/nezvers/Godot_goodies -https://github.com/eduard-permyakov/permafrost-engine -https://github.com/armory3d/iron -https://armory3d.org/ http://libagar.org/agar/index.html.en http://libsdl-android.sourceforge.net/ http://lukaszjakowski.pl/ (games apart from uMario) @@ -164,6 +141,7 @@ https://arcade.academy/ https://archive.codeplex.com/?p=turnota https://archive.codeplex.com/?p=voxeliq https://archive.org/details/Gna_code_hosting (all of them) +https://armory3d.org/ https://awesomeopensource.com/categories/games https://blenderartists.org/t/devils-pinball/552785 https://blends.debian.org/games/tasks/ @@ -232,6 +210,7 @@ https://github.com/arturkot/the-house-game https://github.com/asweigart/PythonStdioGames https://github.com/AtomicGameEngine/AtomicGameEngine https://github.com/atphalix/nexuiz +https://github.com/awkwardpolygons/cartographer https://github.com/azhirnov/FrameGraph https://github.com/benl23x5/gloss https://github.com/bepu/bepuphysics2 @@ -262,6 +241,7 @@ https://github.com/cymonsgames/CymonsGames (collection) https://github.com/DaanVanYperen/artemis-odb-contrib https://github.com/danirod/jumpdontdie https://github.com/David20321/7DFPS (http://www.wolfire.com/receiver, not open source, for rejected list) +https://github.com/db0/godot-card-gaming https://github.com/DeflatedPickle/FAOSDance https://github.com/delaford/game https://github.com/DethRaid/SanityEngine @@ -270,6 +250,7 @@ https://github.com/Drasky-Vanderhoff/CommonDrops https://github.com/Dzierzan/OpenSA https://github.com/EasyRPG/Editor-Qt https://github.com/EaW-Team/equestria_dev +https://github.com/eduard-permyakov/permafrost-engine https://github.com/EliFUT/android https://github.com/elishacloud/Silent-Hill-2-Enhancements https://github.com/endlesstravel/Love2dCS @@ -289,11 +270,14 @@ https://github.com/Galapix/galapix https://github.com/gamearians https://github.com/GamedevFramework/gf https://github.com/gan74/Yave +https://github.com/GDQuest/godot-visual-effects https://github.com/GlPortal/RadixEngine https://github.com/gnFur/Monofoxe https://github.com/GNOME/quadrapassel +https://github.com/godlikepanos/anki-3d-engine https://github.com/godot-extended-libraries/godot-next https://github.com/godot-mega-man/Mega-Man-Engine +https://github.com/godotengine/escoria https://github.com/godotengine/godot-design https://github.com/Gramps/GodotSteam https://github.com/grantjenks/free-python-games (check all) @@ -315,6 +299,7 @@ https://github.com/JohanLi/uncharted-waters-2 https://github.com/JohnLamontagne/Lunar-Engine https://github.com/junkdog/artemis-odb https://github.com/jwvhewitt/gearhead-caramel.git +https://github.com/Kavex/GameDev-Resources https://github.com/KDE https://github.com/kduske/TrenchBroom https://github.com/kidscancode/circle_jump @@ -335,18 +320,23 @@ https://github.com/MatthewTheGlutton/HideousDestructor https://github.com/McKay42/McOsu https://github.com/megamarc/Tilengine https://github.com/mewo2/terrain +https://github.com/mgerhardy/engine https://github.com/mofr/Diablerie https://github.com/moonwards1/Moonwards-Virtual-Moon https://github.com/morganbengtsson/mos https://github.com/MrFrenik/Enjon +https://github.com/MrFrenik/gunslinger https://github.com/MultiCraft/MultiCraft https://github.com/MustaphaTR/Romanovs-Vengeance https://github.com/MyGUI/mygui https://github.com/MyreMylar/pygame_gui https://github.com/nCine/nCine +https://github.com/nezvers/Godot_goodies https://github.com/nfprojects/nfengine +https://github.com/NoelFB/blah https://github.com/Noesis/UE4-ShooterGame https://github.com/ogarcia/opensudoku +https://github.com/Ogmo-Editor-3/OgmoEditor3-CE https://github.com/OGRECave/scape https://github.com/OpenHV/OpenHV https://github.com/OpenMandrivaAssociation @@ -369,6 +359,7 @@ https://github.com/pld-linux/nexuiz/blob/master/nexuiz.spec https://github.com/PolygonTek/BlueshiftEngine https://github.com/ppizarror/pygame-menu https://github.com/prime31/Nez-Samples +https://github.com/project-imprimis/imprimis https://github.com/psuong/ig-developer-console https://github.com/qiciengine/qiciengine https://github.com/Quaver/Wobble @@ -382,6 +373,7 @@ https://github.com/RetroAchievements/RALibretro https://github.com/RetroAchievements/RAWeb https://github.com/rizwan3d/MotoGameEngine https://github.com/rlguy/FantasyMapGenerator +https://github.com/rockbite/talos https://github.com/rotators/Fo1in2 https://github.com/RoxasShadow/Sottaceto https://github.com/roy-t/MiniRTS @@ -420,12 +412,14 @@ https://github.com/tlgkccampbell/ultraviolet https://github.com/TomBebb/awe https://github.com/tomlooman/SimpleFPSTemplate https://github.com/topics/top-down-shooter +https://github.com/ttencate/jfxr https://github.com/uberspot/2048-android https://github.com/untakenstupidnick/nbsdgames (Blockout II) https://github.com/untakenstupidnick/nbsdgames (Cross-platform ncurses/pdcurses based games under active development) https://github.com/UnterrainerInformatik/GameDevelopmentLinks https://github.com/Venom0us/Emberpoint https://github.com/videogamepreservation +https://github.com/vini-guerrero/Godot_Game_Tools https://github.com/vocollapse/Blockinger https://github.com/WagicProject/wagic https://github.com/wesnoth/haldric diff --git a/code/generate_static_website.py b/code/generate_static_website.py index f452dce8..3b528773 100644 --- a/code/generate_static_website.py +++ b/code/generate_static_website.py @@ -39,6 +39,7 @@ Listing: # TODO games: contribute/edit, link to md file unten in klein # TODO games: use top level for genre and status # TODO games/developers/inspirations: split template +# TODO all pages: meta/title tag # 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 @@ -72,6 +73,11 @@ frameworks_path = ['frameworks'] inspirations_path = ['inspirations'] developers_path = ['developers'] +games_index_path = games_path + ['index.html'] +frameworks_index_path = frameworks_path + ['index.html'] +inspirations_index_path = inspirations_path + ['index.html'] +developers_index_path = developers_path + ['index.html'] + games_by_language_path = games_path + ['languages.html'] games_by_genres_path = games_path + ['genres.html'] games_by_platform_path = games_path + ['platforms.html'] @@ -104,7 +110,7 @@ genre_icon_map = { 'Music': 'music' } -plurals = {k: k+'s' for k in ('Assets license', 'Contact', 'Code language', 'Code license', 'Developer', 'Download', 'Inspiration', 'Game', 'Keyword', 'Home', 'Organization', 'Platform')} +plurals = {k: k+'s' for k in ('Assets license', 'Contact', 'Code language', 'Code license', 'Developer', 'Download', 'Inspiration', 'Game', 'Keyword', 'Home', 'Organization', 'Platform', 'Tag')} for k in ('Media', 'Play', 'State'): plurals[k] = k for k in ('Code repository', 'Code dependency'): @@ -439,10 +445,15 @@ def convert_developers(developers, entries): def create_keyword_tag(keyword): if keyword in c.recommended_keywords: - if keyword.capitalize() in genre_icon_map: - return make_url(games_by_genres_path, [make_icon(genre_icon_map[keyword.capitalize()]), make_text(keyword)], '{} games'.format(keyword), 'tag is-info') + if keyword in c.framework_keywords: + url = frameworks_index_path.copy() else: - return make_url(games_by_genres_path, make_text(keyword), '{} games'.format(keyword), 'tag is-info') + url = games_by_genres_path.copy() + url[-1] += '#{}'.format(keyword) + if keyword.capitalize() in genre_icon_map: + return make_url(url, [make_icon(genre_icon_map[keyword.capitalize()]), make_text(keyword)], '{} games'.format(keyword), 'tag is-info') + else: + return make_url(url, make_text(keyword), '{} games'.format(keyword), 'tag is-info') else: return make_text(keyword, 'tag is-light') @@ -503,8 +514,12 @@ def convert_entries(entries, inspirations, developers): e = entry['Platform'] if isinstance(e[0], osg.osg_parse.ValueWithComment): e = [x.value for x in e] - e = [make_url('', make_icon(platform_icon_map[x]), 'Windows') if x in platform_icon_map else make_text(x, 'is-size-7') for x in e] - entry['platform'] = e + e = [make_url('', make_icon(platform_icon_map[x]), x) if x in platform_icon_map else make_text(x, 'is-size-7') for x in e] + namex = make_text('{}:'.format(get_plural_or_singular('Platform', len(e))), 'has-text-weight-semibold') + entry['platform'] = [namex] + e + else: + namex = make_text('{}:'.format(get_plural_or_singular('Platform', 1)), 'has-text-weight-semibold') + entry['platform'] = [namex, make_icon(platform_icon_map['Unspecified'])] # technical info fields for field in ('Code language', 'Code license', 'Code repository', 'Code dependency', 'Assets license'): @@ -664,18 +679,20 @@ def generate(entries, inspirations, developers): # frameworks by type index = divide_in_columns(frameworks_by_type, game_index) - index['title'] = make_text('Open source frameworks/tools') - index['subtitle'] = make_text('Alphabetical index of {} frameworks/tools'.format(len(frameworks))) + index['title'] = make_text('Open source game frameworks/tools') + index['subtitle'] = make_text('Index of {} game frameworks/tools'.format(len(frameworks))) index['categories'] = c.framework_keywords index['category-names'] = framework_names index['number_entries_per_category_threshold'] = 0 - write(template_categorical_index.render(index=index), frameworks_path + ['index.html']) + index['entry_bold'] = lambda x: 'tags' not in x + index['category-infos'] = {} + write(template_categorical_index.render(index=index), frameworks_index_path) # generate frameworks pages for keyword in c.framework_keywords: listing = { 'title': framework_names[keyword], - 'subtitle': make_url(frameworks_path + ['index.html'], 'Index'), + 'subtitle': make_url(frameworks_index_path, 'Index'), 'items': frameworks_by_type[keyword] } write(template_listing_entries.render(listing=listing), frameworks_path +['{}.html'.format(keyword)]) @@ -698,8 +715,10 @@ def generate(entries, inspirations, developers): index['subtitle'] = make_text('Alphabetical index of {} games'.format(len(games))) index['categories'] = extended_alphabet index['category-names'] = extended_alphabet_names - index['number_entries_per_category_threshold'] = 0 - write(template_categorical_index.render(index=index), games_path + ['index.html']) + index['number_entries_per_category_threshold'] = 20 + index['entry_bold'] = lambda x: 'tags' not in x + index['category-infos'] = {} + write(template_categorical_index.render(index=index), games_index_path) # genres base['active_nav'] = ['filter', 'genres'] @@ -708,7 +727,9 @@ def generate(entries, inspirations, developers): index['subtitle'] = make_text('Index by game genre') index['categories'] = genres index['category-names'] = {k:[make_icon(genre_icon_map[k]), make_text(k)] if k in genre_icon_map else make_text(k) for k in index['categories']} - index['number_entries_per_category_threshold'] = 15 + index['number_entries_per_category_threshold'] = 25 + index['entry_bold'] = lambda x: 'tags' not in x + index['category-infos'] = {} write(template_categorical_index.render(index=index), games_by_genres_path) # games by language @@ -719,6 +740,8 @@ def generate(entries, inspirations, developers): index['categories'] = c.known_languages index['category-names'] = {k:k for k in index['categories']} index['number_entries_per_category_threshold'] = 15 + index['entry_bold'] = lambda x: 'tags' not in x + index['category-infos'] = {category: make_url(c.language_urls[category], 'Language information', css_class='is-size-7') for category in c.known_languages if category in c.language_urls} write(template_categorical_index.render(index=index), games_by_language_path) # games by platform @@ -729,6 +752,8 @@ def generate(entries, inspirations, developers): index['categories'] = c.valid_platforms + ('Unspecified',) index['category-names'] = {k:[make_icon(platform_icon_map[k]), make_text(k)] for k in index['categories']} index['number_entries_per_category_threshold'] = 15 + index['entry_bold'] = lambda x: 'tags' not in x + index['category-infos'] = {} write(template_categorical_index.render(index=index), games_by_platform_path) # inspirations folder @@ -743,8 +768,10 @@ def generate(entries, inspirations, developers): index['subtitle'] = make_text('Alphabetical index of {} games used as inspirations'.format(len(inspirations))) index['categories'] = extended_alphabet index['category-names'] = extended_alphabet_names - index['number_entries_per_category_threshold'] = 0 - write(template_categorical_index.render(index=index), inspirations_path + ['index.html']) + index['number_entries_per_category_threshold'] = 10 + index['entry_bold'] = lambda x: 'tags' in x + index['category-infos'] = {} + write(template_categorical_index.render(index=index), inspirations_index_path) # inspirations single pages template_listing_inspirations = environment.get_template('listing_inspirations.jinja') @@ -774,8 +801,10 @@ def generate(entries, inspirations, developers): index['subtitle'] = make_text('Alphabetical index of {} developers'.format(len(developers))) index['categories'] = extended_alphabet index['category-names'] = extended_alphabet_names - index['number_entries_per_category_threshold'] = 0 - write(template_categorical_index.render(index=index), developers_path + ['index.html']) + index['number_entries_per_category_threshold'] = 10 + index['entry_bold'] = lambda x: 'tags' in x + index['category-infos'] = {} + write(template_categorical_index.render(index=index), developers_index_path) if __name__ == "__main__": diff --git a/code/html/base.jinja b/code/html/base.jinja index 68f95866..6ae4bf61 100644 --- a/code/html/base.jinja +++ b/code/html/base.jinja @@ -9,7 +9,7 @@ -{# navigation bar -#} + {#- navigation bar -#} -{# content block -#} + {#- content block -#} {% block content %}{% endblock %} -{# footer -#} + {#- footer -#}