zt-oawf-cli
ZT OAWF(oawf.ztn.cn)命令行工具:登录缓存 Cookie,查询流程列表。
环境要求
- Python
>=3.10 - 可用浏览器(首次登录会打开)
安装
开发安装(源码)
pip install -e ".[dev]"
python -m playwright install chromium
打包发布
python -m pip install --upgrade build twine
python -m build
twine upload dist/*
快速开始
1) 登录并缓存 Cookie
推荐有头登录(SSO / 验证码更稳):
zt-oawf-cli login --headed
已设置 SSO 环境变量时也可无头:
zt-oawf-cli login
登录成功后 Cookie 写入 ~/.zt-oawf-cli/cookies.json(需含 JSESSIONID、OaToken)。
2) 查询流程列表
对应 kmReviewIndex.do?method=list:
# 全部
zt-oawf-cli wf list
zt-oawf-cli -o human wf list
# 待我审批
zt-oawf-cli wf approval
zt-oawf-cli -o human wf approval
# 我发起的
zt-oawf-cli wf created
zt-oawf-cli -o human wf created
# 我已审核
zt-oawf-cli wf approved
zt-oawf-cli -o human wf approved
# 流程详情(fdId)
zt-oawf-cli wf detail 1a1f8e767ae0b5854254ddb42acb763d
zt-oawf-cli -o human wf detail 1a1f8e767ae0b5854254ddb42acb763d
3) 脚手架占位
zt-oawf-cli wf ping
全局参数
-o, --output:json(默认)/human--version:查看版本
配置说明
默认配置目录:~/.zt-oawf-cli
- Cookie 缓存:
~/.zt-oawf-cli/cookies.json - 配置文件:
~/.zt-oawf-cli/config.yaml
可选:
browser_channel: chromium
环境变量(可选)
ZT_SSO_USERNAMEZT_SSO_PASSWORD
未设置时请执行 zt-oawf-cli login --headed。
命令一览
zt-oawf-cli login [--headed]zt-oawf-cli wf list [--mydoc] [--path] [--orderby] [--ordertype]— 全部zt-oawf-cli wf approval— 待我审批zt-oawf-cli wf created— 我发起的zt-oawf-cli wf approved— 我已审核zt-oawf-cli wf detail <fdId>— 流程详情zt-oawf-cli wf ping
Metadata
Release files for zt-oawf-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zt_oawf_cli-0.1.0.tar.gz | 13.4 kB | Without provenance | Details for zt_oawf_cli-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zt_oawf_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for zt_oawf_cli-0.1.0-py3-none-any.whl |
Total release size: 26.8 kB
Release files / zt_oawf_cli-0.1.0.tar.gz
| Download URL | zt_oawf_cli-0.1.0.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
987beb740e6839986be92f033704ec39e1c949b0a697b812a2c2aac3db2de2ec
|
|
BLAKE2b-256 checksum How to use checksums |
b1a6dd68f6faa6883260ae2eb4b92ddea1cb4c57e7b6f50a30569d9a60d1e555
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / zt_oawf_cli-0.1.0-py3-none-any.whl
| Download URL | zt_oawf_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9048cf89aa321239e39b7898e1cf3354bb5bb518f1c019dcf0c6913f59d2c638
|
|
BLAKE2b-256 checksum How to use checksums |
2ff5dc673b7a0024c5488f2e76697e9ee5b526f0003c082b0cdbb845bd4b068a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for zt-oawf-cli 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.