From 0edab10b1282a6aa8647c2be468ff2bc9452ec9e Mon Sep 17 00:00:00 2001 From: Trilarion Date: Thu, 7 Dec 2017 15:00:58 +0100 Subject: [PATCH] more autogenerated info on category pages --- README.md | 4 +- adventure/_toc.md | 19 ++++++---- framework/_toc.md | 91 ++++++++++++++++++++++++---------------------- library/_toc.md | 42 +++++++++++---------- maintenance.py | 45 +++++++++++++++++++++-- rpg/_toc.md | 17 +++++---- simulation/_toc.md | 19 ++++++---- strategy/_toc.md | 61 ++++++++++++++++--------------- 8 files changed, 178 insertions(+), 120 deletions(-) diff --git a/README.md b/README.md index 90aa0cb3..bd381fbd 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,15 @@ See also the list of [popular games on Github](https://github.com/leereilly/game ## Contents +[comment]: # (start of autogenerated content, do not edit) - [Adventure games & Visual novels](adventure/_toc.md) (8) - [Game frameworks](framework/_toc.md) (44) -- [Popular required libraries](library/_toc.md) (19) +- [Popular required libraries](library/_toc.md) (20) - [Role Playing Games](rpg/_toc.md) (7) - [Simulation games](simulation/_toc.md) (8) - [Strategy games](strategy/_toc.md) (29) +[comment]: # (end of autogenerated content) ## Contributing If you'd like to add something, please [create an Issue](https://github.com/Trilarion/opensourcegames/issues), diff --git a/adventure/_toc.md b/adventure/_toc.md index bcf0750b..7c99d5dc 100644 --- a/adventure/_toc.md +++ b/adventure/_toc.md @@ -1,10 +1,13 @@ # Adventure games & Visual novels -- [AdaVenture](adaventure.md) -- [Clou!](clou.md) -- [Colossal Cave Adventure](colossal_cave.md) -- [Dragon History](dragon_history.md) -- [Free in the Dark (engine)](fitd.md) -- [GameLV](gamelv.md) -- [Solaris the Game](solaris.md) -- [TwinEngine](twin_engine.md) +[comment]: # (start of autogenerated content, do not edit) +- [AdaVenture](adaventure.md) Ada, GPL-3.0, stable +- [Clou!](clou.md) C, alpha +- [Colossal Cave Adventure](colossal_cave.md) Python, Apache-2.0, mature +- [Dragon History](dragon_history.md) GPL, mature +- [Free in the Dark (engine)](fitd.md) C, C++, GPL-2.0, beta +- [GameLV](gamelv.md) C++, GPL, beta +- [Solaris the Game](solaris.md) beta +- [TwinEngine](twin_engine.md) C, GPL-2.0 + +[comment]: # (end of autogenerated content) \ No newline at end of file diff --git a/framework/_toc.md b/framework/_toc.md index 30db01d1..8578fde6 100644 --- a/framework/_toc.md +++ b/framework/_toc.md @@ -1,46 +1,49 @@ # Game frameworks -- [Arianne / Marauroa](arianne.md) -- [Blender game engine](blender_game_engine.md) -- [COCOS2D-X](cocos2dx.md) -- [Dash Engine](dash.md) -- [Delta Engine](deltaengine.md) -- [ENIGMA](enigma.md) -- [EasyRPG Player](easyrpgplayer.md) -- [Flare Engine](flare_engine.md) -- [Flixel](flixel.md) -- [GemRB](gemrb.md) -- [Godot](godot.md) -- [HaxeFlixel](haxeflixel.md) -- [Irrlicht Engine](irrlicht.md) -- [Lightweight Java Game Library](lwjgl.md) -- [Lumix Engine](lumix.md) -- [LÖVE](loeve.md) -- [Maratis](maratis.md) -- [MonoGame](monogame.md) -- [O.H.R.RPG.C.E](ohrrpgce.md) -- [OGRE3D](ogre3d.md) -- [Octaforge](octaforge.md) -- [Open RPG Maker](openrpgmaker.md) -- [OpenFL](openfl.md) -- [OpenRPG](openrpg.md) -- [Orx](orx.md) -- [Panda 3D](panda3d.md) -- [Polycode](polycode.md) -- [Qt](qt.md) -- [Quad-engine](quad.md) -- [SDL Game Engine 2D](sge2d.md) -- [ScummVM](scummvm.md) -- [Solarus](solarus.md) -- [Superpowers](superpowers.md) -- [Urho3D](urho3d.md) -- [Vega Strike](vegastrike.md) -- [WorldForge](worldforge.md) -- [ZGameEditor](zgameeditor.md) -- [jMonkeyEngine](jmonkeyengine.md) -- [libGDX](libgdx.md) -- [mkxp](mkxp.md) -- [pygame](pygame.md) -- [rpge](rpge.md) -- [sandbox Game Maker](sandboxgamemaker.md) -- [xoreos](xoreos.md) +[comment]: # (start of autogenerated content, do not edit) +- [Arianne / Marauroa](arianne.md) Java, GPL-2.0, mature +- [Blender game engine](blender_game_engine.md) C++, GPL-2.0, mature +- [COCOS2D-X](cocos2dx.md) C++, MIT, mature +- [Dash Engine](dash.md) D, MIT +- [Delta Engine](deltaengine.md) C#, Apache-2.0 +- [ENIGMA](enigma.md) C++, C, GPL-3.0, mature +- [EasyRPG Player](easyrpgplayer.md) C++, GPL-3.0 +- [Flare Engine](flare_engine.md) C++, GPL-3.0 +- [Flixel](flixel.md) ActionScript, MIT, mature +- [GemRB](gemrb.md) C++, Python, GPL-2.0, mature +- [Godot](godot.md) C, C++, MIT, mature +- [HaxeFlixel](haxeflixel.md) Haxe, MIT, mature +- [Irrlicht Engine](irrlicht.md) C++, C, zlib, mature +- [Lightweight Java Game Library](lwjgl.md) Kotlin, C, BSD-3, mature +- [Lumix Engine](lumix.md) C++, MIT, beta +- [LÖVE](loeve.md) C++, zlib, mature +- [Maratis](maratis.md) C++, GPL-2.0, experimental (4.x) +- [MonoGame](monogame.md) C#, Ms-MPL MIT, mature +- [O.H.R.RPG.C.E](ohrrpgce.md) Basic, GPL-2.0, mature +- [OGRE3D](ogre3d.md) C++, MIT, mature +- [Octaforge](octaforge.md) C++, [University of Illinois/NCSA Open Source License](https://github.com/OctaForge/OF-Engine/blob/master/COPYING.md), mature +- [Open RPG Maker](openrpgmaker.md) alpha, inactive since 2014 +- [OpenFL](openfl.md) Haxe, MIT, mature +- [OpenRPG](openrpg.md) Java, Python, inactive since 2013 +- [Orx](orx.md) C, zlib, mature +- [Panda 3D](panda3d.md) C++, C, BSD-3, mature +- [Polycode](polycode.md) C, C++, MIT, beta +- [Qt](qt.md) C++, LGPL, mature +- [Quad-engine](quad.md) Delphi, MIT, beta +- [SDL Game Engine 2D](sge2d.md) C, MIT, beta +- [ScummVM](scummvm.md) C++, GPL-2.0, mature +- [Solarus](solarus.md) C++, GPL-3.0, mature +- [Superpowers](superpowers.md) Typescript, ISC +- [Urho3D](urho3d.md) C++, Angelscript, MIT, mature +- [Vega Strike](vegastrike.md) C++, GPL-2.0, mature +- [WorldForge](worldforge.md) C++, GPL-2.0, mature +- [ZGameEditor](zgameeditor.md) Pascal, MIT, mature +- [jMonkeyEngine](jmonkeyengine.md) Java, BSD, mature +- [libGDX](libgdx.md) Java, C++, C, Apache-2.0, mature +- [mkxp](mkxp.md) C++, C, GPL-2.0 +- [pygame](pygame.md) C, Python, LGPL, mature +- [rpge](rpge.md) C, GPL-3.0, beta, inactive since 2014 +- [sandbox Game Maker](sandboxgamemaker.md) C++, C, MIT, ZLIB modified (requires special credits and notifications) +- [xoreos](xoreos.md) C++, GPL-3.0 + +[comment]: # (end of autogenerated content) \ No newline at end of file diff --git a/library/_toc.md b/library/_toc.md index 3fcc0c1e..b6199bc3 100644 --- a/library/_toc.md +++ b/library/_toc.md @@ -1,21 +1,25 @@ # Popular required libraries -- [Allegro](allegro.md) -- [Boost (C++ Libraries)](boost.md) -- [Crypto++](crypto.md) -- [FreeType](freetype.md) -- [HarfBuzz](harfbuzz.md) -- [LZMA SDK](lzma.md) -- [Libxml2](libxml2.md) -- [Lua](lua.md) -- [Open AL](openal.md) -- [Open AL Soft](openalsoft.md) -- [OpenSSL](openssl.md) -- [Pthreads-win32](pthreads_win32.md) -- [Ragel](ragel.md) -- [Simple DirectMedia Layer](sdl_2.md) -- [Simple and Fast Multimedia Library](sfml.md) -- [XZ Utils](xz.md) -- [libpng](libpng.md) -- [yaml-cpp](yaml_cpp.md) -- [zlib](zlib.md) +[comment]: # (start of autogenerated content, do not edit) +- [Allegro](allegro.md) C, zlib, mature +- [Boost (C++ Libraries)](boost.md) C++, [BSL-1.0](https://github.com/boostorg/boost/blob/master/LICENSE_1_0.txt), mature +- [Crypto++](crypto.md) C++, Boost-1.0 +- [FreeType](freetype.md) C, GPL, mature +- [HarfBuzz](harfbuzz.md) C++, MIT, mature +- [LZMA SDK](lzma.md) C, LGPL-2.0, mature +- [Libxml2](libxml2.md) C, MIT, mature +- [Lua](lua.md) C, MIT, mature +- [Open AL](openal.md) Proprietary since v1.1, LGPL before +- [Open AL Soft](openalsoft.md) C, LGPL-2.0 +- [OpenSSL](openssl.md) C, [Dual licensed under special licenses](https://github.com/openssl/openssl/blob/master/LICENSE), mature +- [Pthreads-win32](pthreads_win32.md) C, LGPL-2.1, mature +- [Ragel](ragel.md) C++, MIT, mature +- [SWIG](swig.md) C++, [Special](https://raw.githubusercontent.com/swig/swig/master/LICENSE), mature +- [Simple DirectMedia Layer](sdl_2.md) zlib, mature +- [Simple and Fast Multimedia Library](sfml.md) C++, zlib (core), mature +- [XZ Utils](xz.md) C, Different, see file Copying, liblzma is public domain, mature +- [libpng](libpng.md) C, [libpng](https://sourceforge.net/p/libpng/code/ci/master/tree/LICENSE), mature +- [yaml-cpp](yaml_cpp.md) C++, MIT +- [zlib](zlib.md) C, zlib, mature + +[comment]: # (end of autogenerated content) \ No newline at end of file diff --git a/maintenance.py b/maintenance.py index 35b26dfe..40c99af5 100644 --- a/maintenance.py +++ b/maintenance.py @@ -13,6 +13,40 @@ def read_first_line_from_file(file): line = f.readline() return line +def read_interesting_info_from_file(file): + """ + Parses a file for some interesting fields and concatenates the content + """ + with open(file, 'r') as f: + text = f.read() + + output = [None, None, None] + + # language + regex = re.compile(r"- Language\(s\): (.*)") + matches = regex.findall(text) + if matches: + output[0] = matches[0] + + # license + regex = re.compile(r"- License: (.*)") + matches = regex.findall(text) + if matches: + output[1] = matches[0] + + # state + regex = re.compile(r"- State: (.*)") + matches = regex.findall(text) + if matches: + output[2] = matches[0] + + output = [x for x in output if x] # eliminate empty entries + + output = " " + ", ".join(output) + + return output + + def update_readme(): """ Recounts entries in subcategories and writes them to the readme @@ -59,7 +93,7 @@ def update_readme(): update = "".join(update) # insert new text in the middle - text = start + update + end + text = start + "[comment]: # (start of autogenerated content, do not edit)\n" + update + "\n[comment]: # (end of autogenerated content)" + end # write to readme with open(readme_path, 'w') as f: @@ -88,18 +122,21 @@ def update_category_tocs(): # get titles (discarding first two ("# ") and last ("\n") characters) titles = [read_first_line_from_file(path)[2:-1] for path in paths] + # get more interesting info + more = [read_interesting_info_from_file(path) for path in paths] + # combine name and file name - info = zip(titles, files) + info = zip(titles, files, more) # sort according to title info.sort(key=lambda x:x[0]) # assemble output - update = ['- [{}]({})\n'.format(*entry) for entry in info] + update = ['- [{}]({}){}\n'.format(*entry) for entry in info] update = "".join(update) # combine toc header - text = toc_header + '\n' + update + text = toc_header + '\n' + "[comment]: # (start of autogenerated content, do not edit)\n" + update + "\n[comment]: # (end of autogenerated content)" # write to toc file with open(toc_file, 'w') as f: diff --git a/rpg/_toc.md b/rpg/_toc.md index 61600217..19b216c8 100644 --- a/rpg/_toc.md +++ b/rpg/_toc.md @@ -1,9 +1,12 @@ # Role Playing Games -- [Arx Libertatis](arx_libertatis.md) -- [BrowserQuest](browserquest.md) -- [Crossfire](crossfire.md) -- [Egoboo](egoboo.md) -- [FreedroidRPG](freedroid.md) -- [Hero of Allacrost](allacrost.md) -- [VegaTrek](vegatrek.md) +[comment]: # (start of autogenerated content, do not edit) +- [Arx Libertatis](arx_libertatis.md) C++, GPL-3.0, mature +- [BrowserQuest](browserquest.md) Javascript, MPL-2.0, matures +- [Crossfire](crossfire.md) C, Java, GPL-2.0 +- [Egoboo](egoboo.md) C++, C, GPL-3.0, mature, inactive since 2015 +- [FreedroidRPG](freedroid.md) C, GPL-2.0, mature +- [Hero of Allacrost](allacrost.md) C++, Lua, GPL-2.0, stable +- [VegaTrek](vegatrek.md) GPL-2.0, beta, inactive since 2013 + +[comment]: # (end of autogenerated content) \ No newline at end of file diff --git a/simulation/_toc.md b/simulation/_toc.md index f046e475..79479164 100644 --- a/simulation/_toc.md +++ b/simulation/_toc.md @@ -1,10 +1,13 @@ # Simulation games -- [3d.city](3d_city.md) -- [LinCity](lincity.md) -- [LinCity-NG](lincity_ng.md) -- [Micropolis](micropolis.md) -- [Open Transport Tycoon](open_transport_tycoon.md) -- [OpenCity](open_city.md) -- [Pioneer](pioneer.md) -- [micropolisJS](micropolis_js.md) +[comment]: # (start of autogenerated content, do not edit) +- [3d.city](3d_city.md) Javascript, GPL-3.0 +- [LinCity](lincity.md) C, GPL-2.0, mature, inactice since 2005 +- [LinCity-NG](lincity_ng.md) C++, GPL, alpha +- [Micropolis](micropolis.md) HTML, C++, Java, Python, GPL-3.0, mature +- [Open Transport Tycoon](open_transport_tycoon.md) C++, GPL-2.0, mature +- [OpenCity](open_city.md) C++, GPL-2.0, alpha +- [Pioneer](pioneer.md) C++, C, GPL and others, mature +- [micropolisJS](micropolis_js.md) HTML, C++, Java, Python, GPL-3.0 + +[comment]: # (end of autogenerated content) \ No newline at end of file diff --git a/strategy/_toc.md b/strategy/_toc.md index 9fe15750..af5e7948 100644 --- a/strategy/_toc.md +++ b/strategy/_toc.md @@ -1,31 +1,34 @@ # Strategy games -- [0AD](0ad.md) -- [Advanced Strategic Command](asc.md) -- [Battle for Wesnoth](wesnoth.md) -- [Birth of the Empires](birth_of_the_empires.md) -- [C-evo](c_evo.md) -- [Crimson Fields](crimson_fields.md) -- [Free Orion](freeorion.md) -- [FreeCol](freecol.md) -- [FreeRails](freerails.md) -- [Freeciv](freeciv.md) -- [Freeciv WebGL](freeciv_web.md) -- [Glest](glest.md) -- [Globulation2](globulation2.md) -- [LordsAWar!](lordsawar.md) -- [MegaGlest](megaglest.md) -- [Megamek](megamek.md) -- [NetPanzer](netpanzer.md) -- [Open Imperium Galactica](open_imperium_galactica.md) -- [OpenRA](openra.md) -- [OpenXcom](openxcom.md) -- [Pax Britannica](pax_britannica.md) -- [Spring RTS engine](spring.md) -- [Star Control II: The Ur-Quan Masters](star_control_2.md) -- [TripleA](triplea.md) -- [UFO2000](ufo2000.md) -- [Ufo: Alien Invasion](ufo_alien_invasion.md) -- [Warzone 2100](warzone_2100.md) -- [Widelands](widelands.md) -- [Xconq](xconq.md) +[comment]: # (start of autogenerated content, do not edit) +- [0AD](0ad.md) C++, GPL-2.0, alpha +- [Advanced Strategic Command](asc.md) C++, GPL-2.0, mature +- [Battle for Wesnoth](wesnoth.md) C++, GPL-2.0, mature +- [Birth of the Empires](birth_of_the_empires.md) C++, Private use allowed (original artwork under special license) +- [C-evo](c_evo.md) Delphi Pascal, None found, mature, inactive since 2013 +- [Crimson Fields](crimson_fields.md) +- [Free Orion](freeorion.md) C++, Python, GPL-2.0, beta +- [FreeCol](freecol.md) Java 8, GPL-2.0, mature +- [FreeRails](freerails.md) Java, alpha +- [Freeciv](freeciv.md) C, GPL-2.0, mature +- [Freeciv WebGL](freeciv_web.md) Javascript, Java, AGPL-3.0, mature +- [Glest](glest.md) C++, GPL-2.0, mature, inactive since 2009 +- [Globulation2](globulation2.md) C++, GPL-3.0, mature +- [LordsAWar!](lordsawar.md) C++, GPL-3.0, stable +- [MegaGlest](megaglest.md) C++, GPL-2.0, mature +- [Megamek](megamek.md) Java, GPL-2.0, mature +- [NetPanzer](netpanzer.md) C++, GPL-2.0, beta +- [Open Imperium Galactica](open_imperium_galactica.md) Java, GPL-3.0, beta +- [OpenRA](openra.md) C#, GPl-3.0, mature +- [OpenXcom](openxcom.md) C++, GPL-3.0, mature +- [Pax Britannica](pax_britannica.md) Lua, C, MIT, mature +- [Spring RTS engine](spring.md) C++, C, Lua, GPL-2.0, mature +- [Star Control II: The Ur-Quan Masters](star_control_2.md) C, GPL-2.0, mature, inactive since 2011 +- [TripleA](triplea.md) Java, GPL-2.0, mature +- [UFO2000](ufo2000.md) C++, GPL-2.0 +- [Ufo: Alien Invasion](ufo_alien_invasion.md) C, C++, GPL-2.0, mature +- [Warzone 2100](warzone_2100.md) C++ +- [Widelands](widelands.md) C++, Lua, GPL-2.0, mature +- [Xconq](xconq.md) GPL, mature + +[comment]: # (end of autogenerated content) \ No newline at end of file