-
Notifications
You must be signed in to change notification settings - Fork 0
/
testparse.pl
executable file
·40 lines (30 loc) · 1 KB
/
testparse.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/perl
use strict;
use warnings;
use lib "/var/www/opdef.andybev.com";
use ADBOS::Parse;
use ADBOS::DB;
use Data::Dumper;
my $parser = ADBOS::Parse->new();
my $message = do { local $/; <STDIN> };
if (my $values = $parser->parse($message))
{
# my $shipid = $db->shipByName($values->{ship});
# my $opdefs_id = $db->opdefStore($values, $shipid);
# my $signals_id = $db->signalStore($values->{rawtext}, $opdefs_id, $values->{sitrep});
# $db->signalAssociateOpdef($signals_id, $opdefs_id);
print "Number year: $values->{number_year}\n";
print "Number: $values->{number_serial}\n";
# print "$values->{assistance_port}\n";
# print "ERG: $values->{erg_code}\n";
# print "Line 5: $values->{line5}\n";
# print "Defect: $values->{defect}\n";
# print "Repair int: $values->{repair_int}\n";
#print "Assistance: $values->{assistance}\n";
# print "MATDEM: $values->{matdem}\n" if $values->{matdem};
# print "Remarks: $values->{remarks}\n";
} else {
print "Failed\n";
# die "Parse failed\n";
}
exit;