sintonia/docs/manual/convert.sh
Lucas Bickel 187afcb206 Add converted 2.5.x manual on top of pro manual
I tried to only merge what makes sense for us, there is still quite some cleanup needed, this commit tries to preserve the 2.5 manual as much as possible while still keeping the rare new stuff from pro.
2017-03-05 13:17:49 +01:00

16 lines
477 B
Bash
Executable file

#!/bin/bash
book="booktype-25"
base_path=`pwd`
pandoc_cmd="docker run --rm -ti -v ${base_path}:${base_path} jagregory/pandoc"
for html in `find ${book} -name 'index.html'`; do
pushd `dirname $html`
mkdir -p ${base_path}/`dirname ${html#*/}`
$pandoc_cmd -o - -f html -t markdown_github ${base_path}/${html} > `echo "${base_path}/${html#*/}" | sed 's/html$/md/'`
popd
done
for static in `find ${book} -name 'static'`; do
cp -rp ${static} ${static#*/}
done