7 ms·
Shaky: ASCII Diagram to PNG
- gricardo99 11y agoThis visual editor allows you to easily draw the ASCII diagrams to begin with (for placing in code): http://asciiflow.com/ http://asciiflow.com/
- tsukikage 11y agoNeat. Could really do with supporting diagonal lines / \
- dpw 11y agoYeah. This bit me on the first ascii diagram of mine I tried it on. But other than that, very neat.
- Tehnix 11y agoAh, love it! I've taken to primarily doing ASCII figures when I write papers or other things. This along with Monodraw[0] will make a nice suite of tools! (absolutely love the shaky lines, reminds me of XKCD style) [0] http://monodraw.helftone.com/ http://monodraw.helftone.com/
- captn3m0 11y agoThis works very well with diagrams created using http://asciiflow.com/ http://asciiflow.com/ Just tried it out and the export->copy->paste->save worked really, really well.
- storrgie 11y agoIs a great service, but I'd love to have something I can use locally. A _lot_ of my time diagramming is spent disconnected, transitioning over photos of whiteboards to actual diagrams. Are you aware of anything that is a local client?
- wkz 11y agoHave you tried artist-mode in emacs?
- ctstover 11y agoasciio has layers, which is orders more powerful
- txutxu 11y agoThere is years ago asciio, works well on linux environments, some distros have it already packaged, otherwise you can pull it from CPAN. Looks something like this: http://wiki.cornempire.net/_media/asciiart/diagram1.png http://wiki.cornempire.net/_media/asciiart/diagram1.png
- otterpro 11y agoAsciio should be available as a package. For example, in Debian, it can be installed: sudo apt-get install asciio
- mnw21cam 11y agoA non-shaky mode would be great too.
- davidjgraph 11y agoThese ideas always seem to top HN. They are cute, but interactive diagram editors have been around a while and, unfortunately, are just faster to use and are more flexible. Maybe it'd make more sense to just have one of these tools implement export to ACSII?
- wiremine 11y ago> interactive diagram editors have been around a while and, unfortunately, are just faster to use and are more flexible Agreed. I think what is more helpful is taking a shorthand version of a diagram and generate it into a graph (flowchart.js is an example of this).
- dr_zoidberg 11y agoI think the appeal would be that, since it's text based, it's already supported by git/mercurial/svn/name-your-vcs. A binary format would need some sort of history/diff support inside it to work well with a specific plugin for s VCS. An XML-based format would integrate well with a VCS, but you lose the clarity of the ASCII based diagrams. It may seem "cute" or "toyish", but I woudl try to use it before giving an opinion. I certainly did that with markdown and ended up moving a lot of docs to that format, right in the repos with the code.
- davidjgraph 11y ago"since it's text based, it's already supported by git/mercurial/svn/name-your-vcs" But doesn't that still apply if you had a visual tool exporting to ASCII? It'd save you the difficulty of moving sections around in a text editor, but give you the visual diff.
- vidarh 11y agoNow you then need to cut and paste back and forth from your documents in order to edit them.
- davidjgraph 11y ago
- nashashmi 11y agoIt should have support for emoticons.
- cmstoken 11y agoAgreed.
- metasean 11y agohttps://github.com/dbushong/shaky https://github.com/dbushong/shaky (last touched by the author 3 years ago)
- willvarfar 11y agoThe 'drawn' -style output is cute. Would be nice if there were dot renderers that did 'artistic' renderings of diagrams.
- vidarh 11y agoDot has a SVG output mode that's reasonably easy to tweak/manipulate. I did an XSL file that adds gradients and drop-shadows to the Dot output back in the day [1] and there are a number of annoying corner cases to deal with, but it's not too horrible; would've been easier in something other than XSL though. [1] https://github.com/vidarh/diagram-tools https://github.com/vidarh/diagram-tools
- willvarfar 11y agoVery nice! I've used little .ps icon files before, and been generally unhappy with the whole thing. At its heart, graphviz is great. But the tools so need a nice little modernizing. At the basic level, I found myself being very repetitive because its not possible for graphviz nodes to inherit attributes from others etc. No CSS kind of hierarchy.
- chaosfox 11y agoditaa makes some much nicer diagrams: http://ditaa.sourceforge.net/ http://ditaa.sourceforge.net/
- teddyh 11y agoAlso, org-mode has native support for it!
- tambourine_man 11y agoI like Shaky's rough style better
- anigbrowl 11y agoMatter of taste I suppose, but I find the rought style almost as irritating as ASCII diagrams themselves. Both involve a lot of visual noise which is a huge distraction from the semantic content, for me. With something like Shaky, the combination of handwritten-looking text but the perfect consistency of computer fonts just creates an 'uncanny valley' scenario where my focus is drawn to the artificiality of the textural qualities - like bad CG in an old or low-budget film - rather than the assimilating the basic shapes and relationships that they are meant to present. When I see something like this part of me always silently wonders 'if you think these handwritten-style fonts are so cool, why didn't you write your whole Readme in the same font? Probably because deep down, you know it's actually hard to read, so why make your diagrams hard to read?'
- AstroJetson 11y agoI use this tool almost every day turning sequence diagrams into drawings. https://www.websequencediagrams.com https://www.websequencediagrams.com While the "back of a napkin"style is hip, management seems to prefer cleaner drawings. I'd use shakey, if it made "professional" drawings.
- vidarh 11y agoFrom a quick look at the code for Shaky, getting "cleaner" drawings would only require replacing 2 functions (shakyLine and bulb). In "bulb" it'd just require removing one line and changing one. In shakyLine you'd need to strip out most of it and replace it with a 1-2 line version.
- aembleton 11y agoThat looks like it's using Dot notation: https://en.wikipedia.org/wiki/DOT_%28graph_description_language%29 https://en.wikipedia.org/wiki/DOT_%28graph_description_langu... I like to use http://www.graphviz.org/ http://www.graphviz.org/ to convert from DOT to PNG.
- ygra 11y agoUhm, if the only thing you base that assumption on is the use of -> to mark a line with an arrowhead ... sure. But it's pretty far from dot, actually.
- pkaye 11y ago
- Aardwolf 11y agoThat is pretty awesome! I only found two bugs: 1) if you type just something small, like "asdf", it doesn't render. It seems to require you to start with a long horizontal line to make it properly calculate the width. 2) this one is understandable, but, if you want to write code that decrements something, e.g. x--, it renders the -- as horizontal line instead.
- grhmc 11y agoMy impression is most people don't know about graphviz and dot, and implement these sorts of tools to fill this (admittedly big) gap.
- vidarh 11y agoGraphviz is great if you either want to automatically generate diagrams of huge graphs, or if you care more about structure than appearance. But creating pretty diagrams with Graphviz/dot is an exercise in pain. I love seeing more of these tools, and plan to integrate several of them in the scripts I use to build my blog, not to supplant the cases where I use Graphviz, but to augment them for the many situations where I want to do diagrams that need more precise control than Graphviz does. (My personal Graphviz self-flagellation exercise involves an XSL file to convert the SVG output from dot to something prettier: https://github.com/vidarh/diagram-tools https://github.com/vidarh/diagram-tools )
- atombender 11y agoI use Mermaid [1]. It has similar layout algorithms as Graphiviz/dot, and is significantly prettier out of the box. Mermaid has multiple renderers (including a client-side JavaScript one), including SVG, so you can trivially style all your diagrams using CSS. It can also process diagrams embedded in Markdown. That said, just like Graphviz, its weak points is "messy" diagrams. But it supports subgraphs, which can help making them cleaner. [1] https://github.com/knsv/mermaid https://github.com/knsv/mermaid
- userbinator 11y agoBut creating pretty diagrams with Graphviz/dot is an exercise in pain. I think Graphviz really needs a better routing algorithm - with many vertices and edges the result starts looking like a mass of tangled hair. Something closer to the routing algorithms used in PCB design[1] would be far more readable. [1] https://en.wikipedia.org/wiki/Routing_(electronic_design_automation) https://en.wikipedia.org/wiki/Routing_(electronic_design_aut...
- arethuza 11y ago"My personal Graphviz self-flagellation" I can beat that - I had an ASP.Net application that queried a set of SharePoint lists to generate 100s of diagrams giving details of what applications were used for different business processes at each site in a large multinational. It did work but there was a lot of tweaking of the process to create the dot files....
- diegoloop 11y agoIt would be great if there is a some kind of tool with predefined objects like the square, table, start and so on. So you can easily added to your text
- tenfingers 11y agoThere's also aafigure: https://pythonhosted.org/aafigure/ https://pythonhosted.org/aafigure/
- leoc 11y agoI tried it with +-----+-----+ +-----+-----+ | | | | | /| | | | | | / | | * | *--+--+> * | / | | | | | | | | / | | | | | | | |/ | +--+--+-----+ +--+--+-----+ | | | | v v foo bar Close, just needs a little work. Also, is there any way to get a permalink to some specific diagram?
- crimsonalucard 11y agoIt's like turning a painting back into a sketch, or maybe not. I'm confused... which comes first? ascii or sketch?
- dakull 11y agoIs it just me or the ASCII diagrom looks way better than the generated faux-comic-PNG?
- TazeTSchnitzel 11y agoDoesn't work for me. I click the button and I get a blank PNG. Edit: Oh, you have to edit the field for it to actually render it, okay. That wasn't obvious.