feat(skills): make skill scripts self-executing with uv hashbang

The Python scripts in mpi-pptx-translate, mpi-pdf-to-docx-conversion, and
mpi-chinese-text-normalize previously required users to type
manually. That is easy to forget and adds friction every time the skill runs.

Switch all four scripts to a  shebang,
so they can be invoked directly: . The
 PEP 723 metadata blocks remain, so uv still installs the
dependencies automatically. Also made the scripts executable and updated
their usage messages and SKILL.md instructions to match the direct-execution
style.
This commit is contained in:
iacore
2026-07-15 13:05:34 +08:00
parent 894d769051
commit bc17471635
7 changed files with 25 additions and 22 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.9"
# dependencies = []
@@ -11,7 +12,7 @@ Three file patterns:
2. Mostly-paragraph with stray breaks + outline TOC -> join broken lines, preserve list items
3. Already fine -> skip (idempotent)
Usage: uv run normalize_breaks.py <directory>
Usage: ./normalize_breaks.py <directory>
"""
import re
@@ -162,7 +163,7 @@ def process_file(filepath):
def main():
if len(sys.argv) != 2:
print("Usage: uv run normalize_breaks.py <directory>", file=sys.stderr)
print("Usage: ./normalize_breaks.py <directory>", file=sys.stderr)
sys.exit(1)
workdir = Path(sys.argv[1])
files = sorted(workdir.glob('*.md'))