diff --git a/README.md b/README.md index 1bb79b8..fa5ee65 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,23 @@ **Requierement**: ``` -pip3 install -r requirements.txt -chmod u+x pay.py +bash setup.sh ``` +Fill the path to your duniter PubSec keyfile in **.env** file (autogenerate on first use try, or please copy from .env.template) + ### Usage exemple: **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 +``` \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 22c77de..ac6bbe1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,6 @@ +wheel +base58 +pybase64 gql duniterpy termcolor diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..366ae46 --- /dev/null +++ b/setup.sh @@ -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