Generate crossing-free subprojects for HomLab project JSON files.
Project description
HomLab.Gen
HomLab.Gen 用于读取 HomLab 项目 JSON,消除图中的交叉点,并生成所有可能的无交叉子图。
安装
开发安装:
python -m pip install -e .
构建发布包:
python -m pip install build
python -m build
构建产物会输出到 dist/。
命令行使用
安装后可以使用 homlab-gen:
homlab-gen path/to/project.json
默认输出:
sub_diagram/:所有生成的子项目 JSON。erase.json:删除原交叉边并插入角点后的中间文件。progress.txt:生成进度。error.log:错误日志。
也可以显式指定这些路径:
homlab-gen path/to/project.json path/to/error.log --tmp path/to/erase.json --progress path/to/progress.txt
只清理旧的 sub_diagram/ 目录:
homlab-gen path/to/project.json --erase-only
兼容旧参数名:
homlab-gen path/to/project.json --dryrun
Python API
from homlab_gen import generate_subprojects
exit_code = generate_subprojects("path/to/project.json")
exit_code 为 0 表示成功,为 1 表示失败。失败原因会写入错误日志。
文档
更多细节放在 docs/:
开发检查
python -m unittest
python -m build
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
homlab_gen-0.1.3.tar.gz
(12.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file homlab_gen-0.1.3.tar.gz.
File metadata
- Download URL: homlab_gen-0.1.3.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.11.15 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed78718e84231550d67fe6df1c180716c8aeec47bb854c65a42f42843d5ee7be
|
|
| MD5 |
010c443884284c0c854272a0d7deb97e
|
|
| BLAKE2b-256 |
63e1616d1630099cf16303935c2ff1c6e02a9f89b0c80e796e36006368de8319
|
File details
Details for the file homlab_gen-0.1.3-py3-none-any.whl.
File metadata
- Download URL: homlab_gen-0.1.3-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.11.15 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8189bbbd097e6a62447108b4c34466215a67914362af6f97206aa7453933d57a
|
|
| MD5 |
c6885aac5c3283be9f8cdc4eb9fae951
|
|
| BLAKE2b-256 |
aca94a5845520aa4138c99e95e5290fe0dadfe2194de7e60e6785553004abacc
|