# HG changeset patch
# User Vincent Hatakeyama <vincent.hatakeyama@xcg-consulting.fr>
# Date 1472136311 -7200
#      Thu Aug 25 16:45:11 2016 +0200
# Node ID e70200748888449965909888f92dbd0e70a2afae
# Parent  62efab96d1b4331e837e0441a69670a33c7d1fb6
create module doc script WIP

diff --git a/create_module_documentation b/create_module_documentation
new file mode 100755
--- /dev/null
+++ b/create_module_documentation
@@ -0,0 +1,39 @@
+#!/bin/zsh
+# vim: set shiftwidth=4 softtabstop=4:
+#
+# This script generates documentation in all submodules.
+
+# It needs:
+# - openerp to be installed
+# 
+
+# Version 2.7
+
+here=$(dirname $0)
+project_home=$(cd $here && cd .. && echo $PWD)
+python=python
+
+format=html
+out_dir=${project_home}/_build/$format
+
+pushd $project_home
+
+# for dir in $module_dirs; do
+for dir in $($python -B -c "import ConfigParser ; c = ConfigParser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print(' '.join(c.get('odoo_scripts', 'addon_dirs', '').split()))") ; do
+    pushd $dir
+    for module in * ; do
+	if [[ -d "$module" ]] ; then
+	    echo $dir/$module
+	    pushd $module
+	    for doc_dir in doc* ; do
+		echo ${YELLOW}INFO ${RESET} - Found doc dir $dir/$module/$doc_dir
+		if [[ -e makefile ]]; then
+		    echo ${YELLOW}INFO ${RESET} - Makefile found
+		fi
+	    done
+	fi
+    done
+    popd
+done
+
+popd