INNER CODE UNIT · Python

name

CybercentreCanada/assemblyline · gen_docs.py:30

            name = markdown_list[-1][1]
            compiled_md = "\n\n".join(m[0] for m in markdown_list)
            if len(markdown_list) > 1:
                compiled_md = markdown_list.pop(-1)[0]
                # Check if other models were part of the first render
                for md, md_name in markdown_list:
                    # Add if missing
                    if not re.search(f"# {md_name}\n", compiled_md):
                        compiled_md += f"\n\n{md}"

            doc_path = file.replace(BASE_PATH, DOCS_DOCS_PATH).replace(".py", ".md")
            if site_prefix:
                compiled_md = compiled_md.replace('/odm/', f'{site_prefix}/odm/')
            open(doc_path, 'w').write(compiled_md)
            return doc_path, name
        return None, None

    def create_ODM_docs(base, models):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…