Skip to content

Commit

Permalink
readme updates, import_alliances script
Browse files Browse the repository at this point in the history
  • Loading branch information
tedivm committed Oct 8, 2016
1 parent 366b946 commit 38ddbd5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@

Update the info in settings.example

```
```bash
cp settings.example settings
nano settings # add api settings.
pip install -r requirements.txt
export SETTINGS=/path//to/settings
export SETTINGS="`pwd`/settings"
export FLASK_APP=screeps_loan/screeps_loan.py
python db/manage.py version_control
python db/manage.py upgrade
Expand All @@ -17,6 +19,16 @@ flask import_users #This actually will run map stats to get all users on the ma
flask import_alliances #Importing alliance from alliances.js file
```

# Update Data

Bash wrapper scripts are provided to make updating easier.

```bash
./bin/import_users
./bin/import_alliances
```


# Testing with Vagrant

1. Install vagrant.
Expand Down
14 changes: 14 additions & 0 deletions bin/import_alliances
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

# Get real directory in case of symlink
if [[ -L "${BASH_SOURCE[0]}" ]]
then
DIR="$( cd "$( dirname $( readlink "${BASH_SOURCE[0]}" ) )" && pwd )"
else
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
fi
cd $DIR
cd ..
source $DIR/envvar

flask import_alliances

0 comments on commit 38ddbd5

Please sign in to comment.