meshcore-cli 1.5.6__tar.gz → 1.5.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {meshcore_cli-1.5.6 → meshcore_cli-1.5.7}/PKG-INFO +2 -2
- {meshcore_cli-1.5.6 → meshcore_cli-1.5.7}/flake.nix +1 -1
- {meshcore_cli-1.5.6 → meshcore_cli-1.5.7}/pyproject.toml +2 -2
- {meshcore_cli-1.5.6 → meshcore_cli-1.5.7}/src/meshcore_cli/meshcore_cli.py +15 -3
- {meshcore_cli-1.5.6 → meshcore_cli-1.5.7}/.gitignore +0 -0
- {meshcore_cli-1.5.6 → meshcore_cli-1.5.7}/LICENSE +0 -0
- {meshcore_cli-1.5.6 → meshcore_cli-1.5.7}/README.md +0 -0
- {meshcore_cli-1.5.6 → meshcore_cli-1.5.7}/REPEATER_COMMANDS.md +0 -0
- {meshcore_cli-1.5.6 → meshcore_cli-1.5.7}/flake.lock +0 -0
- {meshcore_cli-1.5.6 → meshcore_cli-1.5.7}/src/meshcore_cli/__init__.py +0 -0
- {meshcore_cli-1.5.6 → meshcore_cli-1.5.7}/src/meshcore_cli/__main__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshcore-cli
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.7
|
|
4
4
|
Summary: Command line interface to meshcore companion radios and repeaters
|
|
5
5
|
Project-URL: Homepage, https://github.com/fdlamotte/meshcore-cli
|
|
6
6
|
Project-URL: Issues, https://github.com/fdlamotte/meshcore-cli/issues
|
|
@@ -11,7 +11,7 @@ Classifier: Operating System :: OS Independent
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Requires-Python: >=3.10
|
|
13
13
|
Requires-Dist: bleak>=0.22
|
|
14
|
-
Requires-Dist: meshcore>=2.3.
|
|
14
|
+
Requires-Dist: meshcore>=2.3.7
|
|
15
15
|
Requires-Dist: prompt-toolkit>=3.0.50
|
|
16
16
|
Requires-Dist: requests>=2.28.0
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "meshcore-cli"
|
|
7
|
-
version = "1.5.
|
|
7
|
+
version = "1.5.7"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
|
10
10
|
]
|
|
@@ -17,7 +17,7 @@ classifiers = [
|
|
|
17
17
|
]
|
|
18
18
|
license = "MIT"
|
|
19
19
|
license-files = ["LICEN[CS]E*"]
|
|
20
|
-
dependencies = [ "meshcore >= 2.3.
|
|
20
|
+
dependencies = [ "meshcore >= 2.3.7",
|
|
21
21
|
"bleak >= 0.22",
|
|
22
22
|
"prompt_toolkit >= 3.0.50",
|
|
23
23
|
"requests >= 2.28.0" ]
|
|
@@ -35,7 +35,7 @@ import re
|
|
|
35
35
|
from meshcore import MeshCore, EventType, logger
|
|
36
36
|
|
|
37
37
|
# Version
|
|
38
|
-
VERSION = "v1.5.
|
|
38
|
+
VERSION = "v1.5.7"
|
|
39
39
|
|
|
40
40
|
# default ble address is stored in a config file
|
|
41
41
|
MCCLI_CONFIG_DIR = str(Path.home()) + "/.config/meshcore/"
|
|
@@ -586,6 +586,7 @@ def make_completion_dict(contacts, pending={}, to=None, channels=None):
|
|
|
586
586
|
"max_flood_attempts" : None,
|
|
587
587
|
"flood_after" : None,
|
|
588
588
|
"path_hash_mode": None,
|
|
589
|
+
"default_scope": None,
|
|
589
590
|
},
|
|
590
591
|
"get" : {"name":None,
|
|
591
592
|
"bat":None,
|
|
@@ -627,6 +628,7 @@ def make_completion_dict(contacts, pending={}, to=None, channels=None):
|
|
|
627
628
|
"stats_packets":None,
|
|
628
629
|
"allowed_repeat_freq":None,
|
|
629
630
|
"path_hash_mode":None,
|
|
631
|
+
"default_scope":None,
|
|
630
632
|
},
|
|
631
633
|
"?get":None,
|
|
632
634
|
"?set":None,
|
|
@@ -2243,7 +2245,12 @@ async def next_cmd(mc, cmds, json_output=False):
|
|
|
2243
2245
|
print(f"Error : {res}")
|
|
2244
2246
|
else:
|
|
2245
2247
|
print(f"Policy for adv_loc: {policy}")
|
|
2246
|
-
|
|
2248
|
+
case "default_scope":
|
|
2249
|
+
res = await mc.commands.set_default_flood_scope(cmds[2])
|
|
2250
|
+
if res.type == EventType.ERROR:
|
|
2251
|
+
print(f"Error : {res}")
|
|
2252
|
+
else:
|
|
2253
|
+
print("Default scope set")
|
|
2247
2254
|
case _: # custom var
|
|
2248
2255
|
if cmds[1].startswith("_") :
|
|
2249
2256
|
vname = cmds[1][1:]
|
|
@@ -2534,6 +2541,9 @@ async def next_cmd(mc, cmds, json_output=False):
|
|
|
2534
2541
|
case "allowed_repeat_freq" :
|
|
2535
2542
|
res = await mc.commands.get_allowed_repeat_freq()
|
|
2536
2543
|
print(json.dumps(res.payload))
|
|
2544
|
+
case "default_scope" :
|
|
2545
|
+
res = await mc.commands.get_default_flood_scope()
|
|
2546
|
+
print(json.dumps(res.payload))
|
|
2537
2547
|
case _ :
|
|
2538
2548
|
res = await mc.commands.get_custom_vars()
|
|
2539
2549
|
logger.debug(res)
|
|
@@ -3606,7 +3616,7 @@ async def next_cmd(mc, cmds, json_output=False):
|
|
|
3606
3616
|
case "script" :
|
|
3607
3617
|
if len(cmds) > 1:
|
|
3608
3618
|
argnum = 1
|
|
3609
|
-
|
|
3619
|
+
file_name = cmds[1]
|
|
3610
3620
|
else:
|
|
3611
3621
|
file_name = await prompt_for_file()
|
|
3612
3622
|
if not file_name is None:
|
|
@@ -3875,6 +3885,8 @@ Managing Flood Scope in interactive mode
|
|
|
3875
3885
|
When entering chat mode, scope will be reset to *, meaning classic flood.
|
|
3876
3886
|
You can switch scope using the scope command, or postfixing the to command with %<scope>.
|
|
3877
3887
|
Scope can also be applied to a command using % before the scope name. For instance login%#Morbihan will limit diffusion of the login command (which is usually sent flood to get the path to a repeater) to the #Morbihan region.
|
|
3888
|
+
|
|
3889
|
+
default_scope for the device can be set/get by using set default_scope and get default_scope, if set, the scope will revert to this default.
|
|
3878
3890
|
""")
|
|
3879
3891
|
|
|
3880
3892
|
elif cmdname == "contact_info":
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|