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.0.3.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.0.3-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ieeu-1.0.3.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.0.3.tar.gz
Algorithm Hash digest
SHA256 4870d3561c6835da39c1e066dfe213da19b588acb11ee658d2160d41f2222c68
MD5 9db25c629b42ec355ae9e2a922a2f0bf
BLAKE2b-256 8d30538fb89aca887a5defeebcc7d7d5b67097c0e0215dfc2211d5988c1c3a16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ieeu-1.0.3-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.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b1bc3627d1351d548d4126d76ad0548352525c0cffce1fe91d96fc5ad3f1e063
MD5 4a0128d7967d9e9856b3366acc8708a5
BLAKE2b-256 8fd27ee2e3ec9b08e5b292de43143bb26751ed4fb97390b9483f184cbae46147

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