INNER CODE UNIT · Python

create_ODM_docs

CybercentreCanada/assemblyline · gen_docs.py:47

    def create_ODM_docs(base, models):
        for item in sorted(os.listdir(base)):
            path = os.path.join(base, item)
            if os.path.isfile(path):
                if not item.endswith(".py"):
                    continue
                # Render ODM to Markdown
                doc_path, name = render_markdown(path)
                if doc_path:
                    # Add entry into nav config
                    rel_path = doc_path.replace(DOCS_DOCS_PATH, "")
                    models.append({name: rel_path})
            elif item != "__pycache__":
                # Perform a recursive call to look for ODM files
                os.makedirs(path.replace(BASE_PATH, DOCS_DOCS_PATH), exist_ok=True)
                submodel = []
                create_ODM_docs(path, submodel)
                if item.lower() == item:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…