apidoc2
一个用于从Java项目中批量提取ApiDoc注解并生成API文档的Python工具,支持多版本对比和自动生成apidoc文档。
## 功能简介
- 支持从指定Git仓库克隆Java项目,提取所有Java文件中的ApiDoc注解
- 支持多版本API文档对比,输出差异统计
- 自动生成apidoc格式文档,便于前端/后端协作
- 支持命令行参数自定义仓库、版本、输出文件名等
## 安装方法
推荐使用pip安装(需先打包上传到PyPI):
```bash
pip install extract-apidoc
```
或本地安装:
```bash
git clone <your_repo_url>
cd extract_apidoc
pip install .
```
## 使用说明
### 基本用法
```bash
python3 extract_apidoc.py -r <git仓库地址> -v1 <当前版本号> [-v2 <对比版本号>] [-o <输出文件名>]
```
### 参数说明
- `-r, --repourl`:Git仓库地址(必填)
- `-v1, --version1`:当前版本号或分支名(必填)
- `-v2, --version2`:对比的历史版本号或分支名(可选)
- `-o, --output`:输出文件名(可选,默认为output)
### 示例
1. 只提取当前版本API文档:
```bash
python3 extract_apidoc.py -r https://your.git.repo/project.git -v1 master
```
2. 对比两个版本API文档差异:
```bash
python3 extract_apidoc.py -r https://your.git.repo/project.git -v1 master -v2 develop
```
### 依赖
- Python 3.6+
- git
- apidoc(需全局安装,`npm install -g apidoc`)
### 贡献
欢迎提交PR或issue改进本工具。
### License
MIT
Metadata
Release files for apidoc2 0.1.2
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 |
|---|---|---|---|---|
| apidoc2-0.1.2.tar.gz | 7.2 kB | Without provenance | Details for apidoc2-0.1.2.tar.gz |
Release files / apidoc2-0.1.2.tar.gz
| Download URL | apidoc2-0.1.2.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
634adfca471b415a604957024590f690f8fb98aa94b2edb62d63ddad1f1e6e6f
|
|
BLAKE2b-256 checksum How to use checksums |
78caa636ec0203a6c4447d77e92703168b415c421056ec7e6ca42ec6814a0bce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.2
|
Security for apidoc2 0.1.2
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.