mirror of https://github.com/ecmwf/eccodes.git
Added bufr_encode_flight example. Also dont add a tab for example if lang missing
This commit is contained in:
parent
ebd512b166
commit
f8ff633b48
|
@ -21,6 +21,7 @@ GRIB (
|
||||||
BUFR (
|
BUFR (
|
||||||
bufr_attributes
|
bufr_attributes
|
||||||
bufr_clone
|
bufr_clone
|
||||||
|
bufr_encode_flight
|
||||||
bufr_expanded
|
bufr_expanded
|
||||||
bufr_get_keys
|
bufr_get_keys
|
||||||
bufr_keys_iterator
|
bufr_keys_iterator
|
||||||
|
|
|
@ -119,10 +119,10 @@ foreach my $cType (keys %allExamples) {
|
||||||
my $c=getSourceCode($fName,$fPath,$lType);
|
my $c=getSourceCode($fName,$fPath,$lType);
|
||||||
|
|
||||||
#If there is a source creates a tab for it
|
#If there is a source creates a tab for it
|
||||||
#if(length($c) > 0) {
|
if(length($c) > 0) {
|
||||||
print OUT "<ac:structured-macro ac:name=\"auitabspage\"><ac:parameter ac:name=\"title\">".$tabName."</ac:parameter>
|
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>";
|
<ac:rich-text-body>".$c."</ac:rich-text-body></ac:structured-macro>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#Close tab container
|
#Close tab container
|
||||||
|
@ -190,7 +190,6 @@ sub read_examples {
|
||||||
push(@{$res{$actType}},$b);
|
push(@{$res{$actType}},$b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
close IN;
|
close IN;
|
||||||
|
@ -205,7 +204,6 @@ sub read_examples {
|
||||||
sub parentPageTitle {
|
sub parentPageTitle {
|
||||||
|
|
||||||
my ($codeType) = @_;
|
my ($codeType) = @_;
|
||||||
|
|
||||||
return $codeType." examples";
|
return $codeType." examples";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,11 +237,9 @@ sub makeParentPage {
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Genarate the page title for a given example
|
# Genarate the page title for a given example
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
sub examplePageTitle {
|
sub examplePageTitle {
|
||||||
|
|
||||||
my ($exName) = @_;
|
my ($exName) = @_;
|
||||||
|
|
||||||
return $exName;
|
return $exName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,7 +274,6 @@ sub hasExample {
|
||||||
sub getSourceCode {
|
sub getSourceCode {
|
||||||
|
|
||||||
my ($title,$fPath,$lang) = @_;
|
my ($title,$fPath,$lang) = @_;
|
||||||
|
|
||||||
my $codeTxt;
|
my $codeTxt;
|
||||||
|
|
||||||
print $fPath."\n";
|
print $fPath."\n";
|
||||||
|
@ -313,9 +308,7 @@ sub getSourceCode {
|
||||||
sub getDescription {
|
sub getDescription {
|
||||||
|
|
||||||
my ($name) = @_;
|
my ($name) = @_;
|
||||||
|
|
||||||
my $lang="c";
|
my $lang="c";
|
||||||
|
|
||||||
my $res;
|
my $res;
|
||||||
|
|
||||||
if(hasExample($name,$lang)== 1) {
|
if(hasExample($name,$lang)== 1) {
|
||||||
|
@ -363,7 +356,6 @@ sub getDescription {
|
||||||
sub loadToConf {
|
sub loadToConf {
|
||||||
|
|
||||||
my ($fHtml,$title,$parentPage) = @_;
|
my ($fHtml,$title,$parentPage) = @_;
|
||||||
|
|
||||||
system("$CONF -a addPage --noConvert --replace --space \"$confSpace\" --title \"$title\" --parent \"$parentPage\" --file $fHtml");
|
system("$CONF -a addPage --noConvert --replace --space \"$confSpace\" --title \"$title\" --parent \"$parentPage\" --file $fHtml");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -388,8 +380,6 @@ sub linkToPage {
|
||||||
sub makeInfo {
|
sub makeInfo {
|
||||||
|
|
||||||
my ($text) = @_;
|
my ($text) = @_;
|
||||||
|
|
||||||
return "<ac:structured-macro ac:name=\"info\"><ac:parameter ac:name=\"icon\">false</ac:parameter>".
|
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>";
|
"<ac:rich-text-body>".$text."</ac:rich-text-body></ac:structured-macro>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue