Skip to content
Automation
Skill

/change_label_in_xml

批量修改指定目录下所有 XML 标注文件中的标签名(old_label 替换为 new_label)。当用户提到改 XML 标签、修改标注、批量改 label 时使用。

BOOST
From plugin
python-office
1.4k74 skills
Install
$ npx -y skills add coderwanfeng/python-office --skill change_label_in_xml --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/change_label_in_xml

Context preview

The summary Claude sees to decide when to auto-load this skill.

批量修改指定目录下所有 XML 标注文件中的标签名(old_label 替换为 new_label)。当用户提到改 XML 标签、修改标注、批量改 label 时使用。

SKILL.md

change_label_in_xml.SKILL.md
name: change_label_in_xml
description: 批量修改指定目录下所有 XML 标注文件中的标签名(old_label 替换为 new_label)。当用户提到改 XML 标签、修改标注、批量改 label 时使用。

change_label_in_xml Skill

> 修改 XML 标注文件中的 label

功能描述

批量修改指定目录下所有 XML 标注文件中的标签名(old_label 替换为 new_label)。

所属分类

`office/skills/ruiming/change_label_in_xml/`

调用方式

from skills.ruiming import change_label_in_xml

change_label_in_xml(
    dir_path='./dataset',
    old_label='cat',
    new_label='dog'
)

参数说明

| 参数 | 类型 | 必填 | 默认值 | 说明 | |------|------|------|--------|------| | `dir_path` | str | 是 | - | 图片及标注文件的存放路径 | | `old_label` | str | 是 | - | 需要修改的标签 | | `new_label` | str | 是 | - | 修改后的标签 |

返回值

`None`

使用示例

from skills.ruiming import change_label_in_xml
change_label_in_xml(dir_path='./annotations', old_label='person', new_label='human')

原始函数

`office.api.testApi.ruiming.change_label_in_xml`

Ships withpython-office

pip install python-office 自动化办公专用库

Get the whole plugin
Stats
1,358
Stars
303
Forks
Maintained
Maintenance
Python
Language
Apache-2.0
License
1mo ago
Last commit
4y ago
Created
1d ago
Added

Repo: coderwanfeng/python-office

Other skills on python-office.