"Fossies" - the Fresh Open Source Software Archive

Member "gvmd-9.0.0/report_formats/simple_pie_chart/generate" (11 Oct 2019, 1291 Bytes) of package /linux/misc/openvas/gvmd-9.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 # Copyright (C) 2010-2018 Greenbone Networks GmbH
    3 #
    4 # SPDX-License-Identifier: GPL-2.0-or-later
    5 #
    6 # This program is free software; you can redistribute it and/or
    7 # modify it under the terms of the GNU General Public License
    8 # as published by the Free Software Foundation; either version 2
    9 # of the License, or (at your option) any later version.
   10 #
   11 # This program is distributed in the hope that it will be useful,
   12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
   13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   14 # GNU General Public License for more details.
   15 #
   16 # You should have received a copy of the GNU General Public License
   17 # along with this program; if not, write to the Free Software
   18 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   19 
   20 # Report generator script: results per threat pie plot.
   21 #
   22 # This report generates a PNG graphics file
   23 # with a pie plot of the numbers of threat counts.
   24 # The XML transformation via XSL with xsltproc
   25 # creates a little Python program which uses the pychart
   26 # module to create the pie chart PNG graphics.
   27 
   28 SRC=`pwd`
   29 TMP=`mktemp -d` || exit 1
   30 
   31 xsltproc ./pieplot.xsl $1 > ${TMP}/pieplot.py 2>${TMP}/xlstproc.err \
   32  && cd ${TMP} 2>/dev/null \
   33  && python pieplot.py 2>${TMP}/python.err