← 返回 Skills 市场
llyouc

Extract Pic Text

作者 Llyouc · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
263
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install extract-pic-text
功能描述
Extract specified-position text from image filenames using custom delimiters, supporting batch processing, sorting, deduplication, and multiple image formats.
使用说明 (SKILL.md)

extract-pic-text

从图片文件名中提取指定位置的文本内容。支持自定义分隔符、提取位置,可批量处理目录中的图片文件。

功能特点

  • 支持自定义分隔符(默认为 _
  • 支持指定提取位置(默认为第2部分,即第一个和第二个分隔符之间的内容)
  • 支持多种图片格式(jpg, jpeg, png, gif, bmp, webp, tiff, tif)
  • 可自定义图片扩展名列表
  • 支持结果排序和去重
  • 可输出到文件或 stdout

用法

基本用法

# 提取默认位置(第一个和第二个下划线之间的文本)
python3 scripts/extract_pic_text.py /path/to/images

# 示例:BIN245_515194318_0128N.jpg -> 515194318

高级选项

# 使用不同的分隔符和位置
python3 scripts/extract_pic_text.py /path/to/images -d '-' -p 0
# 示例:img-12345-test.jpg -> img (位置0)

# 指定图片扩展名
python3 scripts/extract_pic_text.py /path/to/images -e .jpg .png

# 结果排序并去重
python3 scripts/extract_pic_text.py /path/to/images --sort --unique

# 保存到文件
python3 scripts/extract_pic_text.py /path/to/images -o result.txt

完整参数说明

参数 简写 说明 默认值
directory - 图片所在目录路径(必填) -
--delimiter -d 文件名分隔符 _
--position -p 提取位置(0开始) 1
--extensions -e 图片扩展名列表 .jpg .jpeg .png .gif .bmp .webp .tiff .tif
--output -o 输出文件路径 stdout
--sort - 对结果排序 False
--unique - 去重 False

提取规则示例

假设分隔符为 _,位置为 1

文件名 提取结果
BIN245_515194318_0128N.jpg 515194318
abc_def_ghi.png def
2024_0307_event.jpg 0307
product_SKU123_detail.jpg SKU123

输出格式

515194318,515196709,515270355

注意:2个文件格式不符:invalid_file.jpg, no_underscore.png

使用场景

  1. 图片处理:从 SKU_12345_variant.jpg 中提取 SKU 编号
  2. 照片管理:从 2024_0307_event.jpg 中提取日期
  3. 批量重命名辅助:提取现有文件名中的关键信息
  4. 数据整理:从规范化命名的图片中提取ID进行数据库比对

脚本路径

scripts/extract_pic_text.py

在 skill 目录下可直接执行:

python3 ~/.openclaw/workspace/skills/extract-pic-text/scripts/extract_pic_text.py /path/to/images
安全使用建议
This skill appears to do exactly what it claims: parse image filenames locally using Python 3. Before installing or running it, ensure you have Python 3 available and that you run it on directories you trust (the script will read the directory and can write to any output path you specify). If you are concerned, inspect scripts/extract_pic_text.py yourself — it contains no network calls or credential usage. Also be aware the script only filters by file extension and delimiter/position, so verify the delimiter and position options match your filename conventions and that you provide an output path if you want to save results (it will overwrite the specified output file if it exists).
功能分析
Type: OpenClaw Skill Name: extract-pic-text Version: 1.0.0 The skill is a utility for extracting text from image filenames based on user-defined delimiters and positions. The Python script (scripts/extract_pic_text.py) uses standard libraries to process files in a specified directory and lacks any indicators of data exfiltration, malicious execution, or persistence.
能力评估
Purpose & Capability
Name/description match the provided script and runtime instructions. The script implements filename parsing with delimiters/position, extension filtering, sorting, deduplication, and optional output — all consistent with the stated purpose.
Instruction Scope
SKILL.md instructs running the included Python script against a user-specified directory. The runtime instructions reference only the script, local file paths, and standard CLI options. The instructions do not direct reading unrelated system files, environment variables, or outbound network calls.
Install Mechanism
There is no install spec (instruction-only). A single small Python script is included; nothing is downloaded from external sources or written to system locations during install.
Credentials
The skill requests no environment variables, no credentials, and no config paths. The script only needs read access to the target directory and optional write access if the user specifies an output file — this is proportionate to its function.
Persistence & Privilege
The skill is not always-enabled and uses normal model invocation defaults. It does not modify other skills or system configuration and does not request elevated persistence.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install extract-pic-text
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /extract-pic-text 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of extract-pic-text. - Extracts specified text positions from image file names with customizable delimiters. - Supports batch processing of images in a directory and multiple image formats. - Allows sorting, duplicate removal, and output to file or stdout. - Ideal for extracting IDs, numbers, dates, or other structured data from standardized file names.
元数据
Slug extract-pic-text
版本 1.0.0
许可证
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Extract Pic Text 是什么?

Extract specified-position text from image filenames using custom delimiters, supporting batch processing, sorting, deduplication, and multiple image formats. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 263 次。

如何安装 Extract Pic Text?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install extract-pic-text」即可一键安装,无需额外配置。

Extract Pic Text 是免费的吗?

是的,Extract Pic Text 完全免费(开源免费),可自由下载、安装和使用。

Extract Pic Text 支持哪些平台?

Extract Pic Text 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Extract Pic Text?

由 Llyouc(@llyouc)开发并维护,当前版本 v1.0.0。

💬 留言讨论