Mermaid-Chart / issue-tracker

Other
7 stars 1 forks source link

Python Code to Mermaid Flowchart #50

Open pylancer opened 5 months ago

pylancer commented 5 months ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] I will like to be able to convert code to flowchart as it helps to understand code Describe the solution you'd like A clear and concise description of what you want to happen. I enter a price of code (Python, etc.) and a neat flowchart is generated with subgraphs for the different functions and modules Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. I have used some python libraries in past but they are not sufficient. I typically do it manually. I have tried using ChatGPT to generate pseudocode but found it inaccurate.

Additional context Add any other context or screenshots about the feature request here. Example Corresponding Code

jgreywolf commented 3 months ago

@pylancer FYI - I am not able to view the corresponding code that you linked to

I have added this to our backlog. While I believe that this could be a useful feature, it is one that will not be easy to implement, and not sure of where this will fit into our roadmap

However, you can use AI to help you create an appropriate flowchart as well. There are two different methods. 1: On Mermaid Chart, on the diagram page inside any project, click on the AI Diagram button on the top right. In the dialog box that appears you can ask the system to "generate a flowchart based on the following python code". After you hit submit you should receive back the syntax based on your code.

2: if you are a Pro user on ChatGPT, you can use the mermaid chart plugin to do the same thing.

Sometimes the results will be similar between the two methods, but sometimes one or the other will be better formatted