chiark / gitweb /
routesearch: show route distances
[ypp-sc-tools.main.git] / yarrg / web / query_routesearch
index 6877536b14b20068ecda828c8a72a7364c58ecc1..b9b734806968750d406d0f52eb4a5735e3ecbc1b 100644 (file)
@@ -166,11 +166,10 @@ while (<$fh>) {
 <% $_ |h %>
 <%perl>
        }
-       next unless
-  m/^ \@ *\d+ ([ap])\# *\d+ \|.*\| *\d+ +(\d+) +(\d+) *\| ([0-9 ]+)$/;
-       my ($ap,$isles) = (uc $1,$4);
+       next unless m/^ \@ *\d+ ([ap])\# *\d+ \|.*\| *(\d+)lg *\| *\d+ +(\d+) +(\d+) *\| ([0-9 ]+)$/;
+       my ($ap,$isles) = (uc $1,$5);
        next if $results{$ap} && %{$results{$ap}} >= $maxcountea;
-       my $item= { A => $2, P => $3 };
+       my $item= { A => $3, P => $4, Leagues => $2 };
        my (@i, @a);
        foreach (split / /, $isles) {
                my ($name,$arch)= $isleinfo->($_);
@@ -203,12 +202,14 @@ if ($qa->{'debug'}) {
 <tbody>
 <tr>
 <th colspan=2>Profit
+<th>Dist.
 <th>Archipelagoes
 <th colspan=3>Route
 <tr>
 <th>Abs.
 <th>Per.lg.
 <th>
+<th>
 <th>Start
 <th>Via
 <th>Finish
@@ -222,6 +223,7 @@ if ($qa->{'debug'}) {
 <tr class="datarow<% $datarow %>">
 <td align=right><% $item->{A} |h %>
 <td align=right><% $item->{P} |h %>
+<td align=right><% $item->{Leagues} |h %>
 <td align=left><% join ', ', @{ $item->{Archs} } |h %>
 <td align=left><% $item->{Start} |h %>,
 <td align=left><% join ' ', map { $_.',' } @{ $item->{Vias} } |h %>