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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ieeu-1.0.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.0.0.tar.gz
Algorithm Hash digest
SHA256 c4973bf4844c1825d95d81459a52efd3556309e4e4d02d70310ea8ac15199a33
MD5 9de6af76777a061a8dfdc42b055c63ff
BLAKE2b-256 3388de0c2fc08b4650ec772571b40604dbf24d4173d2c1b82c3be5e91c733840

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ieeu-1.0.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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d81528670788885763bb8b346e8782cc3e572bd2d2c440c14099383e6b48f60
MD5 0272ee056cd58a5bbce2a2966edc0907
BLAKE2b-256 c7031b56fbf10ce5a622f69f1127a5fe1843fdaa598b95ee8476a97714da014c

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