File Converter

Other

File format conversion skill. Convert between PDF, DOCX, Markdown, HTML, images, audio, and video formats.

Install

openclaw skills install jpeng-file-converter

File Converter

Convert files between different formats.

When to Use

  • User wants to convert a file to another format
  • Convert documents (PDF, DOCX, Markdown)
  • Convert images (PNG, JPG, WebP, SVG)
  • Convert audio/video formats

Supported Conversions

Documents

  • PDF ↔ DOCX
  • Markdown ↔ HTML ↔ PDF
  • TXT ↔ DOCX

Images

  • PNG ↔ JPG ↔ WebP ↔ GIF
  • SVG → PNG/JPG
  • HEIC → JPG/PNG

Audio

  • MP3 ↔ WAV ↔ FLAC ↔ AAC
  • M4A ↔ MP3

Video

  • MP4 ↔ WebM ↔ AVI
  • Video → GIF

Usage

Convert document

python3 scripts/convert.py \
  --input ./document.docx \
  --output ./document.pdf

Convert image

python3 scripts/convert.py \
  --input ./image.png \
  --output ./image.jpg \
  --quality 90

Batch convert

python3 scripts/convert.py \
  --input-dir ./images/ \
  --output-dir ./converted/ \
  --from png \
  --to webp

Resize image

python3 scripts/convert.py \
  --input ./photo.jpg \
  --output ./thumbnail.jpg \
  --resize 800x600

Extract audio from video

python3 scripts/convert.py \
  --input ./video.mp4 \
  --output ./audio.mp3 \
  --extract-audio

Output

{
  "success": true,
  "input": "./document.docx",
  "output": "./document.pdf",
  "input_size_kb": 45,
  "output_size_kb": 52
}