Skip to content
Snippets Groups Projects
Commit d067f7d1 authored by Moul's avatar Moul
Browse files

Merge branch '100_pip_install' into 'dev'

100 pip install

See merge request !80
parents 4a4d80ae d0bab244
No related branches found
No related tags found
1 merge request!80100 pip install
File moved
#!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from sys import stderr from sys import stderr
from commandlines import Command from commandlines import Command
from tx import send_transaction from silkaj.tx import send_transaction
from money import cmd_amount from silkaj.money import cmd_amount
from cert import send_certification from silkaj.cert import send_certification
from commands import currency_info, difficulties, set_network_sort_keys,\ from silkaj.commands import currency_info, difficulties, set_network_sort_keys,\
network_info, argos_info, list_issuers network_info, argos_info, list_issuers
from tools import message_exit from silkaj.tools import message_exit
from network_tools import check_port, best_node from silkaj.wot import received_sent_certifications, id_pubkey_correspondence
from wot import received_sent_certifications, id_pubkey_correspondence from silkaj.auth import generate_auth_file
from auth import generate_auth_file from silkaj.license import display_license
from license import display_license from silkaj.constants import SILKAJ_VERSION, G1_SYMBOL, GTEST_SYMBOL, G1_DEFAULT_ENDPOINT, G1_TEST_DEFAULT_ENDPOINT
from constants import SILKAJ_VERSION, G1_SYMBOL, GTEST_SYMBOL, G1_DEFAULT_ENDPOINT, G1_TEST_DEFAULT_ENDPOINT
def usage(): def usage():
message_exit("Silkaj: command line client for Duniter currencies\ message_exit("Silkaj: command line client for Duniter currencies\
\n\nhelp: -h, --help, --usage \ \n\nhelp: -h, --help, --usage \
\nnersion: -v, --version \ \nversion: -v, --version \
\nabout: display informations about the programm\ \nabout: display informations about the programm\
\n \ \n \
\nEndpoint:\ \nEndpoint:\
...@@ -98,7 +96,7 @@ def cli(): ...@@ -98,7 +96,7 @@ def cli():
return ep, cli_args return ep, cli_args
def manage_cmd(ep, c): def manage_cmd(ep, cli_args):
if cli_args.subcmd == "about": if cli_args.subcmd == "about":
about() about()
...@@ -128,7 +126,7 @@ def manage_cmd(ep, c): ...@@ -128,7 +126,7 @@ def manage_cmd(ep, c):
send_transaction(ep, cli_args) send_transaction(ep, cli_args)
elif cli_args.subcmd == "cert": elif cli_args.subcmd == "cert":
send_certification(ep, c) send_certification(ep, cli_args)
elif cli_args.subcmd == "generate_auth_file": elif cli_args.subcmd == "generate_auth_file":
generate_auth_file(cli_args) generate_auth_file(cli_args)
...@@ -153,7 +151,7 @@ def about(): ...@@ -153,7 +151,7 @@ def about():
\n @@ @@@ @@@@@@@@@# @@@@ @@(\ \n @@ @@@ @@@@@@@@@# @@@@ @@(\
\n @@ @@@@ @@@@@@@@@ @@@ @@ Built in Python for Duniter’s currencies: Ğ1 and Ğ1-Test\ \n @@ @@@@ @@@@@@@@@ @@@ @@ Built in Python for Duniter’s currencies: Ğ1 and Ğ1-Test\
\n @@ @@@ @@@@@@@@ @ @@@ @@\ \n @@ @@@ @@@@@@@@ @ @@@ @@\
\n @@ @@@ @@@@@@ @@@@ @@ @@ Authors: Moul, Tortue, Jytou\ \n @@ @@@ @@@@@@ @@@@ @@ @@ Authors: moul, tortue, jytou, cebash, cgeek\
\n @@ @@@@ @@@ @@@@@@@ @@ @@\ \n @@ @@@@ @@@ @@@@@@@ @@ @@\
\n @@ @@@@* @@@@@@@@@ @# @@ Website: https://silkaj.duniter.org\ \n @@ @@@@* @@@@@@@@@ @# @@ Website: https://silkaj.duniter.org\
\n @@ @@@@@ @@@@@@@@@@ @ ,@@\ \n @@ @@@@@ @@@@@@@@@@ @ ,@@\
...@@ -164,8 +162,3 @@ def about(): ...@@ -164,8 +162,3 @@ def about():
\n @@@@@@@@@@@@@@@\n") \n @@@@@@@@@@@@@@@\n")
if __name__ == '__main__':
ep, cli_args = cli()
check_port(ep["port"])
best_node(ep, 1)
manage_cmd(ep, cli_args)
...@@ -3,7 +3,7 @@ from nacl import encoding, signing, hash, bindings ...@@ -3,7 +3,7 @@ from nacl import encoding, signing, hash, bindings
from re import compile, search from re import compile, search
from sys import exit from sys import exit
from constants import G1_SYMBOL, GTEST_SYMBOL from silkaj.constants import G1_SYMBOL, GTEST_SYMBOL
def convert_time(timestamp, kind): def convert_time(timestamp, kind):
......
...@@ -4,13 +4,13 @@ from time import sleep ...@@ -4,13 +4,13 @@ from time import sleep
import urllib import urllib
from tabulate import tabulate from tabulate import tabulate
from network_tools import get_request, post_request, get_current_block from silkaj.network_tools import get_request, post_request, get_current_block
from tools import get_currency_symbol, get_publickey_from_seed, sign_document_from_seed,\ from silkaj.tools import get_currency_symbol, get_publickey_from_seed, sign_document_from_seed,\
check_public_key, message_exit check_public_key, message_exit
from auth import auth_method from silkaj.auth import auth_method
from wot import get_uid_from_pubkey from silkaj.wot import get_uid_from_pubkey
from money import get_last_ud_value, get_amount_from_pubkey from silkaj.money import get_last_ud_value, get_amount_from_pubkey
from constants import NO_MATCHING_ID from silkaj.constants import NO_MATCHING_ID
def send_transaction(ep, cli_args): def send_transaction(ep, cli_args):
......
...@@ -3,9 +3,9 @@ from time import time ...@@ -3,9 +3,9 @@ from time import time
from tabulate import tabulate from tabulate import tabulate
from collections import OrderedDict from collections import OrderedDict
from network_tools import get_request from silkaj.network_tools import get_request
from tools import message_exit, check_public_key, convert_time from silkaj.tools import message_exit, check_public_key, convert_time
from constants import NO_MATCHING_ID from silkaj.constants import NO_MATCHING_ID
def get_sent_certifications(certs, time_first_block, params): def get_sent_certifications(certs, time_first_block, params):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment