[game-data-packager] 01/01: add Make rule to publish HTML dashboard on Alioth

Alexandre Detiste detiste-guest at moszumanska.debian.org
Sat Aug 29 13:50:29 UTC 2015


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 07053bde4df1a66a7895ad469d08f411d46db073
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Sat Aug 29 15:49:48 2015 +0200

    add Make rule to publish HTML dashboard on Alioth
---
 Makefile       | 7 ++++++-
 tools/babel.py | 9 ++++-----
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 8f870f6..6c2a97a 100644
--- a/Makefile
+++ b/Makefile
@@ -78,6 +78,7 @@ clean:
 	rm -f ./out/*.svgz
 	rm -f ./out/*.svg
 	rm -f ./out/*.json
+	rm -f ./out/index.html
 	rm -rf game_data_packager/__pycache__
 	for d in $(DIRS); do [ ! -d "$$d" ]  || rmdir "$$d"; done
 
@@ -94,4 +95,8 @@ manual-check:
 	done
 	rm -fr tmp/
 
-.PHONY: default clean check manual-check
+html: $(DIRS) $(json)
+	LC_ALL=C GDP_UNINSTALLED=1 PYTHONPATH=. python3 -m tools.babel
+	rsync out/index.html alioth.debian.org:/var/lib/gforge/chroot/home/groups/pkg-games/htdocs/game-data/ -e ssh -v
+
+.PHONY: default clean check manual-check html
diff --git a/tools/babel.py b/tools/babel.py
index 71b1baf..df43f41 100755
--- a/tools/babel.py
+++ b/tools/babel.py
@@ -16,10 +16,9 @@
 # /usr/share/common-licenses/GPL-2.
 
 
-# Online at http://users.teledisnet.be/ade15809/babel.html
+# Online at http://pkg-games.alioth.debian.org/game-data/
 
 from game_data_packager import (load_games, GameData, FillResult)
-from game_data_packager.util import ascii_safe
 
 games = []
 genres = dict()
@@ -53,7 +52,7 @@ for name, game in load_games().items():
     genres[game.genre] = genres.get(game.genre, 0) + 1
     stats['genre'] = game.genre
     stats['shortname'] = name
-    stats['longname'] = ascii_safe(game.longname, force=True)
+    stats['longname'] = game.longname
     stats['total'] = len(game.packages)
     stats['missing_langs'] = game.missing_langs
     stats['fullfree'] = fullfree
@@ -71,12 +70,12 @@ games = sorted(games, key=lambda k: (k['genre'], k['shortname'], k['longname']))
 
 langs_order = [k for k, v in sorted(langs.items(), key=lambda kv: (-kv[1], kv[0]))]
 
-html = open('/home/tchet/Utilitaires/Homepage/babel.html', 'w', encoding='latin1')
+html = open('out/index.html', 'w', encoding='utf8')
 html.write('''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
 <title>Game-Data-Packager</title>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
 </head>
 <table border=1 cellspacing=0>
 <tr>

-- 
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