Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 2987c59a authored by hhakim's avatar hhakim
Browse files

Finish filtering of non-documented classes both for matfaust and pyfaust.

parent b92472b5
Branches
Tags
No related merge requests found
......@@ -15,8 +15,7 @@ if(BUILD_DOCUMENTATION)
configure_file(${FAUST_DOC_SRC_DIR}/Doxyfile.in ${PROJECT_BINARY_DIR}/doc/Doxyfile @ONLY)
# ./gen_doc/images/* files is duplicated in doc/html/ to call images documentation in the source code with relative path of image's files, from build directory.
configure_file(${FAUST_DOC_SRC_DIR}/py_filterout_namespace.py ${PROJECT_BINARY_DIR}/doc/py_filterout_namespace.py @ONLY)
configure_file(${FAUST_DOC_SRC_DIR}/filterout_excluded_classes.py
${PROJECT_BINARY_DIR}/doc/filterout_excluded_classes.py @ONLY)
configure_file(${FAUST_DOC_SRC_DIR}/filterout_excluded_classes.py ${PROJECT_BINARY_DIR}/doc/filterout_excluded_classes.py @ONLY)
if(UNIX)
configure_file(${FAUST_DOC_SRC_DIR}/py_filter.sh.in ${PROJECT_BINARY_DIR}/doc/py_filter @ONLY)
configure_file(${FAUST_DOC_SRC_DIR}/doxymatlab/m2cpp.pl ${PROJECT_BINARY_DIR}/doc/m2cpp @ONLY)
......@@ -31,6 +30,11 @@ if(BUILD_DOCUMENTATION)
else()
add_custom_target(doc ALL ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/doc/Doxyfile DEPENDS zip_notebooks WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc COMMENT "Generating API documentation with Doxygen" VERBATIM)
endif()
#list(GET <list> <element index> [<index> ...] <out-var>)
list(GET PYTHON_EXES -1 PY3_EXE)
file(GLOB HTML_FILES RELATIVE_PATH ${PROJECT_BINARY_DIR}/doc/html/ ${PROJECT_BINARY_DIR}/doc/html/namespacepyfaust_*.html ${PROJECT_BINARY_DIR}/doc/html/namespacematfaust_*.html)
message(STATUS "HTML_FILES=${HTML_FILES}")
add_custom_target(doc_exclu_class_filtering ALL ${PY3_EXE} ${PROJECT_BINARY_DIR}/doc/filterout_excluded_classes.py ${HTML_FILES} DEPENDS doc WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc COMMENT "Filter out the non-documented classes")
#install(DIRECTORY ${PROJECT_BINARY_DIR}/doc/html DESTINATION doc/share/doc)
#file(MAKE_DIRECTORY ${FAUST_INSTALL_DOC})
#install(DIRECTORY ${PROJECT_BINARY_DIR}/doc/html DESTINATION ${FAUST_INSTALL_DOC} FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
......
import shutil
import sys
import re
......@@ -18,13 +19,18 @@ This script intends to filter out the doxygen non-documented classes (set in EXC
in_block_to_del=False
count_in_block_lines = 0
for line in sys.stdin:
if(in_block_to_del):
count_in_block_lines -= 1
if(count_in_block_lines <= 0):
in_block_to_del = False
elif(re.match('.*class &#160.*"bottom"><b>', line)):
in_block_to_del=True
count_in_block_lines = 2
else:
print(line, end='')
for file in sys.argv[1:]:
print("filtering file:", file)
tmp = open("tmp.html", mode='w')
for line in open(file):
if(in_block_to_del):
count_in_block_lines -= 1
if(count_in_block_lines <= 0):
in_block_to_del = False
elif(re.match('.*class &#160.*"bottom"><b>', line)):
in_block_to_del=True
count_in_block_lines = 2
else:
tmp.write(line)
tmp.close()
shutil.copyfile("tmp.html", file)
......@@ -4,7 +4,4 @@
@PYTHON3_EXE@ -m doxypypy.doxypypy -a -c $* | @PYTHON3_EXE@ \
py_filterout_namespace.py pyfaust.__init__. pyfaust.factparams. pyfaust.demo. \
pyfaust.tools. pyfaust.fact. \
pyfaust.factparams.ConstraintMat | @PYTHON3_EXE@ \
filterout_excluded_classes.py
pyfaust.factparams.ConstraintMat
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment