mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-01-05 00:00:03 +01:00
Merge pull request #482 from PeterLaemmle/develop
HTML style formatting for Telegram plugin
This commit is contained in:
commit
fa039c0f03
|
|
@ -7,6 +7,7 @@
|
|||
##### Changed
|
||||
- Divera Plugin: Add individual alarms for FMS, ZVEI and POC. [#451](https://github.com/Schrolli91/BOSWatch/pull/451)
|
||||
- install.sh: local git repo available at /opt/boswatch (or at your own path). Updates easier with `git pull` in /opt/boswatch. [#452](https://github.com/Schrolli91/BOSWatch/pull/452)
|
||||
- Telegram Plugin: Add support for simple HTML style message formatting. [#482](https://github.com/Schrolli91/BOSWatch/pull/482)
|
||||
##### Deprecated
|
||||
##### Removed
|
||||
##### Fixed
|
||||
|
|
|
|||
|
|
@ -426,14 +426,17 @@ GoogleAPIKey =
|
|||
# Use the following format: CityOfOrigin+Street+Number
|
||||
RoutingOrigin = MyCity+MyStreet+MyNumber
|
||||
|
||||
#Wildcards can be used, see end of the file!
|
||||
# Wildcards can be used, see end of the file!
|
||||
# In addition, feel free to use simple HTML stlye tags like <b>%FMS%</b>
|
||||
FMS_message = %DATE% %TIME%: %FMS%
|
||||
|
||||
#Wildcards can be used, see end of the file!
|
||||
#W ildcards can be used, see end of the file!
|
||||
# In addition, feel free to use simple HTML stlye tags like <b>%ZVEI%</b>
|
||||
ZVEI_message = %DATE% %TIME%: %ZVEI%
|
||||
|
||||
#Wildcards can be used, see end of the file!
|
||||
POC_message = %MSG%
|
||||
# Wildcards can be used, see end of the file!
|
||||
# In addition, feel free to use simple HTML stlye tags like <b>%DESCR%</b>
|
||||
POC_message = %DESCR%%BR%%MSG%
|
||||
|
||||
|
||||
[yowsup]
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ def run(typ,freq,data):
|
|||
bot = telegram.Bot(token='%s' % BOTTokenAPIKey)
|
||||
# Send message to chat via Telegram BOT API
|
||||
logging.debug("Send message to chat via Telegram BOT API")
|
||||
bot.sendMessage('%s' % BOTChatIDAPIKey, text)
|
||||
bot.sendMessage('%s' % BOTChatIDAPIKey, text, parse_mode=telegram.ParseMode.HTML)
|
||||
|
||||
# Generate location information only for specific RIC
|
||||
if typ == "POC" and data["ric"] == RICforLocationAPIKey:
|
||||
|
|
|
|||
Loading…
Reference in a new issue