added wikipedia links to inspirations
This commit is contained in:
parent
c6997c8a7a
commit
6ef1a1f243
@ -23,6 +23,8 @@ https://github.com/septag/rizz
|
||||
https://github.com/EvilPudding/candle
|
||||
https://github.com/TorqueGameEngines/Torque3D
|
||||
https://github.com/polymonster/pmtech
|
||||
https://en.wikipedia.org/wiki/Black_Shades (open source)
|
||||
https://en.wikipedia.org/wiki/Category:Open-source_video_games (all of them)
|
||||
http://icculus.org/
|
||||
http://icculus.org/asciiroth/
|
||||
http://icculus.org/avp/
|
||||
|
@ -53,6 +53,7 @@ Listing:
|
||||
# TODO tooltip of supported systems
|
||||
# TODO improve or send feedback?
|
||||
# TODO link dependencies
|
||||
# TODO top 50 list from Github via their stars with download links (add to entries)
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
@ -7,6 +7,7 @@ stored Git repositories.
|
||||
# TODO split devs with multiple gh or sf accounts (unlikely), start with most (like name Adam) - naming convention @01 etc.
|
||||
# TODO check for devs without contact after gitlab/bitbucket/..
|
||||
# TODO gitlab/bitbucket import
|
||||
# TODO wikipedia search for all with more than 3 games
|
||||
|
||||
import time
|
||||
from utils import osg, osg_ui
|
||||
|
@ -7,7 +7,7 @@ Sorts the entries in the contents files of each sub folder alphabetically.
|
||||
"""
|
||||
|
||||
# TODO check for within an entry for similar dev names
|
||||
# TODO wikipedia (media search)
|
||||
# TODO wikipedia (media search) for popular ones at least
|
||||
# TODO google search (for homepages or media entries) for popular ones at least
|
||||
|
||||
import os
|
||||
|
@ -2,12 +2,11 @@
|
||||
Maintenance of inspirations.md and synchronization with the inspirations in the entries.
|
||||
"""
|
||||
|
||||
# TODO wikipedia search and match
|
||||
# TODO mark those that are contained in the database
|
||||
# TODO search fandom
|
||||
# TODO which inspirations have wikipedia entries with open source games category by aren't included
|
||||
|
||||
import time
|
||||
from utils import osg, osg_ui, osg_wikipedia
|
||||
from utils import osg, osg_ui, osg_wikipedia, constants as c
|
||||
|
||||
valid_duplicates = ('Age of Empires', 'ARMA', 'Catacomb', 'Civilization', 'Company of Heroes', 'Descent', 'Duke Nukem', 'Dungeon Keeper',
|
||||
'Final Fantasy', 'Heroes of Might and Magic', 'Jazz Jackrabbit', 'Marathon', 'Master of Orion', 'Quake',
|
||||
@ -80,30 +79,59 @@ class InspirationMaintainer:
|
||||
print('inspirations not yet loaded')
|
||||
return
|
||||
for inspiration in self.inspirations.values():
|
||||
if 'Included' in inspiration:
|
||||
continue
|
||||
if 'Media' in inspiration and any(('https://en.wikipedia.org/wiki/' in x for x in inspiration['Media'])):
|
||||
continue
|
||||
name = inspiration['Name']
|
||||
# search in wikipedia
|
||||
results = osg_wikipedia.search(inspiration['Name'])
|
||||
|
||||
# throw out all (disambiguation) pages
|
||||
results = [r for r in results if not any(x in r for x in ('disambiguation', 'film'))]
|
||||
|
||||
# the simple ones
|
||||
results = [r for r in results if 'video game' in r]
|
||||
if len(results) == 1 and 'series' not in name:
|
||||
pages = osg_wikipedia.pages(results)
|
||||
page = pages[0]
|
||||
url = page.url
|
||||
# add url to Media field
|
||||
# throw out those too dissimilar
|
||||
results = [r for r in results if osg.name_similarity(str.casefold(inspiration['Name']), str.casefold(r)) > 0.6]
|
||||
|
||||
# get pages for the remaining
|
||||
pages = osg_wikipedia.pages(results)
|
||||
|
||||
# throw out those that are no video games
|
||||
pages = [page for page in pages if any('video games' in category for category in page.categories)]
|
||||
|
||||
# sort by similarity to title and only keep highest
|
||||
pages.sort(key=lambda page: osg.name_similarity(str.casefold(name), str.casefold(page.title)))
|
||||
pages = pages[:min(1, len(pages))]
|
||||
|
||||
# if there is still one left, use it
|
||||
if pages:
|
||||
url = pages[0].url
|
||||
inspiration['Media'] = inspiration.get('Media', []) + [url]
|
||||
print('{}: {}'.format(name, url))
|
||||
print('{} : {}'.format(name, url))
|
||||
|
||||
|
||||
|
||||
# check for name similarity
|
||||
# results = [r for r in results if any(x in r for x in ('video game', 'series')) or osg.name_similarity(str.casefold(inspiration['Name']), str.casefold(r)) > 0.8]
|
||||
# results = [r for r in results if any(x in r for x in ('video game', 'series'))]
|
||||
# print('{}: {}'.format(inspiration['Name'], results))
|
||||
def update_included_entries(self):
|
||||
if not self.inspirations:
|
||||
print('inspirations not yet loaded')
|
||||
return
|
||||
if not self.entries:
|
||||
print('entries not yet loaded')
|
||||
return
|
||||
# get all entry names
|
||||
entry_names = [entry['Title'] for entry in self.entries]
|
||||
# loop over all inspirations
|
||||
for inspiration in self.inspirations.values():
|
||||
name = inspiration['Name']
|
||||
included = name in entry_names and name not in inspiration['Inspired entries']
|
||||
if included:
|
||||
if 'Included' not in inspiration:
|
||||
print('{} is included but was not marked as such'.format(name))
|
||||
for field in c.optional_inspiration_fields:
|
||||
if field in inspiration:
|
||||
del inspiration[field]
|
||||
inspiration['Included'] = 'Yes'
|
||||
elif 'Included' in inspiration:
|
||||
print('{} was marked as included but is not anymore'.format(name))
|
||||
del inspiration['Included']
|
||||
|
||||
def update_inspired_entries(self):
|
||||
if not self.inspirations:
|
||||
@ -142,6 +170,7 @@ if __name__ == "__main__":
|
||||
'Check for orphans': m.check_for_orphans,
|
||||
'Check for inspirations not listed': m.check_for_missing_inspirations_in_entries,
|
||||
'Check for wikipedia links': m.check_for_wikipedia_links,
|
||||
'Update included entries': m.update_included_entries,
|
||||
'Update inspirations from entries': m.update_inspired_entries,
|
||||
'Read entries': m.read_entries
|
||||
}
|
||||
|
@ -205,6 +205,6 @@ url_developer_fields = ('Home',)
|
||||
|
||||
# inspiration/original game information (in the file all fields will be capitalized)
|
||||
essential_inspiration_fields = ('Name', 'Inspired entries')
|
||||
optional_inspiration_fields = ('Media',)
|
||||
optional_inspiration_fields = ('Media','Included')
|
||||
valid_inspiration_fields = essential_inspiration_fields + optional_inspiration_fields
|
||||
url_inspiration_fields = ('Media',)
|
@ -20,6 +20,9 @@ def search(search_term, results=3):
|
||||
def pages(titles):
|
||||
pages = []
|
||||
for title in titles:
|
||||
page = wikipedia.page(title, auto_suggest=False)
|
||||
try:
|
||||
page = wikipedia.page(title, auto_suggest=False)
|
||||
except wikipedia.exceptions.DisambiguationError:
|
||||
continue # here we silently eat the exception
|
||||
pages.append(page)
|
||||
return pages
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Bt Builder
|
||||
|
||||
- Home: http://identicalsoftware.com/btbuilder/
|
||||
- Inspiration: Bard's Tale Contruction Set
|
||||
- Inspiration: The Bard's Tale Construction Set
|
||||
- State: beta
|
||||
- Keyword: remake, tool
|
||||
- Code repository: https://github.com/dulsi/btbuilder.git (@created 2012, @stars 26, @forks 4)
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Cannonball
|
||||
|
||||
- Home: https://github.com/djyt/cannonball/wiki, http://reassembler.blogspot.com/
|
||||
- Inspiration: Outrun
|
||||
- Inspiration: Out Run
|
||||
- State: beta
|
||||
- Download: https://github.com/djyt/cannonball/wiki#downloads
|
||||
- Keyword: action, remake, content commercial
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Labyrinth of Worlds
|
||||
|
||||
- Home: http://low.sourceforge.net/index.php, https://sourceforge.net/projects/low/
|
||||
- Inspiration: Ultima Underworld 2: Labyrinth of Worlds
|
||||
- Inspiration: Ultima Underworld II: Labyrinth of Worlds
|
||||
- State: beta, inactive since 2010
|
||||
- Download: https://sourceforge.net/projects/low/files
|
||||
- Keyword: role playing
|
||||
|
@ -1,7 +1,7 @@
|
||||
# UnderworldExporter
|
||||
|
||||
- Home: https://github.com/hankmorgan/UnderworldExporter
|
||||
- Inspiration: Ultima Underworld, Ultima Underworld II: Labyrinth of Worlds
|
||||
- Inspiration: Ultima Underworld 1, Ultima Underworld II: Labyrinth of Worlds
|
||||
- State: mature
|
||||
- Keyword: remake, role playing, content commercial + original required
|
||||
- Code repository: https://github.com/hankmorgan/UnderworldExporter.git (@created 2014, @stars 204, @forks 16)
|
||||
|
398
inspirations.md
398
inspirations.md
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user