mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
chat mode by default
This commit is contained in:
parent
b0b2841399
commit
6a3ea32c95
3 changed files with 10 additions and 8 deletions
|
|
@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||
|
||||
[project]
|
||||
name = "meshcore-cli"
|
||||
version = "0.5.11"
|
||||
version = "0.5.12"
|
||||
authors = [
|
||||
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
if __name__ == "__main__":
|
||||
from meshcore_cli.meshcore_cli import cli
|
||||
from meshcore_cli.meshcore_cli import cli
|
||||
cli()
|
||||
|
|
|
|||
|
|
@ -929,7 +929,7 @@ async def main(argv):
|
|||
with open(MCCLI_ADDRESS, encoding="utf-8") as f :
|
||||
address = f.readline().strip()
|
||||
|
||||
opts, args = getopt.getopt(argv, "a:d:s:ht:p:b:jD")
|
||||
opts, args = getopt.getopt(argv, "a:d:s:ht:p:b:jDh")
|
||||
for opt, arg in opts :
|
||||
match opt:
|
||||
case "-d" : # name specified on cmdline
|
||||
|
|
@ -948,10 +948,9 @@ async def main(argv):
|
|||
json_output=True
|
||||
case "-D" :
|
||||
debug=True
|
||||
|
||||
if len(args) == 0 : # no args, no action
|
||||
usage()
|
||||
return
|
||||
case "-h" :
|
||||
usage()
|
||||
return
|
||||
|
||||
if (debug==True):
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
|
@ -984,7 +983,10 @@ async def main(argv):
|
|||
if (json_output) :
|
||||
logger.setLevel(logging.ERROR)
|
||||
|
||||
await process_cmds(MC, args, json_output)
|
||||
if len(args) == 0 : # no args, run in chat mode
|
||||
await process_cmds(MC, "chat", json_output)
|
||||
else:
|
||||
await process_cmds(MC, args, json_output)
|
||||
|
||||
def cli():
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue