NomadNet/nomadnet/nomadnet.py

38 lines
1.1 KiB
Python
Raw Normal View History

2021-03-27 05:58:13 -04:00
#!/usr/bin/env python3
2021-04-08 14:57:31 -04:00
from ._version import __version__
import argparse
2021-04-08 14:57:31 -04:00
import nomadnet
def program_setup(configdir, rnsconfigdir):
2021-04-08 14:57:31 -04:00
app = nomadnet.NomadNetworkApp(configdir = configdir, rnsconfigdir = rnsconfigdir)
2021-03-27 05:58:13 -04:00
def main():
try:
parser = argparse.ArgumentParser(description="Nomad Network Client")
parser.add_argument("--config", action="store", default=None, help="path to alternative Nomad Network config directory", type=str)
parser.add_argument("--rnsconfig", action="store", default=None, help="path to alternative Reticulum config directory", type=str)
parser.add_argument("--version", action="version", version="Nomad Network Client {version}".format(version=__version__))
args = parser.parse_args()
if args.config:
configarg = args.config
else:
configarg = None
if args.rnsconfig:
rnsconfigarg = args.rnsconfig
else:
rnsconfigarg = None
program_setup(configarg, rnsconfigarg)
except KeyboardInterrupt:
print("")
exit()
2021-03-27 05:58:13 -04:00
if __name__ == "__main__":
main()