Update requirements; Add setup.sh; Update README.md

This commit is contained in:
poka 2020-11-24 07:34:57 +01:00
parent 1dd680e7ae
commit 5951ab968e
3 changed files with 28 additions and 3 deletions

View File

@ -2,13 +2,23 @@
**Requierement**: **Requierement**:
``` ```
pip3 install -r requirements.txt bash setup.sh
chmod u+x pay.py
``` ```
Fill the path to your duniter PubSec keyfile in **.env** file (autogenerate on first use try, or please copy from .env.template)
### Usage exemple: ### Usage exemple:
**Send a payment**: **Send a payment**:
``` ```
./pay.py Do99s6wQR2JLfhirPdpAERSjNbmjjECzGxHNJMiNKT3P 314 "Merci pour la pipe" ./pay.py -d Do99s6wQR2JLfhirPdpAERSjNbmjjECzGxHNJMiNKT3P -m 314 -c "Merci pour la pipe"
``` ```
**Show wallet history**:
```
./history.py
```
```
./history.py -p Do99s6wQR2JLfhirPdpAERSjNbmjjECzGxHNJMiNKT3P
```

View File

@ -1,3 +1,6 @@
wheel
base58
pybase64
gql gql
duniterpy duniterpy
termcolor termcolor

12
setup.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
for i in gcc python3-pip python3-setuptools libpq-dev python3-dev python3-wheel; do
if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
[[ ! $j ]] && sudo apt update
sudo apt install -y $i
j=1
fi
done
pip3 install -r requirements.txt
chmod u+x *.py