meshcore-cli 0.3.2__tar.gz → 0.3.4__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: 0.3.2
3
+ Version: 0.3.4
4
4
  Summary: Command line interface to meshcore companion radios
5
5
  Project-URL: Homepage, https://github.com/fdlamotte/meshcore-cli
6
6
  Project-URL: Issues, https://github.com/fdlamotte/meshcore-cli/issues
@@ -35,6 +35,8 @@ If you want meshcore-cli to remember last BLE device, you should have some `$HOM
35
35
  $ meshcli <args> <commands>
36
36
  </pre>
37
37
 
38
+ If using BLE, don't forget to pair your device first (using `bluetoothctl` for instance on Linux) or meshcli won't be able to communicate.
39
+
38
40
  ### Arguments
39
41
 
40
42
  Arguments mostly deals with ble connection
@@ -20,6 +20,8 @@ If you want meshcore-cli to remember last BLE device, you should have some `$HOM
20
20
  $ meshcli &lt;args&gt; &lt;commands&gt;
21
21
  </pre>
22
22
 
23
+ If using BLE, don't forget to pair your device first (using `bluetoothctl` for instance on Linux) or meshcli won't be able to communicate.
24
+
23
25
  ### Arguments
24
26
 
25
27
  Arguments mostly deals with ble connection
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "meshcore-cli"
7
- version = "0.3.2"
7
+ version = "0.3.4"
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>=0.3.2" ]
20
+ dependencies = [ "meshcore >= 0.3.2" ]
21
21
 
22
22
  [project.urls]
23
23
  Homepage = "https://github.com/fdlamotte/meshcore-cli"
@@ -96,7 +96,7 @@ async def next_cmd(mc, cmds):
96
96
  cmds[2]))
97
97
  case "chan_msg"|"ch" :
98
98
  argnum = 2
99
- print(await mc.send_chan_msg(cmds[1], cmds[2]))
99
+ print(await mc.send_chan_msg(int(cmds[1]), cmds[2]))
100
100
  case "def_chan_msg"|"def_chan"|"dch" : # default chan
101
101
  argnum = 1
102
102
  print(await mc.send_chan_msg(0, cmds[1]))
@@ -171,10 +171,15 @@ async def next_cmd(mc, cmds):
171
171
  case "sleep" | "s" :
172
172
  argnum = 1
173
173
  await asyncio.sleep(int(cmds[1]))
174
- case "cli" :
174
+ case "cli" | "@" :
175
175
  argnum = 1
176
176
  print (await mc.send_cli(cmds[1]))
177
-
177
+ case _ :
178
+ if cmds[0][0] == "@" :
179
+ print (await mc.send_cli(cmds[0][1:]))
180
+ else :
181
+ printerr (f"Unknown command : {cmds[0]}")
182
+
178
183
  printerr (f"cmd {cmds[0:argnum+1]} processed ...")
179
184
  return cmds[argnum+1:]
180
185
 
@@ -1 +0,0 @@
1
- from meshcore_cli import cli; cli()
File without changes
File without changes