lilalo

changeset 81:d9a700d48bef

Рисунки сделанные с помощью l3-shot отображаются в журнале.
Всплывающая подсказка с информацией о команде
появляется при подведении курсора мыши к первому знаку приглашения
author devi
date Thu Feb 23 22:26:38 2006 +0200 (2006-02-23)
parents d28dda8ea18f
children 7fb205f2c514
files TODO l3-agent l3-frontend l3config.pm
line diff
     1.1 --- a/TODO	Mon Feb 20 17:52:40 2006 +0200
     1.2 +++ b/TODO	Thu Feb 23 22:26:38 2006 +0200
     1.3 @@ -1,3 +1,11 @@
     1.4 +
     1.5 +FIX:
     1.6 +
     1.7 +
     1.8 +    Теряется информация о tty
     1.9 +
    1.10 +
    1.11 +
    1.12  TODO LIST
    1.13  
    1.14  lm-report:
     2.1 --- a/l3-agent	Mon Feb 20 17:52:40 2006 +0200
     2.2 +++ b/l3-agent	Thu Feb 23 22:26:38 2006 +0200
     2.3 @@ -228,9 +228,10 @@
     2.4      my $cline_re2_v2 = qr/$cline_re_v2_base$/sx;
     2.5  
     2.6      my $vt = Term::VT102->new ( 'cols' => $Config{"terminal_width"}, 
     2.7 -                    'rows' => $Config{"terminal_height"});
     2.8 -    my $cline_vt = Term::VT102->new ('cols' => $Config{"terminal_width"}, 
     2.9 -                    'rows' => $Config{"terminal_height"});
    2.10 +                                'rows' => $Config{"terminal_height"});
    2.11 +    my $cline_vt = Term::VT102->new (
    2.12 +                                'cols' => $Config{"terminal_width"}, 
    2.13 +                                'rows' => $Config{"terminal_height"});
    2.14  
    2.15      my $converter = Text::Iconv->new($Config{"encoding"}, "utf-8")
    2.16          if ($Config{"encoding"} && $Config{"encoding"} !~ /^utf-8$/i);
    2.17 @@ -484,7 +485,7 @@
    2.18  
    2.19  
    2.20                  if ($Config{verbose} =~ /y/i) {
    2.21 -                    print "|   " if $commandlines_loaded % 15 == 1;
    2.22 +                    print "\n|   " if $commandlines_loaded % 15 == 1;
    2.23                      print " ",$cl{"last_command"};
    2.24                  }
    2.25  
    2.26 @@ -578,11 +579,12 @@
    2.27      }
    2.28  
    2.29      @Command_Lines_Index = sort {
    2.30 -        $Command_Lines[$index[$a]]->{"time"} <=> $Command_Lines[$index[$b]]->{"time"} ||
    2.31 -        $Command_Lines[$index[$a]]->{"day"} cmp $Command_Lines[$index[$b]]->{"day"} ||
    2.32 -        $Command_Lines[$index[$a]]->{"hour"} <=> $Command_Lines[$index[$b]]->{"hour"} ||
    2.33 -        $Command_Lines[$index[$a]]->{"min"} <=> $Command_Lines[$index[$b]]->{"min"} ||
    2.34 -        $Command_Lines[$index[$a]]->{"sec"} <=> $Command_Lines[$index[$b]]->{"sec"}
    2.35 +        defined($Command_Lines[$index[$a]]->{"time"}) 
    2.36 +        ?  $Command_Lines[$index[$a]]->{"time"} <=> $Command_Lines[$index[$b]]->{"time"} 
    2.37 +        :  $Command_Lines[$index[$a]]->{"day"} cmp $Command_Lines[$index[$b]]->{"day"} 
    2.38 +        || $Command_Lines[$index[$a]]->{"hour"} <=> $Command_Lines[$index[$b]]->{"hour"}
    2.39 +        || $Command_Lines[$index[$a]]->{"min"} <=> $Command_Lines[$index[$b]]->{"min"} 
    2.40 +        || $Command_Lines[$index[$a]]->{"sec"} <=> $Command_Lines[$index[$b]]->{"sec"}
    2.41      } @index;
    2.42  
    2.43      print "finished\n" if $Config{"verbose"} =~ /y/;
     3.1 --- a/l3-frontend	Mon Feb 20 17:52:40 2006 +0200
     3.2 +++ b/l3-frontend	Thu Feb 23 22:26:38 2006 +0200
     3.3 @@ -231,7 +231,7 @@
     3.4      my $datafile = $_[0];
     3.5  
     3.6      open (CLASS, $datafile)
     3.7 -        or die "Can't open file of the class ",$datafile,"\n";
     3.8 +        or die "Can't open file with xml lablog ",$datafile,"\n";
     3.9      local $/;
    3.10      $data = <CLASS>;
    3.11      close(CLASS);
    3.12 @@ -250,7 +250,7 @@
    3.13      my $datafile = $_[0];
    3.14  
    3.15      open (CLASS, $datafile)
    3.16 -        or die "Can't open file of the class ",$datafile,"\n";
    3.17 +        or die "Can't open file with xml lablog ",$datafile,"\n";
    3.18      local $/;
    3.19      my $data = <CLASS>;
    3.20      close(CLASS);
    3.21 @@ -323,6 +323,12 @@
    3.22  #  Если несколько пометок (notes) идут подряд, 
    3.23  #  они все объединяются
    3.24  
    3.25 +        if ($$cl->{cline} =~ /l3shot/) {
    3.26 +                if ($$cl->{output} =~ m@Screenshot is written to.*/(.*)\.xwd@) {
    3.27 +                    $$cl->{screenshot}="$1";
    3.28 +                }
    3.29 +        }
    3.30 +
    3.31          if ($$cl->{cline}=~ m@cat[^#]*#([\^=v])\s*(.*)@) {
    3.32  
    3.33              my $note_operator = $1;
    3.34 @@ -598,7 +604,7 @@
    3.35          }
    3.36          elsif ($seconds_since_last_command > 7200) {
    3.37              my $hours_passed =  int($seconds_since_last_command/3600);
    3.38 -            my $passed_word  = $minutes_passed % 10 == 1 ? "прошла"
    3.39 +            my $passed_word  = $hours_passed % 10 == 1 ? "прошла"
    3.40                                                           : "прошло";
    3.41              my $hours_word   = $hours_passed % 10 == 1 ?   "часа":
    3.42                                                             "часов";
    3.43 @@ -639,7 +645,7 @@
    3.44                          
    3.45  
    3.46  # CONSOLE CHANGE
    3.47 -        if ( $last_tty ne $cl->{"tty"} && 0) {
    3.48 +        if ($cl->{"tty"} && $last_tty ne $cl->{"tty"} && 0) {
    3.49              my $tty = $cl->{"tty"};
    3.50              $this_day_result .= "<div class='ttychange'>"
    3.51                                  . $tty
    3.52 @@ -682,7 +688,8 @@
    3.53          my $hint = make_comment($cl->{"cline"});
    3.54  
    3.55          my $cline;
    3.56 -        $cline = $cl->{"prompt"}.$cl->{"cline"};
    3.57 +        $prompt_hint = join ("&#10;", map("$_=$cl->{$_}", grep (!/^output$/, sort(keys(%{$cl})))));
    3.58 +        $cline = "<span title='$prompt_hint'>".$cl->{"prompt"}."</prompt>".$cl->{"cline"};
    3.59          $cline =~ s/\n//;
    3.60  
    3.61          $cline = "<span title='$hint' class='with_hint'>$cline</span>" if $hint;
    3.62 @@ -708,6 +715,14 @@
    3.63  # DIFF
    3.64          $this_day_result .= "<pre class='diff'>".$cl->{"diff"}."</pre>"
    3.65              if ( $Config{"show_diffs"} =~ /^y/i && $cl->{"diff"});
    3.66 +# SHOT
    3.67 +        $this_day_result .= "<img src='"
    3.68 +                .$Config{l3shot_path}
    3.69 +                .$cl->{"screenshot"}
    3.70 +                .$Config{l3shot_suffix}
    3.71 +                ."' alt ='screenshot id ".$cl->{"screenshot"}
    3.72 +                ."'/>"
    3.73 +            if ( $Config{"show_screenshots"} =~ /^y/i && $cl->{"screenshot"});
    3.74  
    3.75  #NOTES
    3.76          if ( $Config{"show_notes"} =~ /^y/i && $cl->{"note"}) {
     4.1 --- a/l3config.pm	Mon Feb 20 17:52:40 2006 +0200
     4.2 +++ b/l3config.pm	Thu Feb 23 22:26:38 2006 +0200
     4.3 @@ -29,16 +29,17 @@
     4.4      "suppress_terminal" => "yes",
     4.5  
     4.6      "terminal_width"    => 400,
     4.7 -    "terminal_height"   => 100,
     4.8 +    "terminal_height"   => 300,
     4.9      "verbose"           => "yes",
    4.10  
    4.11      "head_lines"        => 5,
    4.12      "tail_lines"        => 5,
    4.13 -    "cache_head_lines"  => 50,
    4.14 -    "cache_tail_lines"  => 50,
    4.15 +    "cache_head_lines"  => 150,
    4.16 +    "cache_tail_lines"  => 150,
    4.17      "skip_text"         => "...",
    4.18      "show_time"         => "yes",
    4.19      "show_diffs"        => "yes",
    4.20 +    "show_screenshots"  => "yes",
    4.21      "show_comments"     => "yes",
    4.22      "show_notes"        => "yes",
    4.23  
    4.24 @@ -54,6 +55,8 @@
    4.25      "output_mask"       => "INDEX",
    4.26      "output_format"     => "html",
    4.27      "frontend_css"      => "/l3/l3.css",
    4.28 +    "l3shot_path"       => "/l3shot/",
    4.29 +    "l3shot_suffix"       => ".png",
    4.30      "frontend_google_ico"   => "/l3/google.ico",
    4.31      "frontend_linux_ico"    => "/l3/linux.ico",
    4.32      "frontend_freebsd_ico"  => "/l3/freebsd.ico",