meshcore-cli 1.5.3__tar.gz → 1.5.5__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.3
3
+ Version: 1.5.5
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.2
14
+ Requires-Dist: meshcore>=2.3.5
15
15
  Requires-Dist: prompt-toolkit>=3.0.50
16
16
  Requires-Dist: requests>=2.28.0
17
17
  Description-Content-Type: text/markdown
@@ -17,12 +17,12 @@
17
17
 
18
18
  meshcore = python3Packages.buildPythonPackage rec {
19
19
  pname = "meshcore";
20
- version = "2.3.2";
20
+ version = "2.3.5";
21
21
  pyproject = true;
22
22
 
23
23
  src = python3Packages.fetchPypi {
24
24
  inherit pname version;
25
- sha256 = "sha256-mM64woqKvltbd/CUGzD5m6PU/CNQ923pm2yKTneNrW8=";
25
+ sha256 = "sha256-EUK0iFaCN2tpOL3XL2ejVLGz/gLTdvzPpvgBxETLL3w=";
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.3"
7
+ version = "1.5.5"
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.2",
20
+ dependencies = [ "meshcore >= 2.3.5",
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.3"
38
+ VERSION = "v1.5.5"
39
39
 
40
40
  # default ble address is stored in a config file
41
41
  MCCLI_CONFIG_DIR = str(Path.home()) + "/.config/meshcore/"
@@ -1215,6 +1215,19 @@ async def process_contact_chat_line(mc, contact, line):
1215
1215
  print("")
1216
1216
  return True
1217
1217
 
1218
+ if line.startswith("contact_lastmod"):
1219
+ timestamp = contact["lastmod"]
1220
+ print(f"{contact['adv_name']} updated"
1221
+ f" {datetime.datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d at %H:%M:%S')}"
1222
+ f" ({timestamp})", end="")
1223
+ if " " in line:
1224
+ print(" ", end="", flush=True)
1225
+ secline = line.split(" ", 1)[1]
1226
+ await process_contact_chat_line(mc,contact, secline)
1227
+ else:
1228
+ print("")
1229
+ return True
1230
+
1218
1231
  if line.startswith("path") :
1219
1232
  if contact['out_path_len'] == -1:
1220
1233
  print("Flood", end="")
@@ -1259,13 +1272,6 @@ async def process_contact_chat_line(mc, contact, line):
1259
1272
 
1260
1273
  return True
1261
1274
 
1262
- if line == "contact_lastmod":
1263
- timestamp = contact["lastmod"]
1264
- print(f"{contact['adv_name']} updated"
1265
- f" {datetime.datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d at %H:%M:%S')}"
1266
- f" ({timestamp})")
1267
- return True
1268
-
1269
1275
  # commands that take contact as second arg will be sent to recipient
1270
1276
  # and can be chained ...
1271
1277
  if line.startswith("sc") or line.startswith("share_contact") or\
@@ -2608,7 +2614,7 @@ async def next_cmd(mc, cmds, json_output=False):
2608
2614
  elif len(cmds[2]) != 32:
2609
2615
  res = None
2610
2616
  else:
2611
- res = await set_channel(mc, "", cmds[1], bytes.fromhex(cmds[3]))
2617
+ res = await set_channel(mc, "", cmds[1], bytes.fromhex(cmds[2]))
2612
2618
  if res is None:
2613
2619
  print("Error adding channel")
2614
2620
 
File without changes
File without changes
File without changes
File without changes