9 ms·
Show HN: WOPR – A markup for rich terminal reports
- Kinnard 11y agoThis is cool. I've been looking for something like it.
- johng 11y agoVery cool!
- mannycalavera42 11y agoJoshua: Shall we play a game?
- rglover 11y agoGlobal Thermonuclear War
- mannycalavera42 11y agoWouldn't you prefer a good game of chess?
- deleted 11y ago[deleted]
- yaronn01 11y agoHi everyone, I am the author. Feel free to ask me anything or come up with suggestions!
- raindev 11y agoWhy do you decided to use XML as the basic format?
- yaronn01 11y agoXML 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?
- deleted 11y ago[deleted]
- yaronn01 11y agoIMO 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.
- mburns 11y ago>XML is a standard format for markup (e.g. HTML). XHTML is maybe the most hated incarnation of HTML, and is no longer encouraged.
- oneeyedpigeon 11y agoYou can still write xml-compliant HTML; whether it's called XHTML or not is splitting hairs. You still get all the benefits of a very rich toolset for document preparation. I work on a site that makes heavy use of xslt and works with xml-compliant HTML as input/output.
- chazu 11y agoVery cool indeed - pair this with 'watch' and you have instant ASCII monitoring tools implemented as http endpoints.
- ratboy666 11y agoHaven't tried this. Just want to know -- what advantage does this give over using gnu plot with sixel output? I can see the advantage over tek 4010 (this could be dynamic). If this is static (again, haven't tried yet), with multiple pages, why not just use tek 4010? I also don't understand the admonish to use something other than xterm. What is the issue that was observed? Ratboy
- yaronn01 11y agothis 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 https://github.com/yaronn/blessed-contrib) but also about having a declarative format, and even consuming it with curl.
- yaronn01 11y agoAnother example is US weather map: $> a=$(curl -Ls "bit.ly/1OuRPDJ"); curl --data "$a" "tty.zone?cols=${COLUMNS}"
- ape4 11y agoLong live the TUI!
- OJFord 11y agoFor now I'm categorising this (mentally, I mean) under "awesome, but idky useful". I'd love to be told I'm wrong though. It's the best thing when you discover how to usefully use awesome but hitherto useless tools :p
- yaronn01 11y agoone use case is when ssh-ing machines you can see visual reports rather than text and numbers (think cpu metrics or app specific).
- anonbanker 11y agoI'd want to combine with pigshell[0] 0. http://pigshell.com/v/0.6.4/ http://pigshell.com/v/0.6.4/
- gavazzy 11y agoThis would be useful for AWS instances where you don't want to install a desktop environment on the server.
- atmosx 11y agoWhy would you wanna do that (install a desktop env)?!
- kbenson 11y agoTo support graphical installers and specific service administrators that are used to using a GUI on a server? I knew an Oracle DBA once that always wanted X and and Gnome installed on the the RHEL DB servers, it was what he knew and was comfortable with when installing Oracle.
- sklogic 11y agoImpressive. I keep using bare xterm since it still supports Tektronix emulation (but, unfortunately, no Regis nor Sixel). This seems like a viable substitution for all three.
- LukeShu 11y agoxterm actually does support ReGIS and Sixel graphics! However, it must be compiled with --enable-regis-graphics` (or `--enable-sixel-graphics`); and it's likely that your distro didn't compile it with those flags. If they did, you can get ReGIS support by running xterm in VT340 mode (`-ti vt340`).
- sklogic 11y agoGreat! Did not know that, thought that only the DEC version could do it.
- ivanceras 11y agoI didn't know, you could display something like that in a terminal. And why tty.zone maps to that wopr site?
- yaronn01 11y agoThat's a shortcut for the wopr page
- astro1138 11y agoI wonder if it's manageable to build a converter to SVG with just XSLT?
- Bud 11y agoAbsolutely fantastic name choice; kudos.
- bbrock25 11y agoheh, this is pretty awesome. I literally just started hacking with blessed over the weekend. Nice work!
- jaxb 11y agoreminds me of http://zachholman.com/spark/ http://zachholman.com/spark/ (spark-line graphs using unicode graph chars)