Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


scrollbar


Excerpt
hiddentrue

Retrieves reports generated by forecasting runs


Report Export Module Configuration

...

The web server will control access to all or some reports in these categories to appropriate users.

In addition to the export of reports from the database to a web server, the Report Export module can also 'export' reports (in image format) to Telegram (www.telegram.org), a mobile messaging application. For this purpose, the html pages in the report first need to be converted to an image format (i.e. jpeg, png) before they can be published to a "bot channel" on Telegram.

When available as configuration on the file system, the name of the XML file for configuring an instance of the correlation module called for example Report_Export may be:

Report_Export 1.00 default.xml

Report_Export

File name for the Report_Export configuration.

1.00

Version number

default

Flag to indicate the version is the default configuration (otherwise omitted).


Figure 133 Elements of the reportExport module configuration

reportExportRootDir

Root directory to which the all reports are to be exported to. This directory is typically the root directory of the web server.

reportExportTelegramPhoto

Root element for defining the (encrypted) access token and channel is that are required to publish messages to Telegram (www.telegram.org) as well as a list of image files to publish from the report. 

To use this feature, the html pages in a report that are to be published first need to be converted to images (png or jpeg format), using the generateImage option in the currentForecastReports element described below.

Please refer to the telegram.org website for more information on how to create a so-called Telegram-bot with related chat 'channel'

N.B. you can only publish pages from a forecast report to Telegram, there is no option for exporting page from a system status report.


telegramBotToken

The token, which allows anyone to control a Telegram bot and related channel, Please be aware that anyone with access to this token can control the used bot. In order to encrypt your token you first put the unencrypted token in the report export xml configuration file, then you start up FEWS explorer using the relevant configuration. FEWS will now generate an error message in the log stating that you cannot use the token in this unencrypted form, providing the encrypted token string in the log message. Then you copy paste this encoded version of the token in the configuration xml file.

telegramChatId

The ID of the chat channel for the telegram bot, which is provided to you when creating the bot (see www.telegram.org). Any telegram user can subscribe to this channel to receive the photo messages send to this channel by FEWS.

telegramSendPhoto

One or more elements that define the image files within the report that are to be published. Each photo is defined by it's filename and you can provide a caption (text) to be displayed below the photo in Telegram. You can use wildcards to specifiy multiple files, but in order to be able to specify a caption specific to each page (normally the location name) you need to specify a separate <telegramSendPhoto> tag for each page.

N.B. please note that at this point the report being exported is just a zip file and the report export module has no knowledge of the structure of the report, therefore you need to specify exactly which files you wish to publish to Telegram, there is no option to automatically export the page for eacht location that is present in the report.


currentForecastReports

Root element for definition of exporting reports for the current forecast

...

The time zone for the timestamp in the zip file or output directory.

generatePdf

Include this optional element with the value 'true' to convert each html page in the report to a pdf file.

generateImage

Include this optional element with a value indicating the image format (i.e. png, jpg) to cause each html page in the report to be converted to an image of specified format.

N.B. This option works similar to the <generateImage> element in the report configuration. An external conversion program (default is wkthtmltoimage) needs to be configured using the global property REPORT_HTML2IMG_PROGRAM defined in the global properties file.

exportForecastReports

Warning

This element is obsolete and not supported anymore.

...