CLI2WebUI
将命令行工具转换为Web界面的工具。
安装
pip install cli2webui
使用方法
基本用法:
cli2webui <command>
例如:
cli2webui ls # 将ls命令转换为web界面
cli2webui --port 5600 ls # 在指定端口运行
cli2webui --host 0.0.0.0 --port 8080 ls # 指定主机和端口
支持的参数:
--port: 指定web服务器端口(默认:5000)--host: 指定web服务器主机(默认:localhost)
功能特点
- 自动解析命令行工具的帮助信息
- 生成交互式Web界面
- 实时显示命令执行输出
- 支持自定义端口和主机
- 支持大多数常见的命令行工具
工作原理
CLI2WebUI 通过以下步骤工作:
- 解析命令行工具的帮助信息
- 生成对应的Web表单界面
- 启动本地Web服务器
- 执行用户通过Web界面提交的命令
- 实时显示命令执行结果
开发
要参与开发,请按以下步骤操作:
# 克隆仓库
git clone https://github.com/wangmaobin/cli2webui.git
# 安装开发依赖
cd cli2webui
pip install -e .
# 运行测试
python -m pytest
许可证
MIT License
作者
Wang Maobin (wangmaobin@iscas.ac.cn)
贡献
欢迎提交 Issue 和 Pull Request!
更新日志
v0.2.0
- 支持自定义端口和主机
- 改进了命令行参数处理
- 优化了web界面响应性
- 添加了更多命令行工具支持
v0.1.0
- 初始版本发布
- 基本的命令行转Web功能
- 支持实时输出显示
Metadata
Release files for cli2webui 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cli2webui-0.2.1.tar.gz | 17.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cli2webui-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.5 kB
Release files / cli2webui-0.2.1.tar.gz
| Download URL | cli2webui-0.2.1.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e01863559838cce646556673f20c5028d776f1cf29968712704c1b02bc5f0713
|
|
BLAKE2b-256 checksum How to use checksums |
1116bd1318503dab99395b106fa9cfea0f8e9a90c9e21d7236f100f398f401f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / cli2webui-0.2.1-py3-none-any.whl
| Download URL | cli2webui-0.2.1-py3-none-any.whl |
|---|---|
| Size | 17.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e30296b9468f562f0911472139eb129adb6de756871fe7c0a21e792dca33b190
|
|
BLAKE2b-256 checksum How to use checksums |
b07f72184cf4c50ea6cf251aeec70dc13c00db43065ef17e288299879ab2463e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|