Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: draw graph in ascii art #36

Open
cdmihai opened this issue Sep 13, 2018 · 16 comments
Open

Feature request: draw graph in ascii art #36

cdmihai opened this issue Sep 13, 2018 · 16 comments

Comments

@cdmihai
Copy link

cdmihai commented Sep 13, 2018

I'd like to include mermaid graphs in text heavy environments which don't always embed images / attachments well (markdown, wikis, emails, chat, etc). One option is to have the live mermaid editor generate ASCII art which I can then copy paste into my text / markdown documents.

@felickz
Copy link

felickz commented Sep 8, 2021

inspiration: https://plantuml.com/ascii-art

@mzvast
Copy link

mzvast commented Sep 13, 2021

I like this feature

@MKyhos
Copy link

MKyhos commented May 6, 2022

With the now available Mermaid support in Github Markdown, this is probably not necessary from initial intention, however it would still be sometimes useful if one wants to include diagrams directly in the code comments (or is this a rare use case?)

@devthejo
Copy link

devthejo commented Jun 2, 2022

and for output of a cli it would be great too

@esafirm
Copy link

esafirm commented Aug 9, 2022

This would be nice and we can move on from asciiflow 😄

@KSDaemon
Copy link

yeah. One of the cases for this: IETF RFCs are still rendered as plain texts. So even if you want to use some up-to-date awesome tool for diagrams, you still need to convert them to the ASCII representation. If you can not do it automatically — then the only option is just not to use cool tools at all ((( And create diagrams from the beginning by hand is asciiflow for example.

@OR13
Copy link

OR13 commented Oct 6, 2022

I would love a way to convert mermaid to ascii for use in IETF RFCs.

@peppelinux
Copy link

I'm looking for this feature, it would be very useful having it!

@ayush29feb
Copy link

Also looking for this feature for the CLI output

@maral
Copy link

maral commented Aug 23, 2023

If you can't live without it, ChatGPT can create somewhat good enough head start which you can edit yourself - it is really bad at counting characters, so you'll have to add the right amount of spaces yourself:
image

I tried like 5 extra prompts to convince it to fix it and nothing was perfect.

@wanghenshui
Copy link

it's really helpful in code comment

@kebot
Copy link

kebot commented May 27, 2024

I recently found Diagon, it has it's own-syntax but very similar to Mermaid. To use in the web environment, we can try https://github.com/elmouradiaminedev/diagonjs which looks like a webassembly wrapper of the Diagon library.

You can also try out the online demo here -> https://arthursonzogni.com/Diagon/

@andyfeller
Copy link

andyfeller commented Jun 14, 2024

speaking as a maintainer of the GitHub CLI, I would love to enhance gh issue view or any of the other commands to render an ASCII version of Mermaid diagram for GitHub users.

found https://github.com/AlexanderGrooff/mermaid-ascii from @AlexanderGrooff, need to see how it compare to alternates but just wanted to share interest ❤ ty for supporting durable communication

@traversebitree
Copy link

Reminder.

@AlexanderGrooff
Copy link

Thanks for the mention @andyfeller. I've added some more features to the https://github.com/AlexanderGrooff/mermaid-ascii repo and you can check out a demo on https://mermaid-ascii.art.

Let me know what you think! I'm more than happy to help out.

@andyfeller
Copy link

Thanks, @AlexanderGrooff! 🙌

The GitHub CLI leverages https://github.com/charmbracelet/glamour for rendering markdown within the terminal, which is built on https://github.com/yuin/goldmark. I'll have to look into the extension support used for GFM to see what is needed to wire this into the toolchain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests