From: djk Date: Mon, 26 Apr 1999 19:39:56 +0000 (+0000) Subject: added export_opernam.pl X-Git-Tag: R_1_25 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=2b06ba2a27bc1bdc8654c3fc35224b9b6e07b0db;p=spider.git added export_opernam.pl --- diff --git a/Changes b/Changes index 8c985771..38d12170 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,17 @@ +26Apr99======================================================================= +1. added set/user command as a hack, please use this with care, there is +very little checking. +2. added export_opernam.pl which is a basic reader of AK1A opernam.dat files +to stdout 25Apr99======================================================================= 1. Fixed problem with filtered spots not coming out. 2. Added the possibility of filtering on channel callsign +20Apr99======================================================================= +1. altered order of undefing and closing of user file in an attempt to make +corruptions/missing users less likely. +2. made messages that are addressed to the node call appear to the alias call +3. check dates much more rigourously. +4. ignore SIGTERM and SIGINT during shutdown of the cluster 15Mar99======================================================================= 1. added $actiondata to filter line to allow per action data such as no of hops 2. fixed a silly problem in talk for non-existant callsigns diff --git a/perl/export_opernam.pl b/perl/export_opernam.pl new file mode 100755 index 00000000..2107c1aa --- /dev/null +++ b/perl/export_opernam.pl @@ -0,0 +1,32 @@ +#!/usr/bin/perl +# +# export a standard ak1a opernam.dat file into CSV format. +# +# Copyright (c) 1999 Dirk Koopman G1TLH +# +# + +sub export +{ + my $rec = shift; + my @f = unpack "SA13A23SA12A6SSSSA1CSSSA1A80A1A13A1", $rec; + my $f; + + # clean each field + for $f (@f) { + my @a = split m{\0}, $f; + $f = $a[0] if @a > 1; + } + + print join '|', @f; + print "\n"; +} + +die "Need an filename" unless @ARGV; +open IN, $ARGV[0] or die "can't open $ARGV[0] ($!)"; + +while (sysread(IN, $buf, 196)) { + export($buf); +} +close IN; +exit(0);