[game-data-packager] 01/01: HTML webpage: make it reproducible

Alexandre Detiste detiste-guest at moszumanska.debian.org
Tue Apr 25 10:38:02 UTC 2017


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 59d5ee521b17ae474f0e13b220248890a6329ff0
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Tue Apr 25 11:25:33 2017 +0200

    HTML webpage: make it reproducible
---
 tools/babel.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tools/babel.py b/tools/babel.py
index 5cdcf65..fbb9b36 100755
--- a/tools/babel.py
+++ b/tools/babel.py
@@ -44,12 +44,14 @@ for name, game in load_games().items():
     fullfree = True
     somefree = False
     if game.copyright:
-        year = game.copyright[2:6]
+        year = int(game.copyright[2:6])
     else:
         year = None
     for package in game.packages.values():
-        if not year and package.copyright:
-            year = package.copyright[2:6]
+        if not year:
+            year = int(package.copyright[2:6])
+        elif package.copyright:
+            year = min(year, int(package.copyright[2:6]))
         if not package.demo_for:
             for m_lang in package.langs:
                 if m_lang not in stats:
@@ -65,7 +67,7 @@ for name, game in load_games().items():
     genres[genre] = genres.get(genre, 0) + 1
     stats['genre'] = genre
     if game.franchise:
-        stats['sort_key'] = game.franchise.lower() + ' ' + year
+        stats['sort_key'] = game.franchise.lower() + ' ' + '%d' % year + game.shortname
     else:
         stats['sort_key'] = game.shortname
     stats['shortname'] = name

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list