diff --git a/confluence/confUtils.pm b/confluence/confUtils.pm index 5ac54cb93..49ab90688 100644 --- a/confluence/confUtils.pm +++ b/confluence/confUtils.pm @@ -8,8 +8,6 @@ our $confSpace="ECC"; my $CONF=$ENV{CONF}; die "Env var CONF should point to confluence.sh script" if ( $CONF eq "" || ! -f "$CONF" ); -our $confSpace="ECC"; - #==================================================== # # Generic functions related to confluence diff --git a/confluence/load_templates.pl b/confluence/load_templates.pl new file mode 100755 index 000000000..8e34db174 --- /dev/null +++ b/confluence/load_templates.pl @@ -0,0 +1,126 @@ +#!/usr/local/apps/perl/current/bin/perl -I/usr/local/lib/metaps/perl -I. + +use confUtils; +use Getopt::Long; +use strict; + +my %res=(); + +#The confluence space +my $confSpace="ECC"; + +#--------------------------------- +# Read arguments +#--------------------------------- + +GetOptions("confSpace=s" => \$confUtils::confSpace) + or die("Error in command line arguments\n"); + +print "confluence space=".$confUtils::confSpace."\n"; + +#---------------------------------- +# Dirs +#---------------------------------- + +#The root dir of the examples +my $inFile="../definitions/bufr/templates/BufrTemplate.def"; + +#The genareted html files are stored here +my $htmlDir=$ENV{TMPDIR}."/res_html"; + +#-------------------------------------------------- +# The confluence pages +#-------------------------------------------------- + +#The root page of templates in confluence!!! +my $pageTitle="BUFR templates"; +my $parentPage="Internal"; + +#---------------------------------------- +# Preparations +#---------------------------------------- + +unless ( -d $htmlDir ) { + mkdir $htmlDir +} + +#--------------------------------------------------- +# Read the templates file +#--------------------------------------------------- + +read_templates(); + +#--------------------------------------------------- +# Generate confluence tabel +#--------------------------------------------------- + +my $fOut=$htmlDir."/bufr_templates.html"; +open(OUT,">$fOut") or die "$fOut: $!"; + +my $header="Teplate name
Teplate name | Unexpanded descriptors |
---|---|
$name | ".$res{$name}." |