Compare commits

...

5 Commits

Author SHA1 Message Date
Jean-Jacques Brucker 17ebb60b2f WIP packaging... I think it's better to improve and evolve silkaj, if possible. 2021-07-01 11:32:08 +02:00
Jean-Jacques Brucker 001d17dd06 Merge branch 'master' into debian 2021-07-01 11:28:43 +02:00
Jean-Jacques Brucker b7fa622941 finish previous shebang fix + minor improvement in code and help message 2021-07-01 11:24:40 +02:00
poka fecc636418 Merge pull request 'To work with python 3.6 on Linux Mint' (#16) from qo-op/jaklis:master into master
Reviewed-on: #16
2021-07-01 02:24:40 +02:00
qo-op 864334d06d To work with python 3.6 on Linux Mint
Remove 3.7 definition...
2021-06-30 21:11:04 +02:00
3 changed files with 18 additions and 18 deletions

View File

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

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.7
#!/usr/bin/env python3
import argparse, sys, os, getpass, string, random
from os.path import join, dirname
@ -16,8 +16,19 @@ 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")
parser = argparse.ArgumentParser(description="Client CLI pour Cesium+ et Ḡchange", epilog="current node: '" + node + "', current pod: '" + pod + "'.")
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")
@ -124,7 +135,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
@ -170,10 +181,6 @@ 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)
@ -232,15 +239,9 @@ 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)