This is an automated email from the git hooks/post-receive script. detiste-guest pushed a commit to branch master in repository game-data-packager.
commit 5fb5fcf6e472bad49f361723860aa5f4da12676b Author: Alexandre Detiste <[email protected]> Date: Sat Jul 4 09:50:24 2015 +0200 add hyperlinks to HTML overview --- game_data_packager/__init__.py | 16 ++++++++++++---- tools/babel.py | 10 +++++++++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py index 700481f..6b921b4 100644 --- a/game_data_packager/__init__.py +++ b/game_data_packager/__init__.py @@ -545,6 +545,10 @@ class GameData(object): self.gog = {} self.origin = {} + # full url of online game shops + self.url_steam = None + self.url_gog = None + self.data = data self.argument_parser = None @@ -799,10 +803,14 @@ class GameData(object): steam_id.add(package.steam.get('id')) steam_id.discard(None) www = list() - if steam_id and '://store.steampowered.com/' not in self.help_text: - www.append('http://store.steampowered.com/app/%s/' % min(steam_id)) - if gog_url and '://www.gog.com/' not in self.help_text: - www.append('http://www.gog.com/game/' + gog_url + '?pp=' + gog_pp) + if steam_id: + self.url_steam = 'http://store.steampowered.com/app/%s/' % min(steam_id) + if '://store.steampowered.com/' not in self.help_text: + www.append(self.url_steam) + if gog_url: + self.url_gog = 'http://www.gog.com/game/' + gog_url + '?pp=' + gog_pp + if '://www.gog.com/' not in self.help_text: + www.append(self.url_gog) if www: random.shuffle(www) self.help_text += '\nThis game can be bought online here:\n ' diff --git a/tools/babel.py b/tools/babel.py index 01143b3..2e2882b 100755 --- a/tools/babel.py +++ b/tools/babel.py @@ -44,6 +44,8 @@ for name, game in load_games().items(): stats['longname'] = ascii_safe(game.longname, force=True) stats['total'] = len(game.packages) stats['missing_langs'] = game.missing_langs + stats['url_steam'] = game.url_steam + stats['url_gog'] = game.url_gog for l in game.missing_langs: if l not in langs: langs[l] = 0 @@ -67,7 +69,7 @@ html.write('''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "ht ) for lang in langs_order: html.write(' <td><b>%s</b></td>\n' % lang) -html.write('</tr>\n') +html.write('<td>Steam</td><td>GOG.com</td></tr>\n') # BODY last_genre = None @@ -89,6 +91,11 @@ for game in games: else: html.write(' <td> </td>\n') + for url in (game['url_steam'], game['url_gog']): + if url: + html.write(' <td align=center><a href="%s"><b>X</b></a></td>\n' % url) + else: + html.write(' <td> </td>\n') html.write('</tr>\n') # TOTAL @@ -97,6 +104,7 @@ for lang in langs_order: html.write(' <td><b>%s</b></td>\n' % langs[lang]) html.write(''' +<td colspan=2> </td> </tr> </table> <ul> -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

