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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshcore-cli
3
- Version: 1.5.6
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.6
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
@@ -22,7 +22,7 @@
22
22
 
23
23
  src = python3Packages.fetchPypi {
24
24
  inherit pname version;
25
- sha256 = "sha256-EUK0iFaCN2tpOL3XL2ejVLGz/gLTdvzPpvgBxETLL3w=";
25
+ sha256 = "sha256-l9/wDgRfzPSZGIt+tIUITs/mf/AeEIMDN9DXAbMSzSs=";
26
26
  };
27
27
 
28
28
  build-system = [ python3Packages.hatchling ];
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "meshcore-cli"
7
- version = "1.5.6"
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.6",
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.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
- filename = cmds[1]
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