[Orca-dev] TODO: Turn off HTML creation via command line option.

Alex Howansky alex at wankwood.com
Wed Sep 6 08:07:04 PDT 2000


-------------------------- eGroups Sponsor -------------------------~-~>
The Five Secrets Of A Successful Product Launch
FREE right now at:
http://click.egroups.com/1/8592/11/_/576655/_/968252871/
---------------------------------------------------------------------_->


Howdy,

I've made a small patch for Orca to allow turning off the creation of HTML
files via a command line option, as desribed in the TODO. I used -g, hopefully
it won't be too confusing in conjunction with -gifs.

I see that the egroups service allows attachments, so I hope that's the
preferred method. One patch updates orca and the other updates Constants.pm.

-- 
Alex Howansky
Wankwood Associates
http://www.wankwood.com/


-------------- next part --------------
*** orca.old	Tue Sep  5 13:58:26 2000
--- orca	Wed Sep  6 09:43:01 2000
***************
*** 39,44 ****
--- 39,45 ----
  use Orca::Constants     qw($ORCA_VERSION
                             @IMAGE_PLOT_TYPES
                             $opt_generate_gifs
+                            $opt_graphs_only
                             $opt_once_only
                             $opt_rrd_update_only
                             $opt_verbose
***************
*** 66,72 ****
  $SIG{HUP} = \&handle_hup;
  
  sub Usage {
!   die "usage: $0 [-o] [-r] [-v] config_file\n";
  }
  
  while (@ARGV and $ARGV[0] =~ /^-\w/) {
--- 67,73 ----
  $SIG{HUP} = \&handle_hup;
  
  sub Usage {
!   die "usage: $0 [-g] [-o] [-r] [-v] config_file\n";
  }
  
  while (@ARGV and $ARGV[0] =~ /^-\w/) {
***************
*** 74,79 ****
--- 75,82 ----
    if ($arg eq '-gifs') {
      $opt_generate_gifs = 1;
      $IMAGE_SUFFIX      = 'gif';
+   } elsif ($arg eq '-g') {
+     $opt_graphs_only = 1;
    } elsif ($arg eq '-o') {
      $opt_once_only = 1;
    } elsif ($arg eq '-r') {
***************
*** 168,174 ****
    # the RRD files.  The generated files should include orca.gif and
    # rrdtool.gif.  Convert the hexadecimal forms stored in the DATA
    # section to the raw image form on disk.
!   return if $opt_rrd_update_only;
    my $image_filename = '';
    while (<main::DATA>) {
      chomp;
--- 171,177 ----
    # the RRD files.  The generated files should include orca.gif and
    # rrdtool.gif.  Convert the hexadecimal forms stored in the DATA
    # section to the raw image form on disk.
!   return if $opt_rrd_update_only || $opt_graphs_only;
    my $image_filename = '';
    while (<main::DATA>) {
      chomp;
***************
*** 474,479 ****
--- 477,483 ----
  # Create all of the different HMTL files with all of the proper HREFs
  # to the images.
  sub create_html_files {
+   return if $opt_graphs_only;
    my ($found_files_ref,
        $subgroup_fids_ref,
        $image_files_ref) = @_;
-------------- next part --------------
*** Constants.pm.old	Wed Sep  6 09:39:52 2000
--- Constants.pm	Wed Sep  6 09:39:19 2000
***************
*** 73,93 ****
--- 73,97 ----
  # command line arguments.
  #
  # $opt_generate_gifs		Generate GIFs instead of PNGs.
+ # $opt_graphs_only		Generate graphs only, no HTML.
  # $opt_once_only		Do only one pass through Orca.
  # $opt_rrd_update_only		Do not generate any images.
  # $opt_verbose			Be verbose about my running.
  #
  use vars         qw($opt_generate_gifs
+                     $opt_graphs_only
                      $opt_once_only
                      $opt_rrd_update_only
                      $opt_verbose
                      $IMAGE_SUFFIX);
  push(@EXPORT_OK, qw($opt_generate_gifs
                      $opt_once_only
+                     $opt_graphs_only
                      $opt_rrd_update_only
                      $opt_verbose
                      $IMAGE_SUFFIX));
  $opt_generate_gifs   = 0;
+ $opt_graphs_only     = 0;
  $opt_once_only       = 0;
  $opt_rrd_update_only = 0;
  $opt_verbose         = 0;


More information about the Orca-dev mailing list