Skip to content

Commit

Permalink
Cleanup & documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ceari committed Sep 12, 2013
1 parent 2899c48 commit 0953a84
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 17 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,21 @@ Configuration

Copy whyattend/config.py to local_config.py and adjust the settings.
Put your clan's logo into whyattend/static/img/clanicons.
Replace whyattend/static/img/header.jpg with an image of your choice.

After deployment, the initial database schema should be generated by
opening /createdb in a browser, while app.config['DEBUG'] is set to True.
opening /createdb?API_KEY=<configured API KEY> in a browser.

The clan member roles can be synchronized with Wargaming's server by
opening /sync-players/<clanid>/?API_KEY=<config.API_KEY>
opening /sync-players/<clanid>/?API_KEY=<configured API KEY>

config.API_KEY should be set to something random and secret, so only you
can trigger the synchronization.

This can be automated by a cron script, e.g:

> #!/bin/bash
> # Clan WHY
> # Synchronize WHY members
> curl "http://myserver.com/sync-players/500014725?API_KEY=supersecret"


Expand Down
5 changes: 4 additions & 1 deletion whyattend/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
""" Configuration settings.
"""
Application Configuration
~~~~~~~~~~~~~~~~~~~~~~~~~
This file should be used as a template and overview
of all available options. Put your local deployment
settings into local_config.py, which overrides these
Expand Down
3 changes: 3 additions & 0 deletions whyattend/model.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""
Database mapping
~~~~~~~~~~~~~~~~
"""

import pickle
Expand Down Expand Up @@ -213,7 +214,9 @@ def get_representative_battle(self):
class Replay(db.Model):
__tablename__ = 'replay'
id = db.Column(db.Integer, primary_key=True)
# The data returned by replays.parse_replay as Python pickle
replay_pickle = db.Column(db.Binary)
# The replay file
replay_blob = db.Column(db.Binary)

def __init__(self, replay_blob, replay_pickle):
Expand Down
3 changes: 3 additions & 0 deletions whyattend/replays.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
"""
Replay Parsing
~~~~~~~~~~~~~~
World of Tanks replay parsing and information extraction
"""

Expand Down
1 change: 1 addition & 0 deletions whyattend/util.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""
Utility classes
~~~~~~~~~~~~~~~
"""


Expand Down
Loading

0 comments on commit 0953a84

Please sign in to comment.