Skip to main content

将Markdown中的图片链接替换为VLM生成的描述性文本

Project description

ieeU - 图片描述替换工具

PyPI Version Python Version License

将MinerU转换后的Markdown文件中的图片链接替换为VLM生成的描述性文本。

安装

pip install ieeU

或从源码安装:

pip install -e .

使用

命令行接口

ieeU --help          # 显示帮助信息
ieeU --version       # 显示版本号
ieeU run             # 执行图片描述转换
ieeU run --verbose   # 详细输出模式

配置文件

~/.ieeU/settings.json 中配置API:

{
    "endpoint": "https://openrouter.ai/api/v1/chat/completions",
    "key": "your-api-key",
    "modelName": "google/gemini-3-flash-preview",
    "timeout": 120,
    "retries": 3,
    "maxConcurrency": 3
}

必填项

  • endpoint: API端点URL
  • key: API密钥
  • modelName: 模型名称

可选项

  • timeout: 请求超时(秒),默认60
  • retries: 重试次数,默认3
  • maxConcurrency: 最大并发数,默认5

环境变量

可覆盖配置:

  • IEEU_ENDPOINT
  • IEEU_KEY
  • IEEU_MODEL

示例

在包含 full.md 的目录中运行:

ieeU run

处理前:

![](images/figure1.jpg)
Figure 1 shows the architecture.

处理后:

```figure 1
This figure illustrates the overall architecture of the system...
```
Figure 1 shows the architecture.

开发

安装开发依赖

pip install -e ".[dev]"

运行测试

pytest tests/

构建发布包

pip install build
python -m build
twine check dist/*

发布到PyPI

  1. 安装构建工具:

    pip install build twine
    
  2. 构建包:

    python -m build
    
  3. 发布到Test PyPI(测试):

    twine upload --repository testpypi dist/*
    
  4. 发布到PyPI:

    twine upload dist/*
    

或使用GitHub Actions自动发布:

  1. 创建PyPI API Token
  2. 添加到GitHub Secrets: PYPI_API_TOKEN
  3. 创建Release并发布

支持的VLM

  • OpenAI GPT-4V
  • Google Gemini (via OpenRouter)
  • Anthropic Claude (via OpenRouter)
  • 其他OpenAI兼容的API

License

MIT License

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

ieeu-1.1.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ieeu-1.1.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file ieeu-1.1.0.tar.gz.

File metadata

  • Download URL: ieeu-1.1.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ieeu-1.1.0.tar.gz
Algorithm Hash digest
SHA256 62b24d29766fdde8cfa0c6363fa7de635a81dce02c762ccdad65290883fa6e32
MD5 53f31276cf60149f416569033e96b03c
BLAKE2b-256 abca26c5fa51e199d33efa4ea6b4e65ed1c894a02d472dff5eb93dc88bd22dc1

See more details on using hashes here.

File details

Details for the file ieeu-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: ieeu-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ieeu-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbe9041b6acba1c4bf2f9388a5edc913c7785b7ceec1cb8be90301fd82a3f709
MD5 617e8cdc9fea8606059cb050f52fd294
BLAKE2b-256 b46a3ee4e8ea188cf20695a560c0c87ccf12872e5ce59e2b10c93f29db6ce2fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page