
Show HN: WOPR – A markup for rich terminal reports - yaronn01
https://github.com/yaronn/wopr
======
OJFord
For 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
one use case is when ssh-ing machines you can see visual reports rather than
text and numbers (think cpu metrics or app specific).

------
yaronn01
Hi everyone, I am the author. Feel free to ask me anything or come up with
suggestions!

~~~
raindev
Why do you decided to use XML as the basic format?

~~~
yaronn01
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?

~~~
mburns
>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
You 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.

~~~
merlincorey
Maybe "SGML" would have been a better descriptor?

------
mannycalavera42
Joshua: Shall we play a game?

~~~
rglover
Global Thermonuclear War

~~~
mannycalavera42
Wouldn't you prefer a good game of chess?

~~~
jzawodn
Later. Let's play Global Thermonuclear War.

~~~
beobab
A strange game: The only winning move is not to play. :)

------
yaronn01
Another example is US weather map:

$> a=$(curl -Ls "bit.ly/1OuRPDJ"); curl --data "$a" "tty.zone?cols=${COLUMNS}"

------
chazu
Very cool indeed - pair this with 'watch' and you have instant ASCII
monitoring tools implemented as http endpoints.

------
sklogic
Impressive. 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
xterm 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
Great! Did not know that, thought that only the DEC version could do it.

------
ratboy666
Haven'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
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](https://github.com/yaronn/blessed-
contrib)) but also about having a declarative format, and even consuming it
with curl.

------
gavazzy
This would be useful for AWS instances where you don't want to install a
desktop environment on the server.

~~~
atmosx
Why would you wanna do that (install a desktop env)?!

~~~
kbenson
To 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.

------
Kinnard
This is cool. I've been looking for something like it.

~~~
johng
Very cool!

------
ivanceras
I didn't know, you could display something like that in a terminal. And why
tty.zone maps to that wopr site?

~~~
yaronn01
That's a shortcut for the wopr page

------
Bud
Absolutely fantastic name choice; kudos.

------
jaxb
reminds me of [http://zachholman.com/spark/](http://zachholman.com/spark/)
(spark-line graphs using unicode graph chars)

------
astro1138
I wonder if it's manageable to build a converter to SVG with just XSLT?

------
ape4
Long live the TUI!

------
bbrock25
heh, this is pretty awesome. I literally just started hacking with blessed
over the weekend. Nice work!

