Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Texttop – Interactive desktop rendered in TTY with ASCII (github.com/tombh)
114 points by tombh on May 21, 2016 | hide | past | favorite | 29 comments

May be image quality could be improved by using whole unicode set, rather than just plain ASCII. E.g. braille-fonts, like in blessed-contrib[1].

[1] https://github.com/yaronn/blessed-contrib

Aw, this is great but node.js is putting me off it :/ I was hoping I wouldn't have to install something so heavy for such a small utility...

That's interesting, but not very well-suited to real-time dashboards, is it? Seems to be for one-offs.

curling the markup is not for realtime. sometimes you can get away with curling in a loop with some sleep, and depending on the latency / scale you will get the same effect. however blessed-contrib can also be used as a server side component where clients curl for its endpoint (which is different than curling a static markup). that way it can return a live stream of data. you would use the same approach as https://github.com/yaronn/wopr/blob/master/server/server.js#... where your present method implementation will run in some loop / timeout and keep sending data (by calling screen.render).

Wow, that world map looks really good. Good suggestion, thanks.

Looks rather nice, reminiscent of drawing using Teletext (e.g. http://teletextart.co.uk/, http://www.bbcbasic.co.uk/bbcwin/manual/bbcwinh.html).

You don't even need to do that, just using a box-drawing character where half the character is black (U+2580 or U+2584) would double your vertical resolution.

Hiptext supports this: https://github.com/jart/hiptext/blob/d50329e3b975ffac0209c0a... But it's crashing when I run in Alpine :/

well, if you keep adding characters it won't be worth the effort, just sending pixels (or pixel groups) would be cheaper.

I think the idea was to use a wider range of characters, not a larger quantity of characters.

This is so cool, very nice work! :D

I've been playing with writing little custom SSH server stuff recently as well—try this for example:

ssh hello.dn.ht

One thing I've been testing to get some extra vertical resolution on graphical stuff is the unicode half block character (https://en.wikipedia.org/wiki/Block_Elements) with a separate foreground and background color. Works ok, but background color can bleed through depending on the font you use.

Haha Wasn't expecting that, very cool! How did you do that? Have you some code somewhere? Thanks for the praise :) A big part of pushing forward with this was seeing the quality of @jart's hiptext[1] renderings, I find it creates much more aesthetically pleasing ASCII images than libcaca and libaa. It only uses those block elements, like your webcam video.

[1] https://github.com/jart/hiptext

Ok yeah wow, hiptext's output looks pretty fantastic. :)

I'm using my own text webcam thing: https://github.com/dhotson/txtcam .. not too fancy, just using greyscale with some shading characters to do some basic "dithering".

Also, if you're on Mac OSX and using iTerm2 version 3, you might be interested in its 24bit colour support. It's not that widely supported yet in other terminals unfortunately though: https://gist.github.com/XVilka/8346728

Oh, that textcam code isn't too complicated and you get a really good effect from it.

I never even knew that there was true colour support in terminals, let alone how many terminals support it! Hmm, so I'd need to figure out if SSH sends the terminal's ability to render true colour. And then also update hiptext. It would make a really big difference to the "readability" of the texttop output.

With OpenSSH 7.2p2, I get:

    ssh_dispatch_run_fatal: Connection to port 22: invalid format
But I see "Hello! :D" with ncat :)

I implemented this neat trick that gives 4x spatial and 2x color resolution using Unicode Block characters



I think it could work great for your software.

Is that similar to this do you think?https://github.com/jart/hiptext/blob/d50329e3b975ffac0209c0a... Where `kUpperHalfBlock = L'\u2580'`

Because Hiptext is already supporting it, but when I enable the flag to support it, it crashes in Alpine, but not in my local env :/

OMG, no, it's not the same, you go even further with 4 colours per char!! https://github.com/blitzcode/term-gfx/blob/master/src/main.r...

You still only get 2 colors (bg & fg), but you get to chose for each of the 4 sub-pixel, it's a bit like DXTC texture compression

Forgot to put the word "interactive" in the title. Edit: didn't know you could edit the title after submission.

It's probably beside the point, you could double the number of pixels and foremost make them square if you used fore- and background color for U+2584 or go even further with U+2596 to U+259F.

Hiptext supports this: https://github.com/jart/hiptext/blob/d50329e3b975ffac0209c0a... But it's crashing when I run in Alpine :/ I have hope because it works fine in my local Arch/ZSH env :)

Cool idea but I haven't been able to get it working. Docker is proving to be a real drag to install. Furthermore in the GIF on the README the text is illegible.

The text only becomes legible at very high zoom levels. I needed to strike a balance when recording that GIF, so I didn't zoom in all the way.

NX / X2Go

Had never heard of them, thanks. Do you have experience with them over connections that drop, eg; travelling on a train, or connections as low as 3kbps?

They work at least decently over connections that drop - I can't remember if they autoconnect or keep things alive like mosh or if it works more like screen. Low bandwidth is surprisingly good - not sure if I've gone as low as 3Kbps but I do remember working out of a hotel room in China to a Linux machine in Iceland over NX. The regular web was hardly usable but NX was fine!, even good enough to browse the web over.

Wow, okay, that's good to know, another way around the Great Firewall. I will have to give NX a spin.

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