/bundesliga2go

Get Bundesliga results and updates on your phone. Fast!

Primary LanguageJavaScript

**Installation**
================
Once you have cloned the bundesliga2go repository and have it stored locally
on your harddrive you need to ensure that you have certain Python modules
installed. These are requirements of the server.py and of the various
bundesliga and OpenLigaDB APIs included in the package. The requirements are:

- web.py (http://www.webpy.org)
- SQLAlchemy (http://www.sqlalchemy.org)
- Suds (https://fedorahosted.org/suds)
- Paste (http://www.pythonpaste.org)
- APScheduler (http://packages.python.org/APScheduler/)
- pyOpenSSL (https://launchpad.net/pyopenssl) if you want to use SSL on CherryPy
- PIL (http://www.pythonware.com/products/pil/) for stitching icons


When you are sure that all of these requirements are installed, you are
basically ready to go.

**Starting the scheduler**
==========================
The scheduler is responsible for updating the local database with data from
openligadb.de. This is done by using APScheduler to schedule a function to run
every 30 seconds. This function checks if there are matches in progress. If not,
the function just returns. Otherwise, the function uses api.py::localService to
update the Match locally. To start the scheduler run:

``python bundesligaScheduler.py``

You can put the scheduler into the background by running:
``python bundesligaScheduler.py &``

**Running the server**
======================
To get the server up and running you simply have to run the following command
in the directory in which the server.py script is located:

``python server.py``

You can specify the port number directly on the commandline as well by entering
something like:

``python server.py 8081``

The default port used is port 8080. You will get an error if there is already
something listening/using port 8080. You can either stop the other service or
choose another port for server.py.

When you first start the server the script will automatically check if a local
database has been configured and if it has been synchronised with openligadb.
If not, this will be done first. This may take some time.


**Copyright, License, Authors**
===============================
bundesliga2go is copyright 2011 Ciaran Farrell <cfarrell1980@gmail.com> and
Vladislav Lewin <vlewin@suse.de>. It is licensed under the BSD License
(so called '3 Clause'):

Copyright (c) 2011, Ciaran Farrell, Vladislav Lewin
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

Neither the name of the authors nor the names of contributors may be used to
endorse or promote products derived from this software without specific prior
written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.