Changeset 34944


Ignore:
Timestamp:
2021-03-01T22:49:17+13:00 (3 years ago)
Author:
davidb
Message:

Updated to only do header and footer for HTML output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/DBPEDIA-LOD-SPARQL-QUERY.sh

    r34855 r34944  
    3636additional_args="$output_format_arg_safe&timeout=30000&signal_void=on&signal_unconnected=on"
    3737
    38 tmp_table_filename="/tmp/table-sparql-result--$$.$output_ext"
     38tmp_output_ext_filename="/tmp/table-sparql-result--$$.$output_ext"
    3939
    4040#wget --no-check-certificate -O "table-$output_result_file" "$sparql_url?$graph_arg&$query_arg_safe&$additional_args"
    41 wget --no-check-certificate -O "$tmp_table_filename" "$sparql_url?$graph_arg&$query_arg_safe&$additional_args"
     41wget --no-check-certificate -O "$tmp_output_ext_filename" "$sparql_url?$graph_arg&$query_arg_safe&$additional_args"
    4242
    43 cat html-table-header.html "$tmp_table_filename"  html-table-footer.html > "$output_result_file"
     43echo "Generating: $output_result_file"
     44if [ "$output_ext" = "html" ] ; then
     45    cat html-table-header.html "$tmp_output_ext_filename"  html-table-footer.html > "$output_result_file"
    4446
    45 if [ $? = 0 ] ; then
    46     /bin/rm "$tmp_table_filename"
     47    if [ $? = 0 ] ; then
     48    /bin/rm "$tmp_output_ext_filename"
     49    else
     50    echo "Failed to concatenate header+table+footer to create: $output_result_file" 1>&2
     51    echo "Leaving temporaryly generated table file for inspection: $tmp_output_ext_filename" 1>&2
     52    fi
    4753else
    48     echo "Failed to concatenate header+table+footer to create: $output_result_file" 1>&2
    49     echo "Leaving temporaryly generated table file for inspection: $tmp_table_filename" 1>&2
     54    /bin/cp "$tmp_output_ext_filename" "$output_result_file"
     55    if [ $? = 0 ] ; then
     56    /bin/rm "$tmp_output_ext_filename"
     57    else
     58    echo "Failed to generate: $output_result_file" 1>&2
     59    echo "Leaving temporaryly generated output-ext file for inspection: $tmp_output_ext_filename" 1>&2
     60    fi   
    5061fi
    5162
Note: See TracChangeset for help on using the changeset viewer.