diff options
-rw-r--r-- | bin/.placeholder | 0 | ||||
-rwxr-xr-x | bin/arctica-logomatik3000 | 123 | ||||
-rw-r--r-- | debian/arctica-daslogomatik3000.install | 1 | ||||
-rw-r--r-- | debian/control | 12 |
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). |