TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Ascii to SVG

416 点作者 ivanceras超过 8 年前

27 条评论

sigvef超过 8 年前
In a perfect world, everything is generated from ASCII diagram sources: <a href="https:&#x2F;&#x2F;github.com&#x2F;sigvef&#x2F;sigvehtml" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sigvef&#x2F;sigvehtml</a> .
评论 #12622183 未加载
评论 #12622175 未加载
Rexxar超过 8 年前
It looks nice but the SVG generated seems <i>incredibly</i> big. Every ascii characters seems to be replaced by one svg element.<p>(You can have a hint at this behaviour because some pixel are &quot;more black&quot; when an area is covered by two SVG elements)<p>edit: killercup as made a similar comment with answer from the author, <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12621863" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12621863</a>
评论 #12621960 未加载
评论 #12675365 未加载
评论 #12625851 未加载
评论 #12622070 未加载
zokier超过 8 年前
In the &quot;Safety-Control&quot; chart, C++ is turned into C. That seems like fairly major problem
评论 #12621978 未加载
评论 #12621905 未加载
Animats超过 8 年前
Years ago I had a program that turned ASCII diagrams like that into line drawing characters.<p><pre><code> ┏━━━━━━━━━━━┓ ┏━━━━━━━┓ ┃ Like this ┣━━┫ Box ┃ ┗━━━━━━━━━━━┛ ┗━━━━━━━┛ </code></pre> It&#x27;s an easy transformation. You only have to look at 3 lines at a time, and then only at 3x3 blocks of characters. This would be a fun transformation to put in a text editor.<p>The line drawing characters in Unicode (and originally on the DEC VT100) aren&#x27;t expressive enough. They lack arrows and round corners. With SVG, you can do more.<p>There are a lot of people who just can&#x27;t use a draw program. Not sure why. I use Inkscape for this sort of thing, or sometimes LibreOffice Draw.
评论 #12623870 未加载
评论 #12623998 未加载
mungoman2超过 8 年前
Looks good. I hope it&#x27;s compatible with the emacs Artist package. <a href="https:&#x2F;&#x2F;www.emacswiki.org&#x2F;emacs&#x2F;ArtistMode" rel="nofollow">https:&#x2F;&#x2F;www.emacswiki.org&#x2F;emacs&#x2F;ArtistMode</a>
评论 #12621896 未加载
评论 #12621806 未加载
captn3m0超过 8 年前
I was currently using <a href="http:&#x2F;&#x2F;shaky.github.bushong.net&#x2F;" rel="nofollow">http:&#x2F;&#x2F;shaky.github.bushong.net&#x2F;</a> for the same purpose. Except, this just did canvas, instead of SVG.
omegote超过 8 年前
Wow, it&#x27;s great! It&#x27;d be cool to have some kind of export option, I thought right-clicking it would make it but it doesn&#x27;t.<p>BTW, a related project of mine to create mind maps in the browser: <a href="https:&#x2F;&#x2F;josetomastocino.github.io&#x2F;mindmapit&#x2F;" rel="nofollow">https:&#x2F;&#x2F;josetomastocino.github.io&#x2F;mindmapit&#x2F;</a>
bholdr超过 8 年前
Great! Perfect complement for <a href="http:&#x2F;&#x2F;asciiflow.com" rel="nofollow">http:&#x2F;&#x2F;asciiflow.com</a>
killercup超过 8 年前
Cool!<p>It seems to not recognize shapes and instead renders them using a bunch of lines, though (just like in the ASCII version). This is visible, at least in Safari 10.
评论 #12621897 未加载
transfire超过 8 年前
Shame those old-school graphics characters aren&#x27;t easily typed (the ones DOS used or even older the ones Commodores supported).
评论 #12626982 未加载
zimbatm超过 8 年前
1. Use <a href="http:&#x2F;&#x2F;asciiflow.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;asciiflow.com&#x2F;</a> to generate diagram<p>2. Use Ascii to SVG
foxhop超过 8 年前
I made an ascii diagram a long while back for my uri parser (<a href="https:&#x2F;&#x2F;bitbucket.org&#x2F;russellballestrini&#x2F;miniuri&#x2F;src" rel="nofollow">https:&#x2F;&#x2F;bitbucket.org&#x2F;russellballestrini&#x2F;miniuri&#x2F;src</a>)<p>The SVG version looks amazing! Great work!<p>Is there any way to easily &quot;download&quot; the result or do I just copy paste the code into a file?<p>I was able to use chrome &quot;developer mode&quot; to inspect the rendered svg tag and copy the element into a file named miniuri.svg<p>Inkscape is happy to load it up! I think providing a &quot;download&quot; button would be useful though.
评论 #12622545 未加载
amelius超过 8 年前
Will something like this become part of Markdown?
评论 #12621923 未加载
评论 #12623205 未加载
评论 #12621902 未加载
thomasweiser超过 8 年前
It&#x27;s built with Elm (<a href="http:&#x2F;&#x2F;elm-lang.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;elm-lang.org&#x2F;</a>)<p>Source code: <a href="https:&#x2F;&#x2F;github.com&#x2F;ivanceras&#x2F;elm-examples&#x2F;tree&#x2F;master&#x2F;elm-bot-lines" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ivanceras&#x2F;elm-examples&#x2F;tree&#x2F;master&#x2F;elm-bo...</a>
userbinator超过 8 年前
What environment cannot render ASCII text but can render SVG? I think converting in the other direction could be a lot more useful.
评论 #12622198 未加载
评论 #12622129 未加载
wlievens超过 8 年前
Reminds me of ditaa which is also pretty awesome. I even use it in an (internal) production tooo to generate a manual.
sprobertson超过 8 年前
Isn&#x27;t SVG already ASCII to SVG?
评论 #12626958 未加载
评论 #12626961 未加载
sehugg超过 8 年前
Funny, I just started using this: <a href="https:&#x2F;&#x2F;github.com&#x2F;dhobsd&#x2F;asciitosvg" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dhobsd&#x2F;asciitosvg</a>
acz超过 8 年前
Reminds me Markdeep <a href="https:&#x2F;&#x2F;casual-effects.com&#x2F;markdeep&#x2F;" rel="nofollow">https:&#x2F;&#x2F;casual-effects.com&#x2F;markdeep&#x2F;</a>
partycoder超过 8 年前
ASCII to dot (graphviz) would be interesting.
评论 #12623345 未加载
hayd超过 8 年前
This would be great as a latex macro (or however it might work), having diagrams inline in the source would be amazing.
nickodell超过 8 年前
Two corner cases:<p><pre><code> +----+ |test| +----+ +------+ | test +--&gt; +------+</code></pre>
xixixao超过 8 年前
Small challenge: Add overtype for OS X users.<p>Also make the divider draggable.<p>Nice work!
j_m_b超过 8 年前
It&#x27;s Foo Bar Baz Qux... not Moo. =)
milen超过 8 年前
Shameless plug: If you&#x27;re on a Mac and want an app to create those ASCII diagrams, check out Monodraw [1]. I&#x27;ve just released an update [2, 3] which allows you to define to define snippets &#x2F; templates which you can easily re-use: seems perfect to define snippets for this website.<p>[1] <a href="https:&#x2F;&#x2F;monodraw.helftone.com" rel="nofollow">https:&#x2F;&#x2F;monodraw.helftone.com</a><p>[2] <a href="https:&#x2F;&#x2F;blog.helftone.com&#x2F;monodraw-snippets-update-sneak-peek&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.helftone.com&#x2F;monodraw-snippets-update-sneak-pee...</a><p>[3] <a href="https:&#x2F;&#x2F;blog.helftone.com&#x2F;monodraw-snippets-update-released&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.helftone.com&#x2F;monodraw-snippets-update-released&#x2F;</a>
评论 #12621954 未加载
评论 #12630658 未加载
EJTH超过 8 年前
This is actually really awesome. Good job!
edw519超过 8 年前
<p><pre><code> WW WW WW HH HH YY YY ?? WW WW WW HH HH YY YY ?? ?? WW WW WW HHHHHHHHH YY YY ?? WW WW WW HH HH YYYY ?? WWWWW HH HH YY ?? WWW HH HH YY ??</code></pre>
评论 #12626355 未加载