ignore output html
[psist.git] / psist
1 #!/usr/bin/perl -w
2
3 # $HeadURL: http://svn.mzet.net/psist/psist $
4 # $Author: zet $
5 # $Date: 2006-08-24 15:39:25 +0200 (Thu, 24 Aug 2006) $
6 # $Revision: 12 $
7
8 use strict;
9 use Psist;
10 use Getopt::Long;
11 use Env;
12
13 sub get_cmdline_options
14 {
15   my %cfg = (
16     profile => $ENV{HOME}.'/.psi/profiles/default',
17     outfile => 'out.html'
18   );
19   
20   my $usage = <<END_USAGE;
21 Usage: psist [-p profile] [-o outfile]
22
23 -p --profile=xxx    : Set profile directory
24 -o --outfile=xxx    : Name of HTML file to create
25
26 Example:
27  \$ psist -p ~/.psi/profiles/default -o stats.html
28 END_USAGE
29
30   my $help;
31
32   if(GetOptions('profile=s'   => \$cfg{profile},
33                 'outfile=s'   => \$cfg{outfile},
34                 'silent'      => \$cfg{silent},
35                 'help'        => \$help) == 0 or $help) {
36     die($usage);
37   }
38
39   return %cfg;
40 }
41
42 sub main
43 {
44   my %cfg = &get_cmdline_options();
45   
46   my $psist = Psist->new(profile  => $cfg{profile},
47                          outfile  => $cfg{outfile},
48                          silent   => $cfg{silent},
49                          version  => '0.2');
50   $psist->run();
51 }
52
53 &main();
54