Added bufr_encode_flight example. Also dont add a tab for example if lang missing

This commit is contained in:
Shahram Najm 2015-11-12 11:16:59 +00:00
parent ebd512b166
commit f8ff633b48
2 changed files with 90 additions and 99 deletions

View File

@ -21,6 +21,7 @@ GRIB (
BUFR (
bufr_attributes
bufr_clone
bufr_encode_flight
bufr_expanded
bufr_get_keys
bufr_keys_iterator

View File

@ -119,10 +119,10 @@ foreach my $cType (keys %allExamples) {
my $c=getSourceCode($fName,$fPath,$lType);
#If there is a source creates a tab for it
#if(length($c) > 0) {
print OUT "<ac:structured-macro ac:name=\"auitabspage\"><ac:parameter ac:name=\"title\">".$tabName."</ac:parameter>
if(length($c) > 0) {
print OUT "<ac:structured-macro ac:name=\"auitabspage\"><ac:parameter ac:name=\"title\">".$tabName."</ac:parameter>
<ac:rich-text-body>".$c."</ac:rich-text-body></ac:structured-macro>";
}
}
#Close tab container
@ -190,7 +190,6 @@ sub read_examples {
push(@{$res{$actType}},$b);
}
}
}
close IN;
@ -205,7 +204,6 @@ sub read_examples {
sub parentPageTitle {
my ($codeType) = @_;
return $codeType." examples";
}
@ -239,11 +237,9 @@ sub makeParentPage {
#-----------------------------------------------------------------------------
# Genarate the page title for a given example
#-----------------------------------------------------------------------------
sub examplePageTitle {
my ($exName) = @_;
return $exName;
}
@ -278,7 +274,6 @@ sub hasExample {
sub getSourceCode {
my ($title,$fPath,$lang) = @_;
my $codeTxt;
print $fPath."\n";
@ -313,9 +308,7 @@ sub getSourceCode {
sub getDescription {
my ($name) = @_;
my $lang="c";
my $res;
if(hasExample($name,$lang)== 1) {
@ -363,7 +356,6 @@ sub getDescription {
sub loadToConf {
my ($fHtml,$title,$parentPage) = @_;
system("$CONF -a addPage --noConvert --replace --space \"$confSpace\" --title \"$title\" --parent \"$parentPage\" --file $fHtml");
}
@ -388,8 +380,6 @@ sub linkToPage {
sub makeInfo {
my ($text) = @_;
return "<ac:structured-macro ac:name=\"info\"><ac:parameter ac:name=\"icon\">false</ac:parameter>".
"<ac:rich-text-body>".$text."</ac:rich-text-body></ac:structured-macro>";
}