download dxoldtonew.pl
Language: Perl
Copyright: (c) 1998-2003 Dirk Koopman G1TLH
LOC: 27
Project Info
DXSpider DX Cluster System(dxspider)
Server: SourceForge
Type: cvs
...pider\dxspider\spider\perl\
   AGWConnect.pm
   AGWMsg.pm
   AnnTalk.pm
   BadWords.pm
   Bands.pm
   BBS.pm
   Buck.pm
   call.pl
   callbot.pl
   Chain.pm
   cluster.pl
   CmdAlias.pm
   connect.pl
   console.pl
   Console.pm
   convert_users.pl
   convkeps.pl
   create_prefix.pl
   create_qsl.pl
   create_sysop.pl
   create_usdb.pl
   DB0SDX.pm
   DXBearing.pm
   dxcc.pl
   DXChannel.pm
   DXCommandmode.pm
   DXConnect.pm
   DXCron.pm
   DXDb.pm
   DXDebug.pm
   DXDupe.pm
   DXHash.pm
   DXLog.pm
   DXLogPrint.pm
   DXM.pm
   DXMsg.pm
   dxoldtonew.pl
   DXProt.pm
   DXProtout.pm
   DXProtVars.pm
   DXSql.pm
   DXUser.pm
   DXUtil.pm
   DXVars.pm.issue
   DXXml.pm
   Editable.pm
   export_opernam.pl
   ExtMsg.pm
   Filter.pm
   ForkingServer.pm
   gen_usdb_data.pl
   Geomag.pm
   hlptohtml.pl
   importkeps.pl
   importwwv.pl
   Internet.pm
   IntMsg.pm
   Investigate.pm
   IsoTime.pm
   Julian.pm
   K4UTE.pm
   Keps.pm
   Listeners.pm
   Local.pm
   lock_nodes.pl
   log2csv.pl
   LRU.pm
   Minimuf.pm
   MiscLog.pm
   Mrtg.pm
   Msg.pm
   PC.pm
   Prefix.pm
   process_ursa.pl
   Prot.pm
   proto.html
   QRZ.pm
   QSL.pm
   RingBuf.pm
   Route.pm
   RouteDB.pm
   Script.pm
   Spot.pm
   spot2csv.pl
   Sun.pm
   talias.pl
   Thingy.pm
   Timer.pm
   UDPMsg.pm
   update_sysop.pl
   USDB.pm
   VE7CC.pm
   Verify.pm
   WCY.pm
   winclient.pl
   y2k.sh

#!/usr/bin/perl
#
# convert an AK1A DX.DAT file to comma delimited form
#
# PLEASE BE WARNED:
#
# This routine is really designed for archive data. It will create and add to 
# standard DXSpider spot files. If those spot files already exist (because you
# were running DXSpider at the same time as collecting this 'old' data) then
# this will simply append the data onto the end of the appropriate spot file
# for that day. This may then give strange 'out of order' results when viewed
# with the show/dx command
#
# $Id: dxoldtonew.pl,v 1.4 2003/12/29 20:37:52 minima Exp $
#
# Copyright (c) 1998-2003 Dirk Koopman G1TLH
#

# search local then perl directories
BEGIN {
	# root of directory tree for this system
	$root = "/spider"; 
	$root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
	
	unshift @INC, "$root/perl";	# this IS the right way round!
	unshift @INC, "$root/local";
}

use DXUtil;
use Spot;
use Prefix;

$ifn = "$root/data/DX.DAT";
$ifn = shift if @ARGV;
print "Using: $ifn as input... \n";

sysopen(IN, $ifn, 0) or die "can't open $ifn ($!)";

Prefix::init();
Spot::init();

while (sysread(IN, $buf, 86)) {
  ($freq,$call,$date,$time,$comment,$spotter) = unpack 'A10A13A12A6A31A14', $buf;
#  printf "%-13s %10.1f %s %s by %s %s\n", $call, $freq, $date, $time, $spotter, $comment;
  
  $dt = cltounix($date, $time);
  $comment =~ s/^\s+//o;
  if ($dt ) {
	  my @spot = Spot::prepare($freq, $call, $dt, $comment, $spotter);
	  Spot::add(@spot);
  } else {
    print "ERROR: $call $freq $date $time by $spotter $comment\n";
  }
}

close(IN);

About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us