Compare commits

..

No commits in common. "17ebb60b2fad81101875b53ef32795aba05c2703" and "f4de57a47b88846bf564cd7493a8e647abd66ac4" have entirely different histories.

3 changed files with 18 additions and 18 deletions

View File

@ -13,7 +13,7 @@ Débrouillez-vous.
## Utilisation
*Python 3.6 minimum*
*Python 3.9 minimum*
Renseignez optionnellement le fichier **.env** (Généré lors de la première tentative d'execution, ou à copier depuis .env.template).

7
debian/copyright vendored
View File

@ -1,10 +1,11 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: jaklis
Upstream-Contact: Etienne Bouché <poka@p2p.legal>
Source: https://git.p2p.legal/axiom-team/jaklis
Upstream-Contact: <preferred name and address to reach the upstream project>
Source: <url://example.com>
Files: *
Copyright: 2021 Etienne Bouché <poka@p2p.legal>
Copyright: <years> <put author's name and email here>
<years> <likewise for another author>
License: GPL-3.0+
Files: debian/*

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python3.7
import argparse, sys, os, getpass, string, random
from os.path import join, dirname
@ -16,19 +16,8 @@ if not os.path.isfile(MY_PATH + '.env'):
dotenv_path = join(dirname(__file__),MY_PATH + '.env')
load_dotenv(dotenv_path)
# Set global values (default parameters) , regarding variables environments
node = os.getenv('NODE')
if not node:
node="https://g1.librelois.fr/gva"
pod = os.getenv('POD')
if not pod:
pod="https://g1.data.le-sou.org"
destPubkey = False
# Parse arguments
parser = argparse.ArgumentParser(description="Client CLI pour Cesium+ et Ḡchange", epilog="current node: '" + node + "', current pod: '" + pod + "'.")
parser = argparse.ArgumentParser(description="Client CLI pour Cesium+ et Ḡchange")
parser.add_argument('-v', '--version', action='store_true', help="Affiche la version actuelle du programme")
parser.add_argument('-k', '--key', help="Chemin vers mon trousseau de clé (PubSec)")
parser.add_argument('-n', '--node', help="Adresse du noeud Cesium+, Gchange ou Duniter à utiliser")
@ -135,7 +124,7 @@ def createTmpDunikey():
key = SigningKey.from_credentials(getpass.getpass("Identifiant: "), getpass.getpass("Mot de passe: "), None)
key.save_pubsec_file(keyPath)
return keyPath
# Check if we need dunikey
@ -181,6 +170,10 @@ if cmd in ("read","send","delete","set","get","erase","stars","unstars","getoffe
if args.node:
pod = args.node
else:
pod = os.getenv('POD')
if not pod:
pod="https://g1.data.le-sou.org"
cesium = CesiumPlus(dunikey, pod, noNeedDunikey)
@ -239,9 +232,15 @@ elif cmd in ("pay","history","balance","id","idBalance","currentUd"):
if args.node:
node = args.node
else:
node = os.getenv('NODE')
if not node:
node="https://g1.librelois.fr/gva"
if args.pubkey:
destPubkey = args.pubkey
else:
destPubkey = False
gva = GvaApi(dunikey, node, destPubkey, noNeedDunikey)