Skip to main content

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

Metadata

Release files for homlab-gen 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for homlab-gen 0.1.4
File Size Uploaded
homlab_gen-0.1.4.tar.gz 12.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for homlab-gen 0.1.4
File Interpreter ABI Platform
homlab_gen-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 22.3 kB

Release files / homlab_gen-0.1.4.tar.gz

Download URL homlab_gen-0.1.4.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b5ac76365dc6f121bdc51b68fbcac7ae785580a0780d7b930c1dce54781a00f4
BLAKE2b-256 checksum
How to use checksums
602493cb04fdd86d973216de5482459d80784b3aa4e7ad765b7fe50cb700beda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.11.15 Windows/10

Release files / homlab_gen-0.1.4-py3-none-any.whl

Download URL homlab_gen-0.1.4-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59298bbf977c00bec4b8072326587e15c3cf5122dbe773742012ecc42bed7cc4
BLAKE2b-256 checksum
How to use checksums
ab32b28f32ac3692eea0c438be59137b30676e4bae6c9cf45b1919836a09b340
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.11.15 Windows/10

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page