The application should have an online version soon, open only for selected people ;)
But you can also make it run on your personal laptop!
recount-presentation.mp4
You can install the application using Ansible.
git clone https://github.com/Raiytak/Recount.git
cd Recount
pip install -r recount/requirements.txt
After that, we will create and instanciate the necessary folders and files:
python -m recount.src.accessors --initiate-folders
You should check on your home folder (~ for Linux), a .recount
folder should have been created. It is this file that the app will use.
You should modify the default password in .recount/config/sql.config
to ensure some security.
You can also configure it while launching the application by providing information to the script. See python -m recount -h
for that.
Upload the init.sql
file present in database into mysql:
mysql -u root -p recount < db/sql/init.sql
This will create the necessary database and tables. You have to use the ROOT of your MySQL for this process.
Add a user and grant him access to this new database.
Its information have to match the one written in .recount/config/sql.config
.
CREATE USER 'recount_admin'@'localhost' IDENTIFIED BY 'mypass';
GRANT ALL PRIVILEGES ON recount.* TO 'recount_admin'@'localhost';
FLUSH PRIVILEGES;
The name and password used SHOULD BE DIFFERENT from the default ones.
To ensure that the configuration is working, you can do python -m recount.src.database --test
To configure the database credentials and values used by Recount, you can set them via 2 possibilities: -1: via command line
python -m recount --dbname recount-1 --dbuser recount-administrator
-2: by editing manually the config file, which is located at ~/.recount/config/sql.config
python -m recount --launch
Once running, you can access it through your browser by typing localhost:8050
Other option: Run with Gunicorn
python -m gunicorn 'recount.app:createRecountServer()'