iwla/tools/extract_docs.sh

26 lines
715 B
Bash
Raw Normal View History

#!/bin/sh
MODULES_TARGET="docs/modules.md"
MAIN_MD="docs/main.md"
TARGET_MD="docs/index.md"
rm -f "${MODULES_TARGET}"
2014-12-31 14:52:14 +01:00
echo "Generate plugins index"
python tools/extract_doc.py -p iwla.py > "${MODULES_TARGET}"
2015-07-13 11:43:13 +02:00
for p in `find plugins -name '*.py' | sort | sed ':a;N;$!ba;s/\n/ /g'`; do
python tools/extract_doc.py -p $p >> "${MODULES_TARGET}"
done
2014-12-31 14:52:14 +01:00
echo "\n" >> "${MODULES_TARGET}"
echo "Generate doc from iwla.py"
2014-12-31 14:52:14 +01:00
python tools/extract_doc.py iwla.py >> "${MODULES_TARGET}"
echo "Generate plugins documentation"
2015-07-13 11:43:13 +02:00
for p in `find plugins -name '*.py' | sort` ; do
python tools/extract_doc.py $p >> "${MODULES_TARGET}"
done
echo "Generate ${TARGET_MD}"
cat "${MAIN_MD}" "${MODULES_TARGET}" > "${TARGET_MD}"