diff --git a/CI/gen_doc/docs/gen_all_doc.py b/CI/gen_doc/docs/gen_all_doc.py index ace7661..0d9f9f0 100644 --- a/CI/gen_doc/docs/gen_all_doc.py +++ b/CI/gen_doc/docs/gen_all_doc.py @@ -1,10 +1,8 @@ from gen_md_pages import gen_pages_and_toc from gen_sysobj_pages import gen_sys_obj_pages -from gen_rd_svg import gen_rd_svg import os if __name__ == "__main__": - gen_rd_svg() matlab = bool(os.environ.get("MATLAB")) devices, designs = gen_sys_obj_pages(matlab) gen_pages_and_toc(matlab, devices, designs) diff --git a/CI/gen_doc/docs/gen_rd_svg.py b/CI/gen_doc/docs/gen_rd_svg.py deleted file mode 100644 index 2d26268..0000000 --- a/CI/gen_doc/docs/gen_rd_svg.py +++ /dev/null @@ -1,94 +0,0 @@ -import os - -def gen_rd_svg(): - refs = ["rd_ad9361","rd_adrv9001","rd_jesd"] - css_out = "" - - for ref in refs: - - with open(f"assets/{ref}.svg", "r") as f: - svg = f.read() - - selectable_boxes = { - "AXIAD9361Box": {"link": "https://wiki.analog.com/resources/fpga/docs/axi_ad9361"}, - "AXIADRV9002Box": {"link": "https://wiki.analog.com/resources/eval/user-guides/adrv9002/axi_adrv9002"}, - "TxDMAEngineBox": {"link": "https://wiki.analog.com/resources/fpga/docs/axi_dmac"}, - "TxUPACKBox": {"link": "https://wiki.analog.com/resources/fpga/docs/util_upack"}, - "TxFIFOBox": {"link": "https://wiki.analog.com/resources/fpga/docs/util_rfifo"}, - "RxDMAEngineBox": {"link": "https://wiki.analog.com/resources/fpga/docs/axi_dmac"}, - "CPACKBox": {"link": "https://wiki.analog.com/resources/fpga/docs/util_cpack"}, - "RxFIFOBox": {"link": "https://wiki.analog.com/resources/fpga/docs/util_rfifo"}, - "RxJESDTPL": {"link": "https://wiki.analog.com/resources/fpga/peripherals/jesd204/jesd204_tpl_adc"}, - "TxJESDTPL": {"link": "https://wiki.analog.com/resources/fpga/peripherals/jesd204/jesd204_tpl_dac"}, - "RxJESDLink": {"link": "https://wiki.analog.com/resources/fpga/peripherals/jesd204/axi_jesd204_rx"}, - "TxJESDLink": {"link": "https://wiki.analog.com/resources/fpga/peripherals/jesd204/axi_jesd204_tx"}, - "RxJESDPHY": {"link": "https://wiki.analog.com/resources/fpga/docs/axi_adxcvr"}, - "TxJESDPHY": {"link": "https://wiki.analog.com/resources/fpga/docs/axi_adxcvr"}, - } - - - # "TxCustomIPBox", - # CarrierBox - # AXIInterconnectBox - # ZynqBox - # DDRxBox - # InterruptsBox - # UARTBox - # EthernetBox - # RxCustomIPBox - # CustomIPOutline - - - # Parse each g tag - output = "" - for i, sec in enumerate(svg.split("") + 4 - gtag = o[:loc] - post_gtag = o[loc:] - # print(gtag) - loc = gtag.find("id=") + 4 - id = gtag[loc : gtag.find('"', loc)] - if id == "CarrierBox": - css_out += ( - f"\n#{id} > rect {{\n" - + " fill: var(--md-default-fg-color--light);\n" - + "}\n" - ) - - - if not id or id not in selectable_boxes: - output += o - continue - # Add link wrapper - output += f'{gtag}{post_gtag}' - # output += o - # print(sec) - # Add css to change fill color - css_out += f"#{id} > rect {{\n" + " stroke: white;\n" + "}\n" - css_out += f"\n#{id}:hover > rect {{\n" + " fill: rgb(0, 174, 255);\n" + "}\n" - - - - with open(f"assets/{ref}_custom.svg", "w") as f: - f.write(output) - - css_out += "\n#FPGACarrierText {\n" + " fill: var(--rd-title-color);\n" + "}\n" - css_out += "\n#CarrierBox > rect {\n" + " fill: none;\n stroke: black\n" + "}\n" - css_out += ( - "\n#CustomIPOutline > rect {\n" + " stroke: var(--rd-title-color);\n" + "}\n" - ) - css_out += ("\n#CustomIPIntegrationText {\n" + " fill: var(--rd-title-color);\n" + "}\n") - - with open("stylesheets/rd_style.css", "w") as f: - f.write(css_out)