Hacker News new | past | comments | ask | show | jobs | submit login

I recently had to draw some diagrams for documenting something. After looking at various Markdown-friendly options I landed on svgbob[1]. I believe it's a superior solution to these kinds of graph drawing tools for Markdown for one specific reason: the code is still readable. When I go to look at a Markdown file I don't always open the output. I will commonly open up a README file in Vim or just cat it to the terminal. In this case diagrams like those in this post is next to useless. I'm not going to read through some complex drawing definitions and try to visualise the results. With svgbob (or Typograms[2] or any of the other similar options) you can still read the Markdown text document and see the diagrams which is great!

Of course this comes with a tradeoff, drawing the diagrams can be a bit of a pain. But I believe this can be solved by a good Markdown editor or editor plugin. Alternatively a spec like this could be converted into an svgbob-compatible diagram.

[1]https://ivanceras.github.io/svgbob-editor/ [2]https://google.github.io/typograms/




Seems like the use-cases are kind of different from the two.

Pikchr seems to be made specifically for A) ease of editing and B) compile to graphs after being embedded in markdown code fences

svgbob I guess would work fine for B, but seems like a hassle to use it for A, but then I've never done ASCII art manually, maybe that's why it seems cumbersome to me?

If you come across this graph and want to edit it, how would you approach it? Because I'm guessing you're not manually moving characters around? Seems like a big hassle if so, even if I'm a daily user of vim which could help a lot.

                ,─.
               ( 0 )
                `-'
              /     \
             /       \
            V         V
           ,─.         ,─.
          ( 1 )       ( 4 )
           `-'         `-' .
         /   \         |  \ `.
        /     \        |   \  `.
       V       V       |    \   `.
      ,─.      ,─.     V     V    V
     ( 2 )    ( 3 )    ,─.   ,─.   ,─.
      `─'      `─'    ( 5 ) ( 6 ) ( 7 )
                       `─'   `─'   `─'


Yeah this is the drawback I was talking about. Vim certainly helps a bit, but some kind of editor or plugin which allowed you to more easily move stuff around, draw lines, draw boxes and circles, etc. would be very handy. The current approach is moving characters around by hand, which is quite tedious.


There is an "artist mode" in Emacs that allows you to draw ascii art with your mouse.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: