May the Orchestration be with you

Recently together with a friend of mine we were discussing the most hot topic these days – the new Star Wars movie. He showed me this uber cool site http://www.asciimation.co.nz/ that plays Episode IV in ASCII. He also showed me that there is a more geeky version of it using telnet http://www.blinkenlights.nl/services.html. So it got me thinking, I have never used the Telnet client part of vRO’s Net plugin + I am a Star Wars fan, what a great opportunity! Streaming Star Wars Episode IV in vRO’s logs:

vRO star wars

The workflow isn’t really much, it is just a single scripting activity that  uses the TelnetClient to connect to towel.blinkenlights.nl and prints the data from the stream. Credits for the original work goes to

Simon Jansen – http://www.asciimation.co.nz/ (The beautiful ASCII scenes from Episode IV)
Sten Spans – http://www.blinkenlights.nl/services.html (Telnetification)
Mike Edwards (Terminal Tricks)

I only did this for fun, the workflow is not intended to be used for anything other than that and I doubt that the vRO team will even approve having such long running workflow (20 minutes) with TelnetClient’s waitForData without proper waiting timers that release the current working thread 🙂

In any case if you want to run in on your own vRO server, you can download the package from FlowGrab. Or just use this scripting:

var telnetClient = new TelnetClient();
System.log("Connecting...");
telnetClient.connect("towel.blinkenlights.nl");
System.log("Connected!");

var i = 0;
var MAXIMUM_TRIES_WITHOUT_DATA = 50;

while(telnetClient.isAvailable() && i < MAXIMUM_TRIES_WITHOUT_DATA) {
var dataAvailable = telnetClient.waitForData(200);
if (dataAvailable) {
System.log(telnetClient.receiveAsString());
i = 0;
} else {
i++;
}
}

System.log("Disconnecting...");
telnetClient.disconnect();

Note: Have in mind that vRO client’s log viewer does not support monospaced fonts, and the ASCII art is not aligned well, this is why most of the demo is shown in the shell.

 

One comment

  1. Лени Кирилов · December 7, 2015

    The force is strong with this post!

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s