Update tools to sort documentation

This commit is contained in:
Gregory Soutade 2015-07-13 11:43:13 +02:00
parent b72563af8d
commit 47cd9264c5
2 changed files with 10 additions and 4 deletions

View File

@ -1,8 +1,10 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
import re
excludes = ['istats_diff.py'] excludes = []
# excludes = [r'.*_diff.py']
filename = sys.argv[1] filename = sys.argv[1]
printName = False printName = False
@ -15,7 +17,7 @@ if filename.endswith('__init__.py'):
sys.exit(0) sys.exit(0)
for e in excludes: for e in excludes:
if filename.endswith(e): if re.match(e, filename):
sys.stderr.write('\tSkip %s\n' % (filename)) sys.stderr.write('\tSkip %s\n' % (filename))
sys.exit(0) sys.exit(0)

View File

@ -8,14 +8,18 @@ rm -f "${MODULES_TARGET}"
echo "Generate plugins index" echo "Generate plugins index"
python tools/extract_doc.py -p iwla.py > "${MODULES_TARGET}" python tools/extract_doc.py -p iwla.py > "${MODULES_TARGET}"
find plugins -name '*.py' -exec python tools/extract_doc.py -p \{\} \; >> "${MODULES_TARGET}" 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
echo "\n" >> "${MODULES_TARGET}" echo "\n" >> "${MODULES_TARGET}"
echo "Generate doc from iwla.py" echo "Generate doc from iwla.py"
python tools/extract_doc.py iwla.py >> "${MODULES_TARGET}" python tools/extract_doc.py iwla.py >> "${MODULES_TARGET}"
echo "Generate plugins documentation" echo "Generate plugins documentation"
find plugins -name '*.py' -exec python tools/extract_doc.py \{\} \; >> "${MODULES_TARGET}" for p in `find plugins -name '*.py' | sort` ; do
python tools/extract_doc.py $p >> "${MODULES_TARGET}"
done
echo "Generate ${TARGET_MD}" echo "Generate ${TARGET_MD}"
cat "${MAIN_MD}" "${MODULES_TARGET}" > "${TARGET_MD}" cat "${MAIN_MD}" "${MODULES_TARGET}" > "${TARGET_MD}"