Changeset 379 for trunk


Ignore:
Timestamp:
Jan 4, 2018, 3:35:29 PM (6 years ago)
Author:
g7moreau
Message:
  • Add option --no-header for exportsw format txt
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r378 r379  
    30333033   my $graph_shift  = 1;
    30343034   my $way          = 'all';
     3035   my $no_header;
    30353036
    30363037   GetOptions(
    3037       'format|f=s' => \$format,
    3038       'modulo|m=i' => \$graph_modulo,
    3039       'shift|s=i'  => \$graph_shift,
    3040       'way|w=s'    => \$way,
     3038      'format|f=s'  => \$format,
     3039      'modulo|m=i'  => \$graph_modulo,
     3040      'shift|s=i'   => \$graph_shift,
     3041      'way|w=s'     => \$way,
     3042      'no-header|H' => \$no_header,
    30413043      );
    30423044
     
    30483050   $format = 'txt' if not defined $possible_format{$format};
    30493051
    3050    $possible_format{$format}->(modulo => $graph_modulo, shift => $graph_shift, way => $way, @ARGV);
     3052   $possible_format{$format}->(modulo => $graph_modulo, shift => $graph_shift, way => $way, 'no-header' => $no_header, @ARGV);
    30513053   return;
    30523054   }
     
    30553057sub cmd_exportsw_txt {
    30563058   my %args = (
    3057       way   => 'all',
    3058       list  => 0,
     3059      'way'       => 'all',
     3060      'no-header' => undef,
    30593061      @_);
    30603062
     
    30803082         }
    30813083
    3082       print $tb_desc->title();
    3083       print $tb_desc->rule('-');
     3084      print $tb_desc->title()   unless $args{'no-header'};
     3085      print $tb_desc->rule('-') unless $args{'no-header'};
    30843086      print $tb_desc->body();
    30853087      $tb_desc->clear;
     
    31133115      my @colrange = map {scalar $tb_child->colrange($_)} (0 .. 4); # force scaler context
    31143116      $tb_child->add(map {' ' x $_} reverse @colrange);             # add empty line to force symetric table output
    3115       print $tb_child->title();
    3116       print $tb_child->rule('-');
     3117      print $tb_child->title()   unless $args{'no-header'};
     3118      print $tb_child->rule('-') unless $args{'no-header'};
    31173119      print $tb_child->body(0, $tb_child->body_height() - 1);       # remove last fake line
    31183120      $tb_child->clear;
     
    31443146      my @colrange = map {scalar $tb_parent->colrange($_)} (0 .. 4); # force scaler context
    31453147      $tb_parent->add(map {' ' x $_} reverse @colrange);             # add empty line to force symetric table output
    3146       print $tb_parent->title();
    3147       print $tb_parent->rule('-');
     3148      print $tb_parent->title()   unless $args{'no-header'};
     3149      print $tb_parent->rule('-') unless $args{'no-header'};
    31483150      print $tb_parent->body(0, $tb_parent->body_height() - 1);      # remove last fake line
    31493151      $tb_parent->clear;
Note: See TracChangeset for help on using the changeset viewer.