WIP add entrypoint
This commit is contained in:
parent
46b109b088
commit
d24b1666b2
4
CHANGELOG
Normal file
4
CHANGELOG
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
- 0.0.2
|
||||||
|
* Add executable entry point in package install
|
||||||
|
- 0.0.1
|
||||||
|
* Token creation setup for eth
|
@ -25,6 +25,8 @@ def validate_args(args):
|
|||||||
|
|
||||||
|
|
||||||
def execute(config, eargs):
|
def execute(config, eargs):
|
||||||
|
logg.info('initializing in {}'.format(eargs.directory))
|
||||||
|
|
||||||
os.makedirs(eargs.directory)
|
os.makedirs(eargs.directory)
|
||||||
|
|
||||||
ct = Token(eargs.directory, name=eargs.name, symbol=eargs.symbol, precision=eargs.precision)
|
ct = Token(eargs.directory, name=eargs.name, symbol=eargs.symbol, precision=eargs.precision)
|
||||||
|
@ -39,6 +39,7 @@ args = argparser.parse_args(sys.argv[1:])
|
|||||||
|
|
||||||
if args.command == None:
|
if args.command == None:
|
||||||
logg.critical('Subcommand missing')
|
logg.critical('Subcommand missing')
|
||||||
|
sys.stderr.write("\033[;91m" + 'subcommand missing' + "\033[;39m\n")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
modname = 'cic.cmd.{}'.format(args.command)
|
modname = 'cic.cmd.{}'.format(args.command)
|
||||||
@ -51,11 +52,12 @@ extra_args = {
|
|||||||
config = chainlib.cli.Config.from_args(args, arg_flags=arg_flags, base_config_dir=base_config_dir, extra_args=extra_args)
|
config = chainlib.cli.Config.from_args(args, arg_flags=arg_flags, base_config_dir=base_config_dir, extra_args=extra_args)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
#try:
|
try:
|
||||||
cmd_mod.execute(config, args)
|
cmd_mod.execute(config, args)
|
||||||
#except ValueError as e:
|
except Exception as e:
|
||||||
# logg.error('{}'.format(e))
|
logg.exception(e) #'{}'.format(e))
|
||||||
# sys.exit(1)
|
sys.stderr.write("\033[;91m" + str(e) + "\033[;39m\n")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = cic
|
name = cic
|
||||||
version = 0.0.1
|
version = 0.0.2
|
||||||
description = Generic cli tooling for the CIC token network
|
description = Generic cli tooling for the CIC token network
|
||||||
author = Louis Holbrook
|
author = Louis Holbrook
|
||||||
author_email = dev@holbrook.no
|
author_email = dev@holbrook.no
|
||||||
url = https://gitlab.com/chaintools/chainlib
|
url = https://git.grassecon.net/cic-cli.git
|
||||||
keywords =
|
keywords =
|
||||||
dlt
|
dlt
|
||||||
blockchain
|
blockchain
|
||||||
|
Loading…
Reference in New Issue
Block a user