-*.pyc
*~
*.bak
-xonstat/batch/badges/output/*.png
-xonstat/batch/badges/output/*/*.png
+*.tmp
+*.old
+*.pyc
+/xonstat/batch/badges/output/*.png
+/xonstat/batch/badges/output/*/*.png
debug_routematch = false
debug_templates = true
default_locale_name = en
-sqlalchemy.url = postgresql+psycopg2://xonstat:xonstat@localhost:5433/xonstatdb
+sqlalchemy.url = postgresql+psycopg2://xonstat:xonstat@localhost:5432/xonstatdb
session.type = file
session.data_dir = %(here)s/data/sessions/data
session.lock_dir = %(here)s/data/sessions/lock
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
-README = open(os.path.join(here, 'README.txt')).read()
+README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
from sqlalchemy import distinct
from pyramid.paster import bootstrap
from xonstat.models import *
+from xonstat.util import datetime_seconds
from skin import Skin
from playerdata import PlayerData
if len(skins) == 0:
skins = [ skin_classic, skin_minimal ]
-
# environment setup
env = bootstrap('../../../development.ini')
req = env['request']
if len(players) > 0:
stop = datetime.now()
td = stop-start
- total_seconds = (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6
- print "Query took %.2f seconds" % (total_seconds)
+ print "Query took %.2f seconds" % (datetime_seconds(td))
print "Creating badges for %d players ..." % len(players)
start = datetime.now()
playerdata.get_data(player_id)
sstop = datetime.now()
td = sstop-sstart
- total_seconds = float(td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6
- data_time += total_seconds
+ data_time += datetime_seconds(td)
sstart = datetime.now()
for sk in skins:
sk.render_image(playerdata, "output/%s/%d.png" % (str(sk), player_id[0]))
sstop = datetime.now()
td = sstop-sstart
- total_seconds = float(td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6
- render_time += total_seconds
+ render_time += datetime_seconds(td)
stop = datetime.now()
td = stop-start
- total_seconds = float(td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6
+ total_seconds = datetime_seconds(td)
print "Creating the badges took %.1f seconds (%.3f s per player)" % (total_seconds, total_seconds/float(len(players)))
print "Total time for rendering images: %.3f s" % render_time
print "Total time for getting data: %.3f s" % data_time
--- /dev/null
+/usr/local/games/Xonotic/misc/infrastructure/keygen/crypto-keygen-standalone
\ No newline at end of file
vertical-align: top;
}
body {
+ background: url('img/web_background_3.jpg') no-repeat center center fixed;
background-color: #000000;
- background:#000 url('img/web_background_2.jpg') 0 0 no-repeat;
- background-size: 100%;
+ -webkit-background-size: cover; /*for webKit*/
+ -moz-background-size: cover; /*Mozilla*/
+ -o-background-size: cover; /*opera*/
+ background-size: cover; /*generic*/
color: #d0d0d0;
font-family: "XoloniumNormal", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 11px;
.invisible {
visibility: hidden;
}
+
+/* Custom Stuff */
+table {
+ background: rgb(0, 0, 0); /* IE Fallback */
+ background: none repeat scroll 0 0 rgba(0, 0, 0, 0.7);
+}
#statline {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px;
}
#xonborder {
background: rgb(0, 0, 0); /* IE Fallback */
- background: none repeat scroll 0 0 rgba(0, 0, 0, 0.4);
- border-radius: 6px 6px 6px 6px;
+ background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5);
+ border-radius: 15px 15px 15px 15px;
margin-bottom: 30px;
padding: 20px;
}
#title {
color: #0088CC;
font-size: 30px;
- font-style: italic;
margin-bottom: 25px;
position: relative;
text-align: center;
--- /dev/null
+/* ========================================================
+ * bootstrap-tabs.js v1.4.0
+ * http://twitter.github.com/bootstrap/javascript.html#tabs
+ * ========================================================
+ * Copyright 2011 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================== */
+
+
+!function( $ ){
+
+ "use strict"
+
+ function activate ( element, container ) {
+ container
+ .find('> .active')
+ .removeClass('active')
+ .find('> .dropdown-menu > .active')
+ .removeClass('active')
+
+ element.addClass('active')
+
+ if ( element.parent('.dropdown-menu') ) {
+ element.closest('li.dropdown').addClass('active')
+ }
+ }
+
+ function tab( e ) {
+ var $this = $(this)
+ , $ul = $this.closest('ul:not(.dropdown-menu)')
+ , href = $this.attr('href')
+ , previous
+ , $href
+
+ if ( /^#\w+/.test(href) ) {
+ e.preventDefault()
+
+ if ( $this.parent('li').hasClass('active') ) {
+ return
+ }
+
+ previous = $ul.find('.active a').last()[0]
+ $href = $(href)
+
+ activate($this.parent('li'), $ul)
+ activate($href, $href.parent())
+
+ $this.trigger({
+ type: 'change'
+ , relatedTarget: previous
+ })
+ }
+ }
+
+
+ /* TABS/PILLS PLUGIN DEFINITION
+ * ============================ */
+
+ $.fn.tabs = $.fn.pills = function ( selector ) {
+ return this.each(function () {
+ $(this).delegate(selector || '.tabs li > a, .pills > li > a', 'click', tab)
+ })
+ }
+
+ $(document).ready(function () {
+ $('body').tabs('ul[data-tabs] li > a, ul[data-pills] > li > a')
+ })
+
+}( window.jQuery || window.ender );
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
- <style type="text/css">
- body {
- padding-top: 60px;
- padding-bottom: 40px;
- }
- </style>
-
<%block name="css">
<!-- <link href="/static/css/style.min.css" rel="stylesheet"> -->
<link href="/static/css/style.css" rel="stylesheet">
<link type="images/vnd.microsoft.icon" rel="shortcut icon" href="/static/favicon.ico">
</%block>
+
+ <script src="/static/js/jquery-1.7.1.min.js"></script>
</head>
<body>
<div class="row">
<div class="span12" id="xonborder">
- <div id="title"><%block name="title"></%block> </div>
+ <div id="title"><%block name="title"></%block></div>
${self.body()}
</div> <!-- /xonborder -->
</div> <!-- /main row -->
<%def name="nav(active)">
- <div class="navbar navbar-fixed-top">
+ <div class="navbar navbar-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
kwargs['_query'] = dict(kwargs['_query'].items() + kwargs['search_query'].items())
%>
+% if not last:
+ <% last = 1 %>
+% endif
+
% if not (curr == last and curr == 1):
% if curr != 1:
<% kwargs['_query']['page'] = curr-1 %>
}
var previousPoint = null;
+ var previousLabel = null;
$('#acc-graph').bind("plothover", function (event, pos, item) {
if (item) {
- if (previousPoint != item.dataIndex) {
+ if ((previousLabel != item.series.label) || (previousPoint != item.dataIndex)) {
+ previousLabel = item.series.label;
previousPoint = item.dataIndex;
$("#tooltip").remove();
else {
$("#tooltip").remove();
previousPoint = null;
+ previousLabel = null;
}
});
$('#dmg-graph').bind("plothover", function (event, pos, item) {
if (item) {
- if (previousPoint != item.dataIndex) {
+ if ((previousLabel != item.series.label) || (previousPoint != item.dataIndex)) {
previousPoint = item.dataIndex;
+ previousLabel = item.series.label;
$("#tooltip").remove();
var x = item.datapoint[0].toFixed(2),
else {
$("#tooltip").remove();
previousPoint = null;
+ previousLabel = null;
}
});
<%namespace file="navlinks.mako" import="navlinks" />
<%block name="title">
-Rank Index - ${parent.title()}
-</%block>
-
-% if not ranks:
-<h2>Sorry, no ranks yet. Get some buddies together and start playing!</h2>
-
-% else:
-<h2>
% if game_type_cd == 'dm':
-Deathmatch
+Deathmatch Rank Index
% elif game_type_cd == 'duel':
-Duel
+Duel Rank Index
% elif game_type_cd == 'tdm':
-Team Deathmatch
+Team Deathmatch Rank Index
% elif game_type_cd == 'ctf':
-Capture The Flag
+Capture The Flag Rank Index
% endif
+</%block>
-Rank Index</h2>
+% if not ranks:
+<h2>Sorry, no ranks yet. Get some buddies together and start playing!</h2>
+
+% else:
<table id="rank-index-table" border="1">
<tr>
<th>Rank</th>
return "almost 2 years ago"
else:
return "about {0} years ago".format(int(round(dim/525600.0)))
+
+def datetime_seconds(td):
+ return float(td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6
+