Files
opencode-skill/skills/minimax-docx/scripts/doc_to_docx.sh
Kunthawat Greethong 7edf5bc4d0 feat: Import 35+ skills, merge duplicates, add openclaw installer
Major updates:
- Added 35+ new skills from awesome-opencode-skills and antigravity repos
- Merged SEO skills into seo-master
- Merged architecture skills into architecture
- Merged security skills into security-auditor and security-coder
- Merged testing skills into testing-master and testing-patterns
- Merged pentesting skills into pentesting
- Renamed website-creator to thai-frontend-dev
- Replaced skill-creator with github version
- Removed Chutes references (use MiniMax API instead)
- Added install-openclaw-skills.sh for cross-platform installation
- Updated .env.example with MiniMax API credentials
2026-03-26 11:37:39 +07:00

41 lines
872 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
usage() {
echo "Usage: $(basename "$0") <file.doc> [output_directory]"
echo "Convert .doc to .docx using LibreOffice."
exit 1
}
if [ $# -lt 1 ]; then
usage
fi
INPUT="$1"
OUTDIR="${2:-.}"
if [ ! -f "$INPUT" ]; then
echo "Error: File not found: $INPUT"
exit 1
fi
if ! command -v soffice &>/dev/null; then
echo "Error: soffice (LibreOffice) is required for .doc conversion but not found."
echo "Install LibreOffice: brew install --cask libreoffice"
exit 1
fi
BASENAME=$(basename "$INPUT" .doc)
mkdir -p "$OUTDIR"
echo "Converting: $INPUT -> $OUTDIR/$BASENAME.docx"
soffice --headless --convert-to docx --outdir "$OUTDIR" "$INPUT" >/dev/null 2>&1
OUTPUT="$OUTDIR/$BASENAME.docx"
if [ ! -f "$OUTPUT" ]; then
echo "Error: Conversion failed. Output file not created: $OUTPUT"
exit 1
fi
echo "Success: $OUTPUT"