projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
various changes to the admin manual and the first version of the CVS changes file
[spider.git]
/
perl
/
dxoldtonew.pl
diff --git
a/perl/dxoldtonew.pl
b/perl/dxoldtonew.pl
index d5cb4c6e6121341534340fdfbb72a545162126ae..9ad356054b2ed3b9e5146c5a50ee5bfb063148c4 100755
(executable)
--- a/
perl/dxoldtonew.pl
+++ b/
perl/dxoldtonew.pl
@@
-5,21
+5,26
@@
#
use Date::Parse;
#
use Date::Parse;
-use spot;
+use Spot;
+use Prefix;
sysopen(IN, "../data/DX.DAT", 0) or die "can't open DX.DAT ($!)";
open(OUT, ">../data/dxcomma") or die "can't open dxcomma ($!)";
sysopen(IN, "../data/DX.DAT", 0) or die "can't open DX.DAT ($!)";
open(OUT, ">../data/dxcomma") or die "can't open dxcomma ($!)";
-spot->init();
+Prefix::load();
+
+$fn = Spot::prefix();
+system("rm -rf $fn/*");
while (sysread(IN, $buf, 86)) {
($freq,$call,$date,$time,$comment,$spotter) = unpack 'A10A13A12A6A31A14', $buf;
while (sysread(IN, $buf, 86)) {
($freq,$call,$date,$time,$comment,$spotter) = unpack 'A10A13A12A6A31A14', $buf;
- $date =~ s/^\s*(\d+)-(\w\w\w)-(19\d\d)$/$1 $2 $3/og;
- $time =~ s/^(\d\d)(\d\d)Z$/$1:$2 +0000/;
- $d = str2time("$date $time");
+ $d = $date =~ s/^\s*(\d+)-(\w\w\w)-(19\d\d)$/$1 $2 $3/o;
+ $t = $time =~ s/^(\d\d)(\d\d)Z$/$1:$2 +0000/o;
+ $dt = undef;
+ $dt = str2time("$date $time") if $d && $t;
$comment =~ s/^\s+//o;
$comment =~ s/^\s+//o;
- if ($d) {
-
spot->new($freq, $call, $d
, $comment, $spotter);
+ if ($d
t
) {
+
Spot::add($freq, $call, $dt
, $comment, $spotter);
} else {
print "$call $freq $date $time\n";
}
} else {
print "$call $freq $date $time\n";
}