]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Implementation of the "0020839: EDF 1370 DOC : Update of the TUI features documentati...
authorana <ana@opencascade.com>
Mon, 6 Feb 2012 07:29:53 +0000 (07:29 +0000)
committerana <ana@opencascade.com>
Mon, 6 Feb 2012 07:29:53 +0000 (07:29 +0000)
salome_adm/cmake_files/Makefile.am
salome_adm/cmake_files/prepare_generating_doc.py [new file with mode: 0755]

index b66106db849f9bd8174535d1289cdf9b2b643ddd..50d715e454c26bb17a244e6699dca81cf8c2aec4 100644 (file)
@@ -41,3 +41,5 @@ FindSWIG.cmake \
 FindSPHINX.cmake \
 install_python_from_idl.cmake \
 install_and_compile_python_file.cmake
+
+bin_SCRIPTS = prepare_generating_doc.py
diff --git a/salome_adm/cmake_files/prepare_generating_doc.py b/salome_adm/cmake_files/prepare_generating_doc.py
new file mode 100755 (executable)
index 0000000..5992979
--- /dev/null
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+
+import sys, re
+outfile = open(sys.argv[1], 'wb')
+isCom = False
+for line in open(sys.argv[2], 'rb').readlines():
+    if re.match('class '+sys.argv[3]+'DC', line): 
+        continue
+    n = line.find('"""')
+    n1 = line[(n+2):].find('"""')
+    if (n > -1) and (n1 > -1):
+        continue
+    if isCom:
+        if n > -1:
+            isCom = False
+        continue
+    else:
+        if n > -1:
+            isCom = True
+            continue       
+    line = re.sub(r'^\s+#', '#', line) 
+    line = re.sub(r'^\s+def', 'def', line) 
+    line = re.sub(sys.argv[3]+'DC', sys.argv[3], line)
+    outfile.write(line)
+outfile.close()
\ No newline at end of file