An adafruit-ampy batch tool
Project description
AMPY Batch Tool
项目介绍
AMPY Batch Tool 简称ab
,可以批量将项目中指定的文件夹或文件上传到MicroPython
开发板
如何安装
在线安装(推荐)
# 安装
$ pip install ampy-batch-tool
# 更新
$ pip install --upgrade ampy-batch-tool
离线安装
首先克隆或下载项目源文件压缩包并解压缩,然后进入项目文件夹运行命令
$ python setup.py install
如何上传文件
-
在你的项目文件夹下新建
abconfig
文件(ab
工具默认查找该配置文件,也可以手动指定其它文件) -
配置文件中填写需要上传的文件夹或文件,每行一个,以
#
号开头的行表示需要排除的文件夹或文件,例如:drivers/ services/ main.py not_exists/ # services/websocket.py # .git/
-
在需要上传项目文件的时候执行如下命令即可
$ ab
-
如果找不到或者未手动指定配置文件,则显示使用说明
-
完整输出内容
Port List: [1] COM8 - Silicon Labs CP210x USB to UART Bridge (COM8) [2] COM1 - 通信端口 (COM1) Choose a port: 1 File List (3): - drivers/button.py - services/mqtt.py - main.py Dir List (3) - drivers - drivers/others - services Not Found List (1) - not_exists Making dirs on board... - drivers exist - drivers/others exist - services exist Upload files to board... - uploading drivers/button.py (1/3) - uploading services/mqtt.py (2/3) - uploading main.py (3/3) Upload Finished
如何打开repl
$ ab --repl
Port List:
[1] COM3 - Silicon Labs CP210x USB to UART Bridge (COM3)
[2] COM1 - 通信端口 (COM1)
Choose a port: 1
--- Miniterm for MicroPython REPL
Quit: CTRL + ] | Info: CTRL + L | Help: CTRL + O
>>> help()
Welcome to MicroPython on the ESP32!
For generic online docs please visit http://docs.micropython.org/
>>>
参数说明
-h
:显示使用说明-m
:使用minify
工具压缩代码(功能未实现)-q
:屏蔽操作过程中的相关提示-s
:模拟操作过程,不实际上传文件--repl
:进入repl
模式--readme
:在网页中显示使用说明
已知问题
-
调用ampy
工具新建文件夹的时候如果文件夹已存在,则会抛出异常且无法捕捉 -
偶尔出现无法进入
raw_repl
模式的问题,重新运行一次即可解决
更新记录
-
v0.4
:增加进入repl
模式菜单和相关功能 -
v0.3.2
:修复由于v0.3.1
导致的分隔路径错误问题 -
v0.3.1
:修复上传文件时字符转义的问题 -
v0.3
:- 重构了获取所有文件和文件夹列表功能
- 增加了显示网页版使用说明的参数
enter_raw_repl()
中增加延时,尝试解决已知问题2
-
v0.2.2
:修复某些开发板不能读取串口数据的问题(如安信可 ESP32C3 系列开发板
) -
v0.2.1
:修复导入模块路径问题 -
v0.2
:- 使用 pyboard.py 替代
ampy
以提升文件上传效率,并解决已知问题 1
- 禁用了代码压缩功能,使用 pyminifier 压缩代码会出现问题
- 删除指定临时目录参数
- 使用 pyboard.py 替代
-
v0.1.1
:尝试上传到 PyPI -
v0.1
:完成基本功能
合作交流
- 联系邮箱:walkline@163.com
- QQ 交流群:
- 走线物联:163271910
- 扇贝物联:31324057
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ampy-batch-tool-0.4.tar.gz
(20.6 kB
view hashes)
Built Distribution
Close
Hashes for ampy_batch_tool-0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ab532c89c3eac35a79028d746184e27192bba2a137f4ddc5b80b4ebb3a75a87 |
|
MD5 | 5d219854526b12b6cab875ccdb86c58f |
|
BLAKE2b-256 | b9a3fe5bb17784ff2816df3da7bc14fae944b277c2602205df53511cadbea89a |