aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-06-26 20:57:05 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-06-26 20:57:58 +0200
commit8fd3066f2a882491205cdcaf10ee0b7a2498f3e7 (patch)
treed8a9d84867b6fa8dedc4d5f4639399c08372acd6
parent89c174ed338b6aec79bf2eca596ad331b98f6135 (diff)
downloadperl-Arctica-Core-BugOUT-8fd3066f2a882491205cdcaf10ee0b7a2498f3e7.tar.gz
perl-Arctica-Core-BugOUT-8fd3066f2a882491205cdcaf10ee0b7a2498f3e7.tar.bz2
perl-Arctica-Core-BugOUT-8fd3066f2a882491205cdcaf10ee0b7a2498f3e7.zip
Add arctica-logomatik3000. Arctica BugOUT's colorful console frontend.
-rw-r--r--bin/.placeholder0
-rwxr-xr-xbin/arctica-logomatik3000123
-rw-r--r--debian/arctica-daslogomatik3000.install1
-rw-r--r--debian/control12
4 files changed, 136 insertions, 0 deletions
diff --git a/bin/.placeholder b/bin/.placeholder
deleted file mode 100644
index e69de29..0000000
--- a/bin/.placeholder
+++ /dev/null
diff --git a/bin/arctica-logomatik3000 b/bin/arctica-logomatik3000
new file mode 100755
index 0000000..3e88d6d
--- /dev/null
+++ b/bin/arctica-logomatik3000
@@ -0,0 +1,123 @@
+#!/usr/bin/perl -T
+
+################################################################################
+# _____ _
+# |_ _| |_ ___
+# | | | ' \/ -_)
+# |_| |_||_\___|
+# _ _ ____ _ _
+# / \ _ __ ___| |_(_) ___ __ _ | _ \ _ __ ___ (_) ___ ___| |_
+# / _ \ | '__/ __| __| |/ __/ _` | | |_) | '__/ _ \| |/ _ \/ __| __|
+# / ___ \| | | (__| |_| | (_| (_| | | __/| | | (_) | | __/ (__| |_
+# /_/ \_\_| \___|\__|_|\___\__,_| |_| |_| \___// |\___|\___|\__|
+# |__/
+# The Arctica Modular Remote Computing Framework
+#
+################################################################################
+#
+# Copyright (C) 2015-2016 The Arctica Project
+# http://http://arctica-project.org/
+#
+# This code is dual licensed: strictly GPL-2 or AGPL-3+
+#
+# GPL-2
+# -----
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+#
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# AGPL-3+
+# -------
+# This programm is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This programm is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Copyright (C) 2015-2016 Guangzhou Nianguan Electronics Technology Co.Ltd.
+# <opensource@gznianguan.com>
+# Copyright (C) 2015-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+#
+################################################################################
+
+################################################################################
+#
+# A super dirty 5 minute script...
+#
+# Just to display a live view of the TMP /tmp/arctica.log file with some
+# colorful output. Once you kill it of you'd probably want to bust out the
+# mop (reset your term)
+#
+################################################################################
+
+use IO::Handle;
+use Time::HiRes qw( usleep );
+
+print "\x1b\x5b\x48\x1b\x5b\x32\x4a","Starting the DIRTY bugOUT viewer!\n";
+my $start_time = time();
+my $naptime = 200000;
+my $name = $ENV{'USER'};
+$name =~ s/([^a-zA-Z0-9])/sprintf("_%x",ord($1))/egi;
+if ($name =~ /^([a-zA-Z0-9\_]*)$/) {
+ $name = $1;
+ while (1) {
+ if (-f "/tmp/$name-arctica.log") {
+ open (LOGFILE, "/tmp/$name-arctica.log") or die "can't open /tmp/logfile: $!";
+ for (;;) {
+ while (<LOGFILE>) {
+ my $line = $_;
+ my ($ltime,$progid,$lv1,$lv2,$ldata) = $line
+ =~ /^(\d*)\;([a-zA-Z0-9\_\-]{16,})\;(\d{1,2})\;(\d{1,2})\;(.*)$/;
+
+# if ($ldata =~ /Initiating DEBUGGER\.\.\./) {
+ # Clears the screen when a new application initiates bugout.
+# print "\e[0;49;91","m",$line,"\e[0m";
+ # print "\x1b\x5b\x48\x1b\x5b\x32\x4a";
+# } ################################################################################
+
+ if ($ltime > $start_time) {
+ if ($ldata =~ /Initiating DEBUGGER\.\.\./) {
+ print "\e[0;49;97","m","NEW EXECUTION:\t$line","\e[0m";
+ } elsif ($lv1 eq 0) {
+ print "\e[0;49;91","m",$line,"\e[0m";
+ } elsif ($lv1 eq 1) {
+ print "\e[0;49;93","m",$line,"\e[0m";
+ } elsif ($lv1 eq 8) {
+ print "\e[0;49;94","m",$line,"\e[0m";
+ } else {
+ print "\e[0;49;90","m",$line,"\e[0m";
+ }
+ }
+ }
+ usleep($naptime);
+ LOGFILE->clearerr();
+ }
+ } else {
+ print "\x1b\x5b\x48\x1b\x5b\x32\x4a";
+ print "No log file.... trying again in a sec...\n";
+ usleep($naptime);
+ }
+ }
+} else {
+ die("Insane username!");
+}
diff --git a/debian/arctica-daslogomatik3000.install b/debian/arctica-daslogomatik3000.install
new file mode 100644
index 0000000..6e47fe2
--- /dev/null
+++ b/debian/arctica-daslogomatik3000.install
@@ -0,0 +1 @@
+bin/* usr/bin/ \ No newline at end of file
diff --git a/debian/control b/debian/control
index 2ee3274..11b3353 100644
--- a/debian/control
+++ b/debian/control
@@ -21,3 +21,15 @@ Depends:
${misc:Depends},
Description: Core Perl modules for the Arctica Framework
FIXME: Some descripttive text needs to go here...
+
+Package: arctica-logomatik3000
+Architecture: all
+Depends:
+ perl,
+ ${misc:Depends},
+Description: Arctica BugOUT's colorful console frontend
+ A super dirty five minute script...
+ .
+ Just to display a live view of the TMP /tmp/arctica.log file with some
+ colorful output. Once you kill it of you'd probably want to bust out the
+ mop (reset your term).