removed @see notation

This commit is contained in:
Trilarion
2021-02-01 13:42:00 +01:00
parent be96e7b085
commit 06290c2926
173 changed files with 113 additions and 215 deletions

View File

@ -4,6 +4,9 @@ http://antongerdelan.net/blog/ (other projects besides TestDrive)
http://cdetect.sourceforge.net/
http://circularstudios.com/
http://cyxdown.free.fr/bs/
https://projects.tuxfamily.org/ (all of them)
https://www.artsoft.org/rocksndiamonds/
https://web.archive.org/web/20171228172756/http://www.oletus.fi/static/whichwayisup/
http://cyxdown.free.fr/f2b/
http://dead-code.org/home/
http://e-adventure.e-ucm.es/login/index.php (games of eAdventure)

View File

@ -21,14 +21,13 @@ Listing:
# TODO contribute.html add content
# TODO more icons - (categories, stars, forks)
# TODO rename fields (Home to Homepage, Inspirations to Inspiration)
# TODO replace or remove @notices in entries (maybe different entries format) ??
# TODO SEO optimizations, google search ...
# TODO sitemap
# TODO Google search console
# TODO <a> rel attribute https://www.w3schools.com/TAGS/att_a_rel.asp
# TODO naming: improve or send feedback?
# TODO menu (before On Github, Blog)
# TODO naming: improve or send feedback? or edit? or contribute?
# TODO menu (before On Github, Blog) or just in the footer
# TODO everywhere: style URLs (Github, Wikipedia, Internet archive, SourceForge, ...)
# TODO everywhere: singular, plural (game, entries, items)
@ -42,7 +41,7 @@ Listing:
# TODO statistics: with nice graphics (pie charts in SVG) with matplotlib, seaborn, plotly?
# TODO statistics: get it from common statistics generator
# TODO footer: last updated with lower precision + link to license
# TODO footer: clean up, link to Github project
# TODO frameworks: icons
@ -131,8 +130,8 @@ genre_icon_map = {
'Library': 'library'
}
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+'s' for k in ('Assets license', 'Contact', 'Code language', 'Code license', 'Developer', 'Download', 'Inspiration', 'Game', 'Keyword', 'Home', 'Homepage', 'Organization', 'Platform', 'Tag')}
for k in ('Media', 'Play', 'Play online', 'State'):
plurals[k] = k
for k in ('Code repository', 'Code dependency'):
plurals[k] = k[:-1] + 'ies'
@ -373,6 +372,7 @@ def make_url(href, content, title=None, css_class=None):
url['class'] = css_class
return url
def make_icon(css_class):
return {
'type': 'icon',
@ -389,11 +389,13 @@ def make_text(content, css_class=None):
text['class'] = css_class
return text
def make_nothing():
return {
'type': 'nothing'
}
def make_enumeration(entries, divider=', '):
enumeration = {
'type': 'enumeration',
@ -402,6 +404,7 @@ def make_enumeration(entries, divider=', '):
}
return enumeration
def make_tags(entries):
return {
'type': 'tags',
@ -526,11 +529,18 @@ def convert_entries(entries, inspirations, developers):
if field == 'Inspiration':
e = [make_url(inspirations_references[x], make_text(x, 'has-text-weight-semibold')) for x in e]
elif field == 'Developer':
e = [make_url(developer_references[x], make_text(x, 'has-text-weight-semibold')) for x in e]
if len(e) > 10: # many devs, print smaller
e = [make_url(developer_references[x], make_text(x, 'has-text-weight-semibold is-size-7')) for x in e]
else:
e = [make_url(developer_references[x], make_text(x, 'has-text-weight-semibold')) for x in e]
elif field in c.url_fields:
e = [make_url(x, shortcut_url(x, name)) for x in e]
else:
e = [make_text(x) for x in e]
if field == 'Home': # Home -> Homepage
field = 'Homepage'
elif field == 'Play': # Play -> Play online
field = 'Play online'
namex = make_text('{}: '.format(get_plural_or_singular(field, len(e))), 'has-text-weight-semibold')
entry[field.lower()] = [namex, make_enumeration(e, divider)]
@ -556,7 +566,7 @@ def convert_entries(entries, inspirations, developers):
if isinstance(e[0], osg.osg_parse.ValueWithComment):
e = [x.value for x in e]
if field == 'Code language':
e = [make_url(code_language_references[x], make_text(x, 'is-size-7')) for x in e]
e = [make_url(code_language_references[x.value], make_text(x, 'is-size-7')) for x in e]
elif field == 'Code license' or field == 'Assets license':
e = [make_url(c.license_urls[x], x, css_class='is-size-7') if x in c.license_urls else make_text(x, 'is-size-7') for x in e]
elif field in c.url_fields:
@ -636,7 +646,7 @@ def generate(entries, inspirations, developers):
# base dictionary
base = {
'title': 'OSGL',
'creation-date': datetime.datetime.utcnow()
'creation-date': datetime.datetime.now(datetime.timezone.utc).strftime('%Y-%m-%d %H:%M')
}
# copy css

View File

@ -21,6 +21,7 @@
<a class="navbar-item{% if 'genres' in base['active_nav'] %} is-active{% endif %}" href="{{ base['url_to'](['games', 'genres.html']) }}">{{ macros.render_icon('price-tag') }}<span>By category</span></a>
<a class="navbar-item{% if 'code language' in base['active_nav'] %} is-active{% endif %}" href="{{ base['url_to'](['games', 'languages.html']) }}">{{ macros.render_icon('language') }}<span>By code language</span></a>
<a class="navbar-item{% if 'platforms' in base['active_nav'] %} is-active{% endif %}" href="{{ base['url_to'](['games', 'platforms.html']) }}">{{ macros.render_icon('laptop') }}<span>By OS support</span></a>
<a class="navbar-item{% if 'top-50' in base['active_nav'] %} is-active{% endif %}" href="{{ base['url_to'](['games', 'top50.html']) }}">{{ macros.render_icon('star') }}<span>GitHub Stars Top 50</span></a>
</div>
</div>
<a class="navbar-item{% if 'frameworks' in base['active_nav'] %} is-active{% endif %}" href="{{ base['url_to'](['frameworks', 'index.html']) }}">{{ macros.render_icon('wrench') }}<span>Frameworks/Tools</span></a>
@ -43,7 +44,7 @@
<div class="block">
Disclaimer: The content on this site is the result of voluntary work and may be outdated or incorrect.
The content is licensed <a href="https://github.com/Trilarion/opensourcegames/blob/master/LICENSE">CC-0</a>. Icons and ... <br>
Last updated on {{ base['creation-date'] }}
Last updated: {{ base['creation-date'] }}
</div>
</div>
</footer>

View File

@ -35,7 +35,7 @@
{%- if 'developer' in item %}{{ macros.render_element(item['developer']) }}{% endif -%}
</div>
<div class="block">
{%- for field in ('home', 'media', 'download', 'play') -%}
{%- for field in ('homepage', 'media', 'download', 'play online') -%}
{%- if field in item -%}{{ macros.render_element(item[field]) }}<br>{%- endif -%}
{%- endfor -%}
</div>

View File

@ -863,38 +863,50 @@ class EntriesMaintainer:
print('entries not yet loaded')
return
# collect statistics on git repositories
created = {}
stars = []
forks = []
# remove download urls that are also in home
for entry in self.entries:
repos = entry['Code repository']
comments = [x.comment for x in repos if x.value.startswith('https://github.com/') and x.comment]
for comment in comments:
comment = comment.split(',')
comment = [c.strip() for c in comment]
comment = [c for c in comment if c.startswith('@')]
if comment:
try:
comment = [c.split(' ') for c in comment]
comment = [c[1] for c in comment if len(c) > 1]
except Exception:
print(comment)
raise
created[comment[0]] = created.get(comment[0], 0) + 1
stars.append(comment[1])
forks.append(comment[2])
homes = entry['Home']
downloads = entry.get('Download', [])
downloads = [download for download in downloads if download not in homes]
if downloads:
entry['Download'] = downloads
if not downloads and 'Download' in entry:
del entry['Download']
for key, value in sorted(created.items(), key=lambda x: x[0]):
print("{} : {}".format(key, value))
import numpy as np
np.set_printoptions(suppress=True)
stars = np.array(stars, dtype=np.float)
forks = np.array(forks, dtype=np.float)
q = np.arange(0, 1, 0.1)
print(np.quantile(stars, q))
print(np.quantile(forks, q))
# # collect statistics on git repositories
# created = {}
# stars = []
# forks = []
# for entry in self.entries:
# repos = entry['Code repository']
# comments = [x.comment for x in repos if x.value.startswith('https://github.com/') and x.comment]
# for comment in comments:
# comment = comment.split(',')
# comment = [c.strip() for c in comment]
# comment = [c for c in comment if c.startswith('@')]
# if comment:
# try:
# comment = [c.split(' ') for c in comment]
# comment = [c[1] for c in comment if len(c) > 1]
# except Exception:
# print(comment)
# raise
# created[comment[0]] = created.get(comment[0], 0) + 1
# stars.append(comment[1])
# forks.append(comment[2])
#
# for key, value in sorted(created.items(), key=lambda x: x[0]):
# print("{} : {}".format(key, value))
#
# import numpy as np
# np.set_printoptions(suppress=True)
# stars = np.array(stars, dtype=np.float)
# forks = np.array(forks, dtype=np.float)
# q = np.arange(0, 1, 0.333)
# print(q)
# print(np.quantile(stars, q))
# print(np.quantile(forks, q))
# # cvs without any git
# for entry in self.entries:

View File

@ -42,7 +42,7 @@ def get_config(key):
generic_comment_string = '[comment]: # (partly autogenerated content, edit with care, read the manual before)'
# these fields have to be present in each entry (in this order)
essential_fields = ('File', 'Title', 'Home', 'State', 'Keyword', 'Code repository', 'Code language', 'Code license')
essential_fields = ('File', 'Title', 'Home', 'State', 'Keyword', 'Code language', 'Code license')
# only these fields can be used currently (in this order)
valid_properties = ('Home', 'Media', 'Inspiration', 'State', 'Play', 'Download', 'Platform', 'Keyword', 'Code repository', 'Code language',

View File

@ -235,7 +235,7 @@ def read_entries():
entries = []
# iterate over all entries
exception_happened = False
exception_happened = None
for file, _, content in entry_iterator():
if not content.endswith('\n'):
@ -248,14 +248,14 @@ def read_entries():
entry = check_and_process_entry(entry)
except Exception as e:
print('{} - {}'.format(file, e))
exception_happened = True
# raise RuntimeError(e)
exception_happened = e # just store last one
continue
# add to list
entries.append(entry)
if exception_happened:
raise RuntimeError('errors while reading entries')
print('error(s) while reading entries')
raise exception_happened
return entries
@ -354,7 +354,7 @@ def check_and_process_entry(entry):
message += 'URL "{}" in field "{}" does not start with a valid prefix'.format(value, field)
# github/gitlab repositories should end on .git and should start with https
for repo in entry['Code repository']:
for repo in entry.get('Code repository', []):
if any(repo.startswith(x) for x in ('@', '?')):
continue
repo = repo.value.split(' ')[0].strip()