#!/bin/bash # consider Cookbook:TextImport # test with multiple documents # consider default wiki.d/ destination PMWIKIVERSION=2.2.35 if [ $# -lt 1 ] then echo "usage: `basename $0` worddocument" echo "output in pmwiki syntax" echo "example: `basename $0` worddocument.doc > path/to/wiki.d/MyGroup.MyDoc" exit fi echo "version=pmwiki-$PMWIKIVERSION urlencoded=1" echo -n "text=" catdoc $@ | awk '{printf "%s%%0a", $0; next }' echo ""