From 8f275f5fe8077692b9fe76a8b0cb5cf38e6e58e1 Mon Sep 17 00:00:00 2001 From: Trilarion Date: Mon, 11 Dec 2017 11:56:25 +0100 Subject: [PATCH] cleanup of template leftovers --- games/adventure/camelia_girls.md | 1 - games/adventure/star_maiden_rio.md | 1 - games/framework/openfl.md | 2 +- games/library/allegro.md | 2 +- games/maintenance.py | 33 ++++++++++++++++++++++++++---- games/rpg/blades_of_exile.md | 3 +-- games/rpg/goblin_hack.md | 2 +- games/rpg/source_of_tales.md | 1 - games/strategy/gigalomania.md | 2 -- games/strategy/pax_britannica.md | 2 +- games/strategy/unknown_horizons.md | 2 +- 11 files changed, 35 insertions(+), 16 deletions(-) diff --git a/games/adventure/camelia_girls.md b/games/adventure/camelia_girls.md index f8897882..bf886966 100644 --- a/games/adventure/camelia_girls.md +++ b/games/adventure/camelia_girls.md @@ -5,7 +5,6 @@ _A simple slice-of-life Visual Novel from the point of a view of a computer-savv - Home: https://web.archive.org/web/20140523011334/http://pigux.com:80/cameliagirls/ - Download: https://web.archive.org/web/20140107152141/http://pigux.com:80/cameliagirls/download.html - Keywords: visual novel -- Code: primary repository (type if not git), other repositories (type if not git) - Language(s): Ren'py - License: CC-BY-SA diff --git a/games/adventure/star_maiden_rio.md b/games/adventure/star_maiden_rio.md index 403c1b0e..d3e0da5b 100644 --- a/games/adventure/star_maiden_rio.md +++ b/games/adventure/star_maiden_rio.md @@ -3,7 +3,6 @@ - Home: http://nyaatrap.blog.fc2.com/blog-entry-20.html - Download: http://www.mediafire.com/file/jog3fcfxgsyd03f/Astraea_Rio-1.05-all.zip - Keywords: visual novel, rating 18 -- Code: primary repository (type if not git), other repositories (type if not git) - Language: Ren'py - License: CC-BY-NC diff --git a/games/framework/openfl.md b/games/framework/openfl.md index 15c39f55..306d58a9 100644 --- a/games/framework/openfl.md +++ b/games/framework/openfl.md @@ -4,7 +4,7 @@ _Software framework and platform for the creation of multi-platform applications - Home: http://www.openfl.org/ - Media: https://en.wikipedia.org/wiki/OpenFL -- Download: {URL} +- Download: http://www.openfl.org/learn/docs/getting-started/ - State: mature - Code: https://github.com/openfl - Language(s): Haxe diff --git a/games/library/allegro.md b/games/library/allegro.md index 245007f6..51a4fe87 100644 --- a/games/library/allegro.md +++ b/games/library/allegro.md @@ -6,7 +6,7 @@ _Cross-platform library mainly aimed at video game and multimedia programming._ - Media: https://en.wikipedia.org/wiki/Allegro_(software) - Download: http://liballeg.org/download.html - State: mature -- Code: primary repository (type if not git), other repositories (type if not git) +- Code: https://github.com/liballeg/allegro5 - Language(s): C - License: zlib diff --git a/games/maintenance.py b/games/maintenance.py index ac28298d..4d113f76 100644 --- a/games/maintenance.py +++ b/games/maintenance.py @@ -254,7 +254,6 @@ def regular_replacements(): """ Replacing some stuff by shortcuts. Can be run regularly """ - # get category paths category_paths = get_category_paths() @@ -277,6 +276,29 @@ def regular_replacements(): with open(entry_path, "w") as f: f.write(content) +def check_template_leftovers(): + """ + Checks for template leftovers. + """ + check_strings = ['# {NAME}', '_{One line description}_', '- Home: {URL}', '- Media: {URL}', '- Download: {URL}', '- State: beta, mature (inactive since)', '- Keywords: SP, MP, RTS, TBS (if none, remove the line)', '- Code: primary repository (type if not git), other repositories (type if not git)', '- Language(s): {XX}', '- License: {XX} (if special, include link)', '{XXX}'] + + # get category paths + category_paths = get_category_paths() + + # for each category + for category_path in category_paths: + # get paths of all entries in this category + entry_paths = get_entry_paths(category_path) + + for entry_path in entry_paths: + # read it line by line + with open(entry_path) as f: + content = f.read() + + for check_string in check_strings: + if content.find(check_string) >= 0: + print('{}: found {}'.format(os.path.basename(entry_path), check_string)) + if __name__ == "__main__": # paths @@ -289,11 +311,14 @@ if __name__ == "__main__": # generate list in toc files #update_category_tocs() + # check for unfilled template lines + check_template_leftovers() + # check external links (only rarely) - # check_validity_external_links() + #check_validity_external_links() # special, only run when needed - fix_notation() + #fix_notation() # regular replacements - # regular_replacements() \ No newline at end of file + #regular_replacements() \ No newline at end of file diff --git a/games/rpg/blades_of_exile.md b/games/rpg/blades_of_exile.md index 8b4687bd..ff1e2b2c 100644 --- a/games/rpg/blades_of_exile.md +++ b/games/rpg/blades_of_exile.md @@ -1,10 +1,9 @@ # Blades of Exile -_{One line description}_ +_Eole-playing video games created by Jeff Vogel of Spiderweb Software._ - Home: http://www.spiderwebsoftware.com/blades/opensource.html - Media: -- Download: {URL} - State: mature - Keywords: SP, MP, RTS, TBS - Code: https://github.com/calref/cboe diff --git a/games/rpg/goblin_hack.md b/games/rpg/goblin_hack.md index 07e49171..8db15a37 100644 --- a/games/rpg/goblin_hack.md +++ b/games/rpg/goblin_hack.md @@ -1,4 +1,4 @@ -# {NAME} +# Goblin Hack _A roguelike opengl-based smooth-scrolling ASCII graphics game._ diff --git a/games/rpg/source_of_tales.md b/games/rpg/source_of_tales.md index f053763c..8b8539d3 100644 --- a/games/rpg/source_of_tales.md +++ b/games/rpg/source_of_tales.md @@ -3,7 +3,6 @@ _A massive multiplayer online roleplaying game._ - Home: http://www.sourceoftales.org/ -- Download: {URL} - Keywords: MMO - Code: https://github.com/tales/sourceoftales - Language(s): Lua diff --git a/games/strategy/gigalomania.md b/games/strategy/gigalomania.md index 7ad585b7..865275d5 100644 --- a/games/strategy/gigalomania.md +++ b/games/strategy/gigalomania.md @@ -3,8 +3,6 @@ _A 2D real time strategy Mega-Lo-Mania-like god game._ - Home: http://gigalomania.sourceforge.net/ -- State: beta, mature (inactive since) -- Keywords: SP, MP, RTS, TBS (if none, remove the line) - Code: https://sourceforge.net/p/gigalomania/code/ci/master/tree/ - Language(s): C++ - License: GPL-2.0 diff --git a/games/strategy/pax_britannica.md b/games/strategy/pax_britannica.md index 116b149a..6638306d 100644 --- a/games/strategy/pax_britannica.md +++ b/games/strategy/pax_britannica.md @@ -4,7 +4,7 @@ _One-button real-time strategy game._ - Home: http://paxbritannica.henk.ca/ - State: mature -- Keywords: SP, MP, RTS, TBS (if none, remove the line) +- Keywords: MP, RTS - Code: https://github.com/henkboom/pax-britannica - Language(s): Lua, C - License: MIT diff --git a/games/strategy/unknown_horizons.md b/games/strategy/unknown_horizons.md index 218a90b2..82147f84 100644 --- a/games/strategy/unknown_horizons.md +++ b/games/strategy/unknown_horizons.md @@ -5,7 +5,7 @@ _A 2D realtime strategy simulation with an emphasis on economy and city building - Home: http://unknown-horizons.org/ - Media: https://en.wikipedia.org/wiki/Unknown_Horizons - Download: http://unknown-horizons.org/downloads/ -- State: beta, mature (inactive since) +- State: beta - Keywords: SP, TBS - Code: https://github.com/unknown-horizons/unknown-horizons - Language(s): Python