There are some valid use cases here, I hope this will not affect users of wopr (https://github.com/yaronn/wopr).
HN user
yaronn01
https://twitter.com/YaronNaveh
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).
To visualize weather in the terminal you can also use:
$> a=$(curl -Ls "bit.ly/1OuRPDJ"); curl --data "$a" "tty.zone?cols=${COLUMNS}"
That's a shortcut for the wopr page
one use case is when ssh-ing machines you can see visual reports rather than text and numbers (think cpu metrics or app specific).
Another example is US weather map:
$> a=$(curl -Ls "bit.ly/1OuRPDJ"); curl --data "$a" "tty.zone?cols=${COLUMNS}"
IMO JSON is less readable for this kind of document. XML is more explicit (at the cost of being chatty) but it's actually good for markup. For example nesting is easier to visually manage with XML due to tooling and explicitness of closing tags.
JSON is good for smaller objects you normally use during coding where you do not want the format to get in your way. Here I actually do want a very explicit format as it's the main thing.
this uses xterm, so it's more accessible to most users than the other alternatives you mentioned. also note wopr is not just about the graphs (like https://github.com/yaronn/blessed-contrib) but also about having a declarative format, and even consuming it with curl.
XML is a standard format for markup (e.g. HTML). When XML is used where it shouldn't (object serialization) it adds complexity. Here it signals that creating a report is as simple (or at least as standard) as creating HTML. What other format you had in mind?
Hi everyone, I am the author. Feel free to ask me anything or come up with suggestions!
Shutdownify github page now leads to 404. You would think they should know better than that. Stay classy, S9Y.
True, thought in some parts of the world it's not sabbath anymore
For me the main thing is not how to sleep after a day of coding but how to stop the day of coding from becoming a night of coding. It's really tempting to slide into the night when I'm in my zone.
Otherwise f.lux is a must though it does not work on chromebook or ipad. Nevertheless when I'm really bothered with coding the only thing that will help is melatonin. I take it a few hours before going to bed and it ensures I can sleep reasonably but it makes me too tired to be social late nights and early mornings. The uvex glasses did not have a huge effect on me.
blessed is an amazing engineering work! I hoped the name blessed-contrib to show the project roots.
termui is built upon termbox-go in a similar way that blessed-contrib builds on blessed, which is why I found them similar.
HN discussion about the Node.JS implementation (blessed-contrib) a couple of months ago:
in the node-drawille dependency:
I was asking myself the same yesterday... I think I have memories from an old platform I used a few years ago that had a "gauge". Maybe Delphi?
I plan to add more samples. Meanwhile you can use a module like this to get the data for you: https://github.com/kgryte/node-metrics-os
what do you mean? You are right that in this sample I have not changed the values of the X axis but the api allows you to change its values anytime.
I considered something like this but it felt like cheating. The beauty of standard ascii/ansi is that it is available in any terminal without any installation and it also has the same aesthetics / resolution as the text you type. Of course I will watch after iTerm2 progress.
Initially I used chart.js to paint the charts but I had to introduce it so many flags (no label Transformation, sensitive spacing etc) that I reverted to do it myself (even though I also have a working version with an altered chart.js).
I am using node-drawville which provides an Html5 canvas Api abstraction over the terminal. D3 uses svg so it is not adequate. However I did saw a port of d3 to canvas which I didn't had time to check.
Pull requests are more than welcome!
It's easy to do. The grid layout is optional. You can give relative and absolute positions. The first code sample in the readme shows something like this (though position is implicit there). You can also read about blessed (=ncurses for node) which this project is implemented as an extention of.
Great idea, I will add it to the list.
It took me a few weeks, one of them was fully on this project. Most of the time was spent on investigating and improving the different canvas implementations (map and charts work on an html5 canvas abstraction). A lot of the time was spent on false directions but this is expected. One particular direction was reusing Web js libs to do the charting logic but it turned that it is easy enough to implement on my own.
In my day job I author web dashboards (working in HP on performance testing tools) so I thought it would be cool to have those dashboards directly in the terminal. But I would have done it even without this incentive. I do a lot of projects just because they inspire me, check out GifW00t! https://github.com/yaronn/GifW00t
Hi everyone, I am the author. Let me know if you have any questions or ideas.
I'm the Author. Yes, data in this sample is random or hard coded.
Well they're still recruiting for their API team but I guess it is an internal API now: http://jobs.netflix.com/jobs.php?id=NFX01289
I recently did something similar with official javascript APIs:
http://s3-us-west-2.amazonaws.com/anigif100/pacman/index.htm...