imports from libregamewiki

This commit is contained in:
Trilarion
2019-09-13 12:13:45 +02:00
parent d779cefbb0
commit 49424eb857
57 changed files with 1185 additions and 151 deletions

View File

@ -7,11 +7,13 @@
"https://anongit.kde.org/katomic.git",
"https://anongit.kde.org/kgoldrunner.git",
"https://bitbucket.org/SteveSmith16384/trickytowers.git",
"https://bitbucket.org/annexctw/annex.git",
"https://bitbucket.org/czirkoszoltan/gdash.git",
"https://bitbucket.org/dalerank/caesaria.git",
"https://bitbucket.org/dm_999/powerslideremake.git",
"https://bitbucket.org/fade0ff/lemmini.git",
"https://bitbucket.org/rbv/ohrrpgce-svn.git",
"https://git.code.sf.net/p/allegator/alex4",
"https://git.code.sf.net/p/arianne/marauroa",
"https://git.code.sf.net/p/arianne/stendhal",
"https://git.code.sf.net/p/atanks/atanks",
@ -84,6 +86,7 @@
"https://github.com/Afr0Games/Project-Dollhouse.git",
"https://github.com/Aleph-One-Marathon/alephone.git",
"https://github.com/AlisterT/openjazz.git",
"https://github.com/AllureOfTheStars/Allure.git",
"https://github.com/AmrikSadhra/OpenNFS.git",
"https://github.com/Ancurio/mkxp.git",
"https://github.com/AndO3131/lgeneral.git",
@ -130,8 +133,10 @@
"https://github.com/FreeRCT/FreeRCT.git",
"https://github.com/FreezingMoon/AncientBeast.git",
"https://github.com/Fundynamic/dune2themaker4j.git",
"https://github.com/GNOME/aisleriot.git",
"https://github.com/GNOME/atomix.git",
"https://github.com/GTA-ASM/SanAndreasUnity.git",
"https://github.com/GaidamakUA/BatteryReborn.git",
"https://github.com/Gang-Garrison-2/Gang-Garrison-2.git",
"https://github.com/GerHobbelt/pthread-win32.git",
"https://github.com/GlPortal/glPortal.git",
@ -192,6 +197,7 @@
"https://github.com/OneSleepyDev/boswars_osd.git",
"https://github.com/OneSleepyDev/boswars_osd_archive.git",
"https://github.com/OoliteProject/oolite.git",
"https://github.com/OpMonTeam/OpMon.git",
"https://github.com/OpenApoc/OpenApoc.git",
"https://github.com/OpenArena/engine.git",
"https://github.com/OpenDUNE/OpenDUNE.git",
@ -389,6 +395,7 @@
"https://github.com/fastrgv/AdaVenture.git",
"https://github.com/fofix/fofix.git",
"https://github.com/fogleman/Craft.git",
"https://github.com/fph/bastet.git",
"https://github.com/francot514/FreeSims.git",
"https://github.com/freeciv/freeciv-web.git",
"https://github.com/freeciv/freeciv.git",
@ -452,7 +459,6 @@
"https://github.com/jjimenezg93/InputManager.git",
"https://github.com/jjimenezg93/U-gine.git",
"https://github.com/jjimenezg93/star-control2.git",
"https://github.com/jlppc/OpMon.git",
"https://github.com/jmimu/FITD.git",
"https://github.com/jonburesh/sintelgame.git",
"https://github.com/jp8900308/other-life.git",
@ -497,6 +503,7 @@
"https://github.com/marksteelz3/Atari-VR---Breakout.git",
"https://github.com/matthewgrimes/hexgame.git",
"https://github.com/matthewgrimes/itbs-code.git",
"https://github.com/mdsteele/azimuth.git",
"https://github.com/metalvoidzz/Sourcehold.git",
"https://github.com/mgechev/mk.js.git",
"https://github.com/mgerhardy/caveexpress.git",
@ -854,6 +861,7 @@
],
"svn": [
"http://svn.uktrainsim.com/svn/openrails/trunk",
"https://svn.code.sf.net/p/balder/code/",
"https://svn.code.sf.net/p/blobby/code/",
"https://svn.code.sf.net/p/bombic/code/",
"https://svn.code.sf.net/p/bombic2/code/",
@ -876,6 +884,7 @@
"https://svn.code.sf.net/p/stargus/code/",
"https://svn.code.sf.net/p/sundog/code/",
"https://svn.code.sf.net/p/therush/code/",
"https://svn.code.sf.net/p/toohardforyou/code/",
"https://svn.code.sf.net/p/tpb3d/code/",
"https://svn.code.sf.net/p/uhexen2/code/",
"https://svn.code.sf.net/p/ultimatestunts/code/",

View File

@ -9,7 +9,7 @@ heXon
holyspirit/lechemindeladam cvs conversion?
http://antongerdelan.net/blog/ (other projects besides TestDrive)
http://directpython.sourceforge.net/
http://icculus.org/airstrike/
http://hcsoftware.sourceforge.net/jason-rohrer/ (various games there)
http://icculus.org/asciiroth/
http://icculus.org/avp/
http://icculus.org/bitstream/
@ -26,15 +26,20 @@ http://icculus.org/toby/
http://libsdl-android.sourceforge.net/
http://linball.sourceforge.net/
http://lukaszjakowski.pl/ (games apart from uMario)
http://noiz2sa.sourceforge.net/
http://parsec47.sourceforge.net/
http://psyco.sourceforge.net/
http://pyopengl.sourceforge.net/
http://retrospec.sgn.net
http://rrootage.sourceforge.net/
http://sam.zoy.org/monsterz/
http://stratagus.sourceforge.net/
http://tumiki.sourceforge.net/
http://vamos.sourceforge.net/
http://www.celephais.net/fitzquake/
http://www.codeskulptor.org/
http://www.fifengine.net/
http://www.ibiblio.org/pub/Linux/games/strategy/ (and all others)
http://www.myandroidonline.com/category/games/
http://www.newbreedsoftware.com/s
http://www.plasmapong.com/plasma-pong/plasma-pong/
@ -120,7 +125,9 @@ https://github.com/DaemonEngine/Daemon
https://github.com/Dariasteam/TowerJumper
https://github.com/demonixis/C3DE
https://github.com/digitall/scummvm-deskadv
https://github.com/DigitalPulseSoftware/NazaraEngine
https://github.com/discosultan/penumbra
https://github.com/EgorOrachyov/Berserk
https://github.com/enriquesomolinos/DreeRally
https://github.com/eprikazchikov/thunder
https://github.com/ErikLetson/torso-ninja
@ -140,6 +147,7 @@ https://github.com/hparcells/cards-against-humanity
https://github.com/IceReaper/DesktopAdventuresToolkit
https://github.com/iortcw/iortcw
https://github.com/jcarolus/android-chess
https://github.com/LambdaHack/LambdaHack
https://github.com/lexica/lexica
https://github.com/libretro/libretro-prboom
https://github.com/LIKO-12/LIKO-12
@ -156,7 +164,6 @@ https://github.com/OpenBricks/openbricks
https://github.com/openitg/openitg
https://github.com/OpenMandrivaAssociation
https://github.com/opensourcedesign
https://github.com/OpMonTeam/OpMon
https://github.com/OSSGames
https://github.com/OSSGames/GAME-SDL-ACTION-Blobwars_Metal_Blob_Solid
https://github.com/PanosK92/SpartanEngine
@ -196,6 +203,7 @@ https://gitlab.com/LibreGames
https://gitlab.com/vgstation/vgstation-old (and vgstation in general)
https://keeperrl.com/
https://lgdb.org/game/wolfpack-empire
https://libregamewiki.org/index.php?title=Libregamewiki_talk:Community_Portal&oldid=25410#Some_long_term_ideas
https://libregamewiki.org/Libregamewiki:Suggested_games#Likely_sources_for_more_free_games
https://osdn.net/softwaremap/trove_list.php?form_cat=80
https://packages.debian.org/sid/games/etw
@ -208,6 +216,7 @@ https://pypi.org/project/PyAMF/
https://pypi.org/project/simplejson/
https://pypi.org/project/SQLAlchemy/
https://pypi.org/project/TurboGears/
https://pyweek.org/4/entries/ (Ascent of Justice)
https://revolutionarygamesstudio.com/ Trhive
https://salsa.debian.org/games-team/etw
https://scratch.mit.edu/ (https://en.scratch-wiki.info/wiki/Scratch_Source_Code)
@ -216,6 +225,7 @@ https://sourceforge.net/projects/actiongame/
https://sourceforge.net/projects/deng/
https://sourceforge.net/projects/ettu/
https://sourceforge.net/projects/hhexen/
https://sourceforge.net/projects/lgames/files/barrage/
https://sourceforge.net/projects/librecardgame/
https://sourceforge.net/projects/mininghaze/ - download didn't work
https://sourceforge.net/projects/palomino-sim/ (http://www.jimbrooks.org/archive/software/palomino/)

View File

@ -4,6 +4,21 @@ estimate the differences in the entries both have in common, suggest to add the
other.
unique imported fields: 'assets license', 'categories', 'code language', 'code license', 'developer', 'engine', 'genre', 'library', 'linux-packages', 'name', 'platform'
mandatory imported fields: 'categories', 'name'
Mapping lgw -> ours
assets license -> assets license
categories -> keywords
code language -> code language
code license -> code license
developer -> free text (info)
engine -> code dependencies
genre -> keywords
library -> code dependencies
linux-packages - > free text (info)
name -> name
platform -> platform
"""
import json
@ -14,17 +29,30 @@ def get_unique_field_content(field, entries):
"""
"""
unique_content = set()
unique_content = {}
for entry in entries:
if field in entry:
unique_content.update(entry[field])
return sorted(list(unique_content))
for element in entry.get(field, []):
unique_content[element] = unique_content.get(element, 0) + 1
unique_content = list(unique_content.items())
unique_content.sort(key=lambda x: -x[1])
unique_content = ['{}({})'.format(k, v) for k, v in unique_content]
return unique_content
name_replacements = {'Eat the Whistle': 'Eat The Whistle', 'Scorched 3D': 'Scorched3D', 'Silver Tree': 'SilverTree', 'Blob Wars Episode 1 : Metal Blob Solid': 'Blobwars: Metal Blob Solid', 'Adventure': 'Colossal Cave Adventure',
'Fall Of Imiryn': 'Fall of Imiryn', 'Liquid War 6': 'Liquid War', 'Gusanos': 'GUSANOS', 'Corewars': 'Core War', 'FLARE': 'Flare', 'Vitetris': 'vitetris', 'Powder Toy': 'The Powder Toy', 'Asylum': 'SDL Asylum',
'Atanks': 'Atomic Tanks'}
ignored_names = ['Hetris', '8 Kingdoms', 'Antigravitaattori', 'Arena of Honour', 'Arkhart', 'Ascent of Justice', 'Balazar III', 'Balder3D', 'Barbie Seahorse Adventures', 'Barrage', 'Gnome Batalla Naval', 'User:AVRS/sandbox']
ignored_languages = ['HTML', 'XML', 'WML', 'English']
ignored_categories = ['GPL', 'C++', 'C', 'ECMAScript', 'Python', 'Java', 'CC BY-SA', 'Lua', 'LGPL', 'CC-BY', 'BSD', 'MIT', 'Qt', 'SDL', 'OpenGL', 'Pygame', 'PD', 'GLUT', 'Haskell', 'Allegro', 'Ruby', 'Zlib/libpng', 'OpenAL', 'Perl', 'Free Pascal', 'LÖVE', 'HTML5', 'Id Tech 1']
genre_replacements = {'rpg': 'role playing', 'fps': 'first person, shooter', 'tbs': 'turn based, strategy', 'rts': 'real time, strategy'}
platform_replacements = {'Mac': 'macOS'}
name_replacements = {'Eat the Whistle': 'Eat The Whistle', 'Scorched 3D': 'Scorched3D', 'Silver Tree': 'SilverTree', 'Blob Wars Episode 1 : Metal Blob Solid': 'Blobwars: Metal Blob Solid',
'Fall Of Imiryn': 'Fall of Imiryn', 'Liquid War 6': 'Liquid War', 'Gusanos': 'GUSANOS'}
language_replacements = {'lua': 'Lua'}
ignored_languages = ['HTML', 'XML', 'WML']
library_replacements = {'Pygame': 'pygame', 'QT': 'Qt'}
def list_compare(a, b, k):
@ -41,16 +69,18 @@ def list_compare(a, b, k):
if __name__ == "__main__":
similarity_threshold = 0.8
maximal_newly_created_entries = 40
# paths
root_path = os.path.realpath(os.path.join(os.path.dirname(__file__), os.path.pardir))
# import lgw import
json_path = os.path.join(root_path, 'tools', 'lgw_import.json')
json_path = os.path.join(root_path, os.pardir, 'lgw_import.json')
text = read_text(json_path)
lgw_entries = json.loads(text)
# perform replacements and disregarding
lgw_entries = [x for x in lgw_entries if x['name'] not in ignored_names]
for index, lgw_entry in enumerate(lgw_entries):
if lgw_entry['name'] in name_replacements:
lgw_entry['name'] = name_replacements[lgw_entry['name']]
@ -58,6 +88,8 @@ if __name__ == "__main__":
languages = lgw_entry['code language']
languages = ['Python' if x.startswith('Python') else x for x in languages]
languages = ['PHP' if x.startswith('PHP') else x for x in languages]
languages = ['Lua' if x.lower().startswith('lua') else x for x in languages]
languages = ['JavaScript' if x.lower().startswith('javascript') else x for x in languages]
h = []
for l in languages:
for g in ('/', 'and'):
@ -68,19 +100,81 @@ if __name__ == "__main__":
l = [l]
h.extend(l)
languages = ['C++' if x.startswith('C++') else x for x in h]
languages = ['C' if x.startswith('C ') else x for x in languages]
languages = [language_replacements[x] if x in language_replacements else x for x in languages]
languages = ['C' if x.startswith('C ') or x.startswith('C[') else x for x in languages]
languages = [x for x in languages if x not in ignored_languages]
if languages:
lgw_entry['code language'] = languages
else:
del lgw_entry['code language']
if 'categories' in lgw_entry:
categories = lgw_entry['categories']
categories = [x for x in categories if not x.startswith('Game')]
categories = [x for x in categories if not x.startswith('Article')]
categories = [x for x in categories if not x.startswith('Page')]
categories = [x for x in categories if x not in ignored_categories]
categories = [x.lower() if len(x) > 2 else x for x in categories]
if categories:
lgw_entry['categories'] = categories
else:
del lgw_entry['categories']
if 'genre' in lgw_entry:
genres = lgw_entry['genre']
genres = [x for x in genres if len(x) > 0]
genres = [x.lower() for x in genres]
genres = [x[:-5] if x.endswith(' game') else x for x in genres]
genres = [x[:-5] if x.endswith(' games') else x for x in genres]
genres = [genre_replacements[x] if x in genre_replacements else x for x in genres]
for h in ('platform',):
genres = [h if x.startswith(h) else x for x in genres]
if genres:
lgw_entry['genre'] = genres
else:
del lgw_entry['genre']
if 'library' in lgw_entry:
libraries = lgw_entry['library']
libraries = [library_replacements[x] if x in library_replacements else x for x in libraries]
lgw_entry['library'] = libraries
if 'code license' in lgw_entry:
licenses = lgw_entry['code license']
licenses = [x.strip() for x in licenses] # strip
licenses = [x[1:] if x.startswith('"') else x for x in licenses] # cut " at the beginning
licenses = [x[:-1] if x.endswith('"') else x for x in licenses] # cut " at the end
licenses = [x[4:] if x.startswith('GNU ') else x for x in licenses]
licenses = [x[:-3] if x.endswith('[1]') or x.endswith('[2]') else x for x in licenses]
licenses = [x[:-8] if x.lower().endswith(' license') else x for x in licenses]
licenses = [x.strip() for x in licenses] # strip
#licenses = ['GPL-2.0' if x.startswith('GPLv2') or x.startswith('GPL v2') or x.startswith('GPL 2') else x for x in licenses]
#licenses = ['GPL-3.0' if x.startswith('GPLv3') or x.startswith('GPL v3') or x.startswith('GPL 3') or x.startswith('GPL v.3') else x for x in licenses]
licenses = ['Public domain' if x.lower().startswith('public domain') else x for x in licenses]
lgw_entry['code license'] = licenses
if 'assets license' in lgw_entry:
licenses = lgw_entry['assets license']
licenses = [x.strip() for x in licenses] # strip
licenses = [x[1:] if x.startswith('"') else x for x in licenses] # cut " at the beginning
licenses = [x[:-1] if x.endswith('"') else x for x in licenses] # cut " at the end
licenses = [x[4:] if x.startswith('GNU ') else x for x in licenses]
licenses = [x[:-3] if x.endswith('[1]') or x.endswith('[2]') else x for x in licenses]
licenses = [x[:-8] if x.lower().endswith(' license') else x for x in licenses]
licenses = [x.strip() for x in licenses] # strip
licenses = ['GPL-2.0' if x.startswith('GPLv2') or x.startswith('GPL v2') or x.startswith('GPL 2') else x for x in licenses]
licenses = ['GPL-3.0' if x.startswith('GPLv3') or x.startswith('GPL v3') or x.startswith('GPL 3') or x.startswith('GPL v.3') else x for x in licenses]
licenses = ['Public domain' if x.lower().startswith('public domain') else x for x in licenses]
lgw_entry['assets license'] = licenses
lgw_entry['code language'] = languages
lgw_entries[index] = lgw_entry
# check for unique field names
unique_fields = set()
for lgw_entry in lgw_entries:
unique_fields.update(lgw_entry.keys())
unique_fields = sorted(list(unique_fields))
print('unique lgw fields: {}'.format(unique_fields))
print('unique lgw fields: {}'.format(sorted(list(unique_fields))))
# which fields are mandatory
for lgw_entry in lgw_entries:
remove_fields = [field for field in unique_fields if field not in lgw_entry]
unique_fields -= set(remove_fields)
print('mandatory lgw fields: {}'.format(sorted(list(unique_fields))))
# unique contents
print('{}: {}'.format('platform', get_unique_field_content('platform', lgw_entries)))
@ -112,6 +206,7 @@ if __name__ == "__main__":
# if game_name_similarity(lgw_name, our_name) > similarity_threshold:
# print('{} - {}'.format(lgw_name, our_name))
newly_created_entries = 0
# iterate over their entries
print('\n')
for lgw_entry in lgw_entries:
@ -138,4 +233,81 @@ if __name__ == "__main__":
p += list_compare(lgw_entry.get(key, []), our_entry.get(key, []), key)
if p:
print('{}\n{}'.format(name, p))
print('{}\n{}'.format(name, p))
if not is_included:
# a new entry, that we have never seen, maybe we should make an entry of our own
if newly_created_entries >= maximal_newly_created_entries:
continue
# determine file name
print('create new entry for {}'.format(lgw_name))
file_name = derive_canonical_file_name(lgw_name)
target_file = os.path.join(games_path, file_name)
if os.path.isfile(target_file):
print('warning: file {} already existing, save under slightly different name'.format(file_name))
target_file = os.path.join(games_path, file_name[:-3] + '-duplicate.md')
if os.path.isfile(target_file):
continue # just for safety reasons
# add name
entry = '# {}\n\n'.format(lgw_name)
# add empty description
entry += '__\n\n'
# empty home (mandatory on our side)
entry += '- Home: \n'
# state mandatory on our side
entry += '- State: \n'
# platform, if existing
if 'platform' in lgw_entry:
entry += 'Platform: {}\n'.format(', '.join(lgw_entry['platform']))
# keywords (genre) (also mandatory)
keywords = lgw_entry.get('genre', [])
if 'assets license' in lgw_entry:
keywords.append('open content')
keywords.sort(key=str.casefold)
if keywords:
entry += '- Keywords: {}\n'.format(', '.join(keywords))
# code repository (mandatory but not scraped from lgw)
entry += '- Code repository: \n'
# code language, mandatory on our side
languages = lgw_entry.get('code language', [])
languages.sort(key=str.casefold)
entry += '- Code language: {}\n'.format(', '.join(languages))
# code license, mandatory on our side
licenses = lgw_entry.get('code license', [])
licenses.sort(key=str.casefold)
entry += '- Code license: {}\n'.format(', '.join(licenses))
# code dependencies (only if existing)
code_dependencies = lgw_entry.get('engine', [])
code_dependencies.extend(lgw_entry.get('library', []))
code_dependencies.sort(key=str.casefold)
if code_dependencies:
entry += '- Code dependencies: {}\n'.format(', '.join(code_dependencies))
# assets licenses (only if existing)
if 'assets license' in lgw_entry:
entry += '- Assets license: {}\n'.format(', '.join(lgw_entry['assets license']))
# free text
if 'developer' in lgw_entry:
entry += '\nDeveloper: {}\n'.format(', '.join(lgw_entry['developer']))
if 'linux-packages' in lgw_entry:
entry += '{}\n'.format(lgw_entry['linux-packages'])
# write ## Building
entry += '\n## Building\n'
# finally write to file
write_text(target_file, entry)
newly_created_entries += 1

View File

@ -50,7 +50,7 @@ def update_readme_and_tocs(infos):
# create all toc
title = 'All'
file = '_all.md'
tocs_text = '**[{}](games/tocs/{}#{})** ({})\n'.format(title, file, title, len(infos))
tocs_text = '**[{} entries](games/tocs/{}#{})** ({})\n'.format(title, file, title, len(infos))
create_toc(title, file, infos)
# create by category

View File

@ -124,7 +124,7 @@ if __name__ == "__main__":
osgc_fields = set()
for osgc_entry in osgc_entries:
osgc_fields.update(osgc_entry.keys())
print('osgc-fields: {}'.format(osgc_fields))
print('unique osgc-fields: {}'.format(osgc_fields))
# which fields are mandatory
for osgc_entry in osgc_entries:
@ -391,7 +391,7 @@ if __name__ == "__main__":
entry += '\n## Building\n'
# finally write to file
write_text(target_file, entry)
# write_text(target_file, entry)
newly_created_entries += 1

View File

@ -2,8 +2,14 @@
Aeron (https://sourceforge.net/projects/aeron/, https://svn.code.sf.net/p/aeron/code/): Very early development
Age of Magic (https://sourceforge.net/projects/ageofmagic/, https://svn.code.sf.net/p/ageofmagic/code/): Only supports outdated Hardware (Symbian)
Altera Terra (https://sourceforge.net/projects/alteraterra/, https://svn.code.sf.net/p/alteraterra/code/): Early development stage, no clear license information
Antigravitaattori (http://www.luolamies.org/software/antigrav/, https://packages.debian.org/stable/games/antigravitaattori): Very early development
Arena of Honour (https://sourceforge.net/projects/aoh/): No clear license with the sources, no license of the assets, early development (alpha), abandoned
Arkhart (http://gna.org/projects/arkhart/, http://arkhart.nekeme.net/): Sources lost (gna.org)
Arthur's Knights (http://ainenn.org/KingArthur/, https://sourceforge.net/projects/king-arthur/): Unclear license, author could not be contacted
Atral Clades (https://sourceforge.net/projects/astralclades/, https://svn.code.sf.net/p/astralclades/code/): No clear license information
Balazar III (https://web.archive.org/web/20180521213818/http://www.lesfleursdunormal.fr/static/informatique/old/balazar_iii/index_en.html, http://gna.org/svn/?group=balazar): Early development, sources lost (gna.org) - a pity, was fine otherwise
Balder3D (): Very early development, Balder2D instead
Barbie Seahorse Adventures (http://www.imitationpickles.org/barbie/, https://pyweek.org/e/toba4/): Source is all rights reserved (source in svn has license allegedly, but it lost)
Begin2 (https://sourceforge.net/projects/begin2/, https://svn.code.sf.net/p/begin2/code/): No source available
Camelia Girls (https://web.archive.org/web/20140523011334/http://pigux.com:80/cameliagirls/): Sources not available
Cycle (https://sourceforge.net/projects/meegocycle/): Proprietary license (freeware, source available)