from helpers import delete_helpdir from helpers import help_generation_required if len(sys.argv) != 3: print("Usage: python3 generate_help.py <source_dir> <build_dir>") sys.exit(1) source_dir, build_dir = sys.argv[1:] helpdir = os.path.join(build_dir, "doc", "help") delete_helpdir(helpdir) if not help_generation_required(): sys.exit(0) create_helpdirs(helpdir) allfiles = [] for dirpath, dirnames, files in os.walk(source_dir): for f in files: if f.endswith((".sli", ".cpp", ".cc", ".h", ".py")) and \ not f.startswith(".#"): allfiles.append(os.path.join(dirpath, f)) num = 0 full_list = [] sli_command_list = [] cc_command_list = [] index_dic_list = [] # which keywords to ignore: can put e.g. doxygen commands here
import sys import shutil import textwrap from writers import coll_data, write_helpindex from helpers import check_ifdef, create_helpdirs, cut_it if len(sys.argv) != 4: print "Usage: python parse_help.py <source_dir> <build_dir> <install_dir>" sys.exit(1) source_dir, build_dir, install_dir = sys.argv[1:] helpdir = os.path.join(build_dir, "doc/help") create_helpdirs(helpdir) allfiles = [] for dirpath, dirnames, files in os.walk(source_dir): if not re.findall(r'[.?]*MyModule[.?]*', dirpath): for f in files: if f.endswith((".sli", ".cpp", ".cc", ".h", ".py")): allfiles.append(os.path.join(dirpath, f)) num = 0 full_list = [] sli_command_list = [] cc_command_list = [] index_dic_list = []