Skip to content
MarkTraceur edited this page Aug 9, 2011 · 19 revisions

Stattr Home Page

Stattr is a web application used for tracking statistics having to do with competitive activities. It allows any number of variables to be tracked, and any number of competitors to be added to a resultset. This page will explain how to get started with using this application. If you want to get started with Stattr development, you can check out StattrDev. If you'd like to join the stattr community, head on over to #stattr on irc.freenode.net.

Downloading

You can download Stattr in two ways: Through SVN, which gives you the latest-and-greatest straight from the developers; or through a source release, which will give you a guaranteed-stable piece of software (such as it is, with a pre-alpha software). You can also download a stable release of the software through PyPi! (NOTE: Not yet, because Mark can't write setup scripts to save his life)

PyPi

If you have pip on your machine, it can be as simple as

pip install stattr

possibly with root privileges. If you don't, you can head over to the PyPi download page and download the latest package. Then, follow the setup.py instructions below. NOT TRUE, you cannot currently use PyPi to install stattr, at least not without some serious hacking. Sorry.

git

$ git clone git://github.com/MarkTraceur/stattr.git stattr

The above code will checkout the code in a directory called 'stattr', from which you can run the server right away--but don't, yet!

Source Release

This page has the latest downloads for Stattr. Look for the big button that says Download, choose the latest .tar.gz file, then extract it with

$ tar xvzf stattr-*.tar.gz

assuming you are in the directory where you want it, and have the file in that directory. If you want it anywhere else, I trust you can figure it out!

You can also go to this page to find a list of release downloads.

Dependencies

Dependencies are the ugly aunt of software. We don't want to have to get them from a remote server and wait for them to install, but we need them to get data from mongodb. So, download and install pymongo and Flask, both of which are for Python. Also download and install mongodb itself, since we'll be querying such a database from the server.

Configuring

Though this step should really have its own page in the future, we need to make absolutely certain that you change some things in the config file.

First, open the main config file, stattrd.conf. We will be putting this in a more convenient place when we actually package it with a setup.py, but right now it's just wherever you're running the python from. In that file, you'll see all of our default options for you. There is a place for a logo URL, a location, a title for your site, and so on.

The important things are the adminuser/adminpass options. They set the username and password for the default admin user. You can set these to be your own username and password if you want, but it might be more prudent to set them to something random and unguessable, then create your user through the (presumably) secure web interface.

Not all of these fields are required, but if you can fill them all out, it's much better. I have no way of explaining which are required, since I haven't really spent much time on the config files yet.

In general, the options are all set with the syntax

option=value, with whatever symbols you want including spaces

Just make sure that the value doesn't include equal signs, since that will break the parser at the very beginning--or at least cause you to lose whatever is after the second equal sign.

Firing it Up

Once you have a good config file, you can just start the server. This can be done with

./stattrd

That command will start the server, which will then be listening on all interfaces, port 54321 (By default). So, try going to http://127.0.0.1:54321 right now and see what happens! If it didn't work, maybe you messed up above, or we messed up in this guide somewhere....consider filing a bug!

You can also install stattr to your computer with

# ./setup.py install

After running that command (with root privileges), you will be able to start stattr anywhere on your computer with the command

stattrd

Using the App

Now that you have a super-nice install, you can start using the application! Hopefully most things are self-explanatory in context, but if you need any more explanation, refer to the UserDocs for more help.

Disclaimer

This application is still VERY INSECURE. Don't store personal or sensitive data on it until AT LEAST the 0.05 release. I won't be responsible for your data being broadcast all over the network.

Clone this wiki locally