8000 Document new feature and bump version · arduino/micropython.js@9951a18 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9951a18

Browse files
committed
Document new feature and bump version
1 parent 754ad86 commit 9951a18

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

CLI.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* `--listports`: List available USB ports
88
* `--port /dev/tty`: Specify which port to connect. Required for the options below.
99
* `--listfiles`: List files in the board
10+
* `--ilistfiles`: Same as `--listfiles` but with additional information (size, inodes, folder/file, etc...)
1011
* `--executestring "print('watch out for string escaping')”`: Evaluate string
1112
* `--executefile filename.py`: Run file from the disk
1213
* `--putfile fileA.py fileB.py`: Upload `fileA.py` from the disk to board renaming it to `fileB.py`
@@ -49,6 +50,33 @@ files at "/" [
4950
]
5051
```
5152

53+
### Listing files and folders in the board
54+
55+
AS explained on the [documentation](https://docs.micropython.org/en/v1.9.2/pyboard/library/uos.html#uos.ilistdir), the second element on the array is the file type:
56+
57+
> 0x4000 for directories and 0x8000 for regular files
58+
59+
```
60+
$ node cli.js --verbose --port /dev/ttyACM0 --ilistfiles
61+
VERBOSE
62+
executing command:
63+
command --ilistfiles
64+
arguments []
65+
port /dev/ttyACM0
66+
files at "/" [
67+
[ 'boot.py', 32768, 0, 1714 ],
68+
[ '.fseventsd', 16384, 0, 0 ],
69+
[ 'testy.py', 32768, 0, 78 ],
70+
[ 'file.py', 32768, 0, 929 ],
71+
[ 'yolo', 16384, 0, 0 ],
72+
[ 'lib', 16384, 0, 0 ],
73+
[ '.Trashes', 16384, 0, 0 ],
74+
[ 'otroteste.py', 32768, 0, 929 ],
75+
[ 'turing_machine.py', 32768, 0, 929 ]
76+
]
77+
command executed --ilistfiles
78+
```
79+
5280
### Evaluating a string
5381

5482
```
@@ -207,5 +235,5 @@ port /dev/ttyACM0
207235
98%
208236
99%
209237
undefined
210-
command executed --putfile
238+
command executed --putfile
211239
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "micropython.js",
3-
"version": "1.2.2",
3+
"version": "1.3.0",
44
"description": "Interpretation of pyboard.py in javascript",
55
"main": "micropython.js",
66
"scripts": {

0 commit comments

Comments
 (0)
0