/ip firewall address-list
:foreach id in=[find list=M] do={
:local ipAddr [:toip [get $id address]];
:log warning "$ipAddr";
:local filenameIP "servers100.txt"
/file
:if ([:len [find where name="flash" and type="disk"]] = 1) do={:set filenameIP
"flash/$filenameIP"}
:if ([:len [find where name=$filenameIP]] = 0) do={print
file="$filenameIP"; :delay 2s; set $filenameIP contents=""}
:local filecontent [get $filenameIP contents]
:local newfilecontent "$ipAddr\r\n$filecontent"
set $filenameIP contents=$newfilecontent; :delay 1s
}
/ip firewall address-list
:foreach id in=[find list=servers] do={
:local ipAddr [:toip [get $id address]]
:local filenameIP "servers100.txt"
/file
:if ([:len [find where name="flash" and type="disk"]] = 1) do={:set filenameIP
"flash/$filenameIP"}
:if ([:len [find where name=$filenameIP]] = 0) do={print
file="$filenameIP"; :delay 2s; set $filenameIP contents=""}
:local filecontent [get $filenameIP contents]
:foreach id2 in=[$filecontent] do={
:if ((($ipAddr in $id2) or ($ipAddr = $id2)) = 0) do={
>>>>> NOT WORKING <<<<<<<
}
}
<
:local newfilecontent "$ipAddr\r\n$filecontent"
set $filenameIP contents=$newfilecontent; :delay 1s
}
10.10.10.10
113.0.0.1
10.0.20.1
10.0.19.1
10.0.18.1
10.0.17.1
10.0.16.1
10.0.15.1
10.0.13.1
10.0.12.1
10.0.14.1
:do {
# LOG FILTER TO TELEGRAM BY AHMED MOUSELLY
# BEGIN SETUP Edit Here
:local myserver ([/system identity get name])
:local scheduleName "LogFilter"
:local bot "5778830696:AAF0SNevlZom-i9l7B3tDU4fY_bcGqcyQ4M"
:local ChatID "6397372473"
:local startBuf [:toarray [/log find message~" failure" || message~"loop" ||
message~"down" || message~"fcs" || message~"excessive"]]
# END SETUP
# warn if schedule does not exist
:if ([:len [/system scheduler find name="$scheduleName"]] = 0) do={
/log warning "[LogFilter] Alert : Schedule does not exist. Creating schedule ....";
/system scheduler add name=$scheduleName interval=60s start-date=Jul/05/2019 start-
time=startup on-event=LogFilter
/log warning "[LogFilter] Alert : Schedule created .";
}
# get last time
:local lastTime [/system scheduler get [find name="$scheduleName"] comment]
# for checking time of each log entry
:local currentTime
# log message
:local message;
# final output
:local output;
:local keepOutput false;
# if lastTime is empty, set keepOutput to true
:if ([:len $lastTime] = 0) do={
:set keepOutput true;
}
:local counter 0;
# loop through all log entries that have been found
:foreach i in=$startBuf do={
# loop through all removeThese array items
:local keepLog true
:foreach j in=$removeThese do={
#if this log entry contains any of them, it will be ignored
:if ([/log get $i message] ~ "$j") do={
:set keepLog false;
}
}
:if ($keepLog = true) do={
:set message [/log get $i message];
# LOG DATE
# depending on log date/time, the format may be different. 3 known formats
# format of jan/01/2002 00:00:00 which shows up at unknown date/time. Using as
default
:set currentTime [ /log get $i time ]
# format of 00:00:00 which shows up on current day's logs
:if ([:len $currentTime] = 8 ) do={
:set currentTime ([:pick [/system clock get date] 0 11]." ".$currentTime)
} else={
# format of jan/01 00:00:00 which shows up on previous day's logs
:if ([:len $currentTime] = 15 ) do={
:set currentTime ([:pick $currentTime 0 6]."/".[:pick [/system clock get date] 7
11]." ".[:pick $currentTime 7 15])
}
}
# if keepOutput is true, add this log entry to output
:if ($keepOutput = true) do={
:set output ($output.$currentTime." %0A%0A ".$message."\r\n")
}
:if ($currentTime = $lastTime) do={
:set keepOutput true
:set output ""
}
}
:if ($counter = ([:len $startBuf]-1)) do={
:if ($keepOutput = false) do={
:if ([:len $message] > 0) do={
:set output ($output.$currentTimer." ".$message."\r\n")
}
}
}
:set counter ($counter + 1)
}
:if ([:len $output] > 0) do={
/system scheduler set [find name="$scheduleName"] comment=$currentTime
/tool fetch url="https://api.telegram.org/bot$bot/sendmessage?
chat_id=$ChatID&text=$myserver%0A%0A$output" keep-result=no;
}}
# BEGIN SETUP Edit Here
:local myserver ([/system identity get name])
:local scheduleName "LogFilter"
:local bot "YOUR_BOT_TOKEN"
:local ChatID "YOUR_CHANEL_ID"
:local startBuf [:toarray [/log find message~" failure" || message~"loop" ||
message~"down" || message~"fcs" || message~"excessive"]]
:local removeThese [:toarray ""]
# END SETUP
# warn if schedule does not exist and create it
:if ([:len [/system scheduler find name="$scheduleName"]] = 0) do={
/log warning "[LogFilter] Alert : Schedule does not exist. Creating
schedule ...."
/system scheduler add name=$scheduleName interval=60s start-date=Jul/05/2019
start-time=startup on-event=LogFilter
/log warning "[LogFilter] Alert : Schedule created ."
}
# get last time
:local lastTime [/system scheduler get [find name="$scheduleName"] comment]
# for checking time of each log entry
:local currentTime
# log message
:local message
# final output
:local output
:local keepOutput false
# if lastTime is empty, set keepOutput to true
:if ([:len $lastTime] = 0) do={
:set keepOutput true
}
:local counter 0
# loop through all log entries that have been found
:foreach i in=$startBuf do={
# loop through all removeThese array items
:local keepLog true
:foreach j in=$removeThese do={
# if this log entry contains any of them, it will be ignored
:if ([/log get $i message] ~ "$j") do={
:set keepLog false
}
}
:if ($keepLog = true) do={
:set message [/log get $i message]
# LOG DATE
# depending on log date/time, the format may be different. 3 known formats
# format of jan/01/2002 00:00:00 which shows up at unknown date/time. Using as
default
:set currentTime [ /log get $i time ]
# format of 00:00:00 which shows up on current day's logs
:if ([:len $currentTime] = 8 ) do={
:set currentTime ([:pick [/system clock get date] 0 11]." ".$currentTime)
} else={
# format of jan/01 00:00:00 which shows up on previous day's logs
:if ([:len $currentTime] = 15 ) do={
:set currentTime ([:pick $currentTime 0 6]."/".[:pick [/system clock get
date] 7 11]." ".[:pick $currentTime 7 15])
}
}
# if keepOutput is true, add this log entry to output
:if ($keepOutput = true) do={
:set output ($output.$currentTime." ".$message." %0A%0A ")
}
:if ($currentTime = $lastTime) do={
:set keepOutput true
:set output ""
}
}
:if ($counter = ([:len $startBuf])-1) do={
:if ($keepOutput = false) do={
:if ([:len $message] > 0) do={
:set output ($output.$currentTime." ".$message)
}
}
}
:set counter ($counter + 1)
}
if ([:len $output] > 0) do={
/system scheduler set [find name="$scheduleName"] comment=$currentTime
/tool fetch url="https://api.telegram.org/bot$bot/sendMessage\?
chat_id=$ChatID&text=$myserver%0A%0A$output" keep-result=no;
}
/tool fetch http-method=post mode=https http-header-field="Content:
application/json" url=$myURL \
http-data="{\"Summary\":\"Test Summary\",\"title\":\"Test Title\",\"text\":\"Test
Message\"}"
http-header-field="Content-Type: application/json"
/tool
{
:local username myuser
:local password mypass
:local ip 1.1.1.1
:local loginurl "https://$ip/api/auth"
:local statusurl "http://$ip/status.cgi"
fetch mode=https url=$loginurl http-method=post http-
data="username=$username&password=$password"
#insert next fetch command using retrieved cookie
}
##### mikrotik script to fetch the current signal strength from an lbe or af60
using cookie based authentication
/tool
{
:local username <user>
:local password <pass>
:local ip <lbeip>
:local loginurl "https://$ip/api/auth"
:local statusurl "https://$ip/status.cgi"
:local strData [fetch mode=https url=$loginurl http-method=post http-
data="username=$username&password=$password" output=user-with-headers as-value ];
:local headerData ([:toarray $strData ]->"http-headers");
:local headerData ($strData->"http-headers");
:local cookieData [:pick $headerData 4]
:local cookie [:pick $cookieData ([:find $cookieData " "]+1) [:find $cookieData
";"]]
:local header "content-type: application/json,Cookie: $cookie; ok=1" ;
:put $header
:set strData [fetch mode=https url=$statusurl http-method=get http-header-
field=$header output=user as-value ];
:set strData ($strData->"data");
:local startSignal [:pick $strData ([:find $strData "\"signal\":"]+9) [:len
$strData]]
:local signalStrenght [:pick $startSignal 0 [:find $startSignal ","]]
:put "Current signal strength = $signalStrenght"
}
# Backup graphing data
# Copyright 2023 by Dmitry F. https://t.me/NoOneNoOne
# GNU General Public License version 3
# inspired by:
# https://wiki.mikrotik.com/wiki/Backup_graphing_data
# https://forum.mikrotik.com/viewtopic.php?t=39166
# https://router-os.github.io/Backup-graphing-data.html
:local "graphAddress" "192.168.88.1";
:local "graphPort" "80";
:local "baseDST" "usb1-part1/.log/graphs_";
:local "indexHTML" "index.html";
:local "graphImages" {"daily.gif"; "weekly.gif" ; "monthly.gif" ; "yearly.gif"};
:local "rootFiles" {""; "favicon.png"; "favicon.svg"; "graph.css"};
# functions
:local "urlEncode" do={
:local "input" [:tostr $1];
:if ([:len $"input"]=0) do={ :return ""; }
:local "ret" "";
:local "chars" "\n\r !\"#\$%&'()*+,:;<=>\?@[\\]^`{|}~";
:local "subs" {
"%0A"; "%0D"; "%20"; "%21"; "%22"; "%23"; "%24"; "%25"; "%26"; "%27";
"%28"; "%29"; "%2A"; "%2B"; "%2C"; "%3A"; "%3B"; "%3C"; "%3D"; "%3E"; "%3F";
"%40"; "%5B"; "%5C"; "%5D"; "%5E"; "%60"; "%7B"; "%7C"; "%7D"; "%7E"
};
:for "i" from=0 to=([:len $"input"]-1) do={
:local "char" [:pick $"input" $"i"];
:local "replace" [:find $"chars" $"char"];
:if ($"replace">=0) do={
:set $"char" ($"subs"->$"replace");
}
:set $"ret" ($"ret".$"char");
}
:return $"ret";
}
:local "rebaseHTML" do={
:local "ok" (true);
:local "content" "";
:local "newContent" "";
:local "contentLen" 0;
:local "lineEnd" 0;
:local "line" "";
:local "lastEnd" 0;
:local "result" [:toarray ""];
:local "pos" 0;
:local "matched" (false);
:local "depth" "";
:local "resourcesURLs" [:toarray ""];
:if ([:tostr $"url"]="" or [:tostr $"dstFile"]="") do={ :return []; }
:if ([:tostr $"indexHTML"]="") do={ :set $"indexHTML" "index.html"; }
:for "i" from=1 to=(0+[:tonum $"level"]) step=1 do={
:set $"depth" ($"depth"."../");
}
:local "regExArr" {
# <p><a href="/graphs/">Main page</a>
{"re"=".*<a\\s+href=\"\\/graphs\\/\">.*";
"todo"={
{"find"="href=\"/graphs/"; "replace"=("href=\"".$"depth")};
{"find"="/\">"; "insert"=("/".$"indexHTML")}
}
};
{"re"=".*<a\\s+href='\\/graphs\\/'>.*";
"todo"={
{"find"="href='/graphs/"; "replace"=("href='".$"depth")};
{"find"="/'>"; "insert"=("/".$"indexHTML")}
}
};
{"re"=".*<a\\s+href=\\/graphs\\/>.*";
"todo"={
{"find"="href=/graphs/"; "replace"=("href=".$"depth")};
{"find"="/>"; "insert"=("/".$"indexHTML")}
}
};
# <li><a href='cpu/'>CPU usage</a>
{"re"=".*<a\\s+href=\".*\\/\">.*";
"todo"={
{"find"="href=\"/"; "replace"=("href=\"".$"depth")};
{"find"="/\">"; "insert"=("/".$"indexHTML")}
}
};
{"re"=".*<a\\s+href='.*\\/'>.*";
"todo"={
{"find"="href='/"; "replace"=("href='".$"depth")};
{"find"="/'>"; "insert"=("/".$"indexHTML")}
}
};
{"re"=".*<a\\s+href=.*\\/>.*";
"todo"={
{"find"="href=/"; "replace"=("href=".$"depth")};
{"find"="/>"; "insert"=("/".$"indexHTML")}
}
};
# <link rel=icon href=/favicon.png>
# <link rel=stylesheet href=/graph.css>
{"re"=".*<link\\s+.*\\s+href=\\/.*>.*";
"todo"={
{"find"="href=/"; "replace"=("href=".$"depth")}
}
};
{"re"=".*<link\\s+.*\\s+href='\\/.*'>.*";
"todo"={
{"find"="href='/"; "replace"=("href='".$"depth")}
}
}
}
:local "regExArrMainPage" {
# <li><a href='/graphs/iface/bridge/'>bridge</a>
{"re"="<li><a\\s+href=\"\\/graphs\\/(iface|queue)\\/.*\\/\">.*</a>";
"todo"={
{"find"="href='/"; "replace"=("href='".$"depth")};
{"find"="/\">"; "insert"=("/".$"indexHTML")};
{"find"="\">"; "margin"="<"; "types"={"/iface/";"/queue/"}}
}
};
{"re"="<li><a\\s+href='\\/graphs\\/(iface|queue)\\/.*\\/'>.*</a>";
"todo"={
{"find"="href='/"; "replace"=("href='".$"depth")};
{"find"="/'>"; "insert"=("/".$"indexHTML")};
{"find"="'>"; "margin"="<"; "types"={"/iface/";"/queue/"}}
}
};
{"re"="<li><a\\s+href=\\/graphs\\/(iface|queue)\\/.*\\/>.*</a>";
"todo"={
{"find"="href=/"; "replace"=("href=".$"depth")};
{"find"="/>"; "insert"=("/".$"indexHTML")};
{"find"="'>"; "margin"="<"; "types"={"/iface/";"/queue/"}}
}
}
}
:if ((0+[:tonum $"level"])=0) do={
:set $"regExArr" ($"regExArrMainPage", $"regExArr");
}
:local "fetchTime" [:time {
:do {
:set $"result" [/tool fetch url=$"url" mode=http output=user as-value];
} on-error={ :set $"ok" (false); }
}];
:put (" status: ". $"result"->"status");
:put (" total: ". $"result"->"downloaded"."KiB");
:put (" duration: ". $"fetchTime");
:put "";
:if ($"ok" and $"result"->"status"="finished") do={
:set $"content" ($"result"->"data");
:set $"contentLen" [:len $"content"];
:do {
:set $"lineEnd" [:find $"content" "\n" $"lastEnd"];
:set $"line" [:pick $"content" $"lastEnd" $"lineEnd"];
:set $"lastEnd" ($"lineEnd"+1);
# :put ($"line"." ---> ".($"line"~$"regEx"));
:set $"matched" (false);
:foreach "regEx" in=$"regExArr" do={
:if (!$"matched" and $"line"~($"regEx"->"re")) do={
:set $"matched" (true);
:foreach "todo" in=($"regEx"->"todo") do={
:set $"pos" [:find $"line" ($"todo"->"find")];
:if ($"pos">0) do={
:if ([:len ($"todo"->"insert")]>0) do={
:set $"line" ([:pick $"line" 0 $"pos"].($"todo"->"insert").[:pick $"line"
($"pos"+1) [:len $"line"]]);
}
:if ([:len ($"todo"->"replace")]>0) do={
:set $"line" ([:pick $"line" 0 $"pos"].($"todo"->"replace").[:pick $"line"
($"pos"+[:len ($"todo"->"find")]) [:len $"line"]]);
}
:if ([:len ($"todo"->"types")]>0) do={
:local "type" "";
:foreach "t" in=($"todo"->"types") do={
:if ($"type"="" and [:find $"line" $"t"]>0) do={ :set $"type" $"t"; }
}
:set $"resourcesURLs" ($"resourcesURLs", {{"type"=$"type"; "name"=([:pick
$"line" ($"pos"+[:len ($"todo"->"find")]) [:find $"line" ($"todo"->"margin")
($"pos"+[:len ($"todo"->"find")])]])}});
}
}
}
}
}
# :put $"line";
:set $"newContent" ($"newContent".$"line"."\r");
} while ($"lastEnd"<$"contentLen");
:do {
/file {
:if ([:len [find name=$"dstFile"]]>0) do={
set $"dstFile" contents=$"newContent";
} else={
add name=$"dstFile" contents=$"newContent";
}
}
} on-error={ :set $"ok" (false); };
}
:if (!$"ok") do={
:set $"resourcesURLs" (false);
}
:return $"resourcesURLs";
}
# main script starts here
:local "baseURL" ("http://" . $"graphAddress".":".$"graphPort"."/");
:local "curDate" [/system clock get date];
:local "curYear" [:pick $"curDate" 0 4];
:local "curMonth" [:pick $"curDate" 5 7];
:local "curDay" [:pick $"curDate" 8 10];
:local "systemName" [/system identity get name];
:local "outFolder" ($"systemName"."_".$"curYear"."-".$"curMonth"."-".
$"curDay"."/");
:local "graphPath";
:local "graphPathDST";
:local "resourcesURLs" [:toarray ""];
:local "ok" (true);
# Fetch main graphs page and build resources list based on main page URLs
:put "==> Fetching main page graphs... <==";
:set $"graphPathDST" ($"baseDST".$"outFolder");
/file remove [find name=$"graphPathDST"];
:foreach "file" in=$"rootFiles" do={
:if ($"ok") do={
:if ($"file"="") do={
:put (" ".$"baseURL"."graphs/");
:set $"resourcesURLs" [$"rebaseHTML" url=($"baseURL"."graphs/")
dstFile=($"graphPathDST".$"indexHTML") level=0];
:set $"ok" ($"resourcesURLs"!=false);
} else={
:put (" ".$"baseURL".$"file");
:do {
/tool fetch url=($"baseURL".[$"urlEncode" $"file"]) mode=http dst-
path=($"graphPathDST".$"file") output=file;
} on-error={ :set $"ok" (false); };
}
}
}
:if (!$"ok") do={
/file remove [find name=($"baseDST".$"outFolder")];
:error "Graphs download error occured.";
}
# main resources (cpu/ram/hdd) graphs
:put "==> Fetching resources graphs... <==";
:foreach "resource" in={"cpu/"; "ram/"; "hdd/"} do={
:if ($"ok") do={
:set $"graphPath" ("graphs/".$"resource");
:set $"graphPathDST" ($"baseDST".$"outFolder".$"resource");
:put (" ".$"baseURL".$"graphPath");
:set $"ok" ([$"rebaseHTML" url=($"baseURL".[$"urlEncode" $"graphPath"])
dstFile=($"graphPathDST".$"indexHTML") level=1]!=false);
:if ($"ok") do={
:foreach "image" in=$"graphImages" do={
:if ($"ok") do={
:put (" ".$"baseURL".$"graphPath".$"image");
:do {
/tool fetch mode=http url=($"baseURL".[$"urlEncode" ($"graphPath".$"image")])
dst-path=($"graphPathDST".$"image") output=file;
} on-error={ :set $"ok" (false); };
}
}
}
}
}
:if (!$"ok") do={
/file remove [find name=($"baseDST".$"outFolder")];
:error "Graphs download error occured.";
}
# other resources (interface/queue) graphs
:put "==> Fetching interfaces/queues graphs... <==";
:foreach "resource" in=$"resourcesURLs" do={
:if ($"ok") do={
:put (" resource (".$"resource"->"type"."): ".$"resource"->"name");
:set $"graphPath" ("graphs".$"resource"->"type".$"resource"->"name"."/")
:set $"graphPathDST" ($"baseDST".$"outFolder"."graphs".$"resource"->"type".
$"resource"->"name"."/");
:put (" ".$"baseURL".$"graphPath");
:set $"ok" ([$"rebaseHTML" url=($"baseURL".[$"urlEncode" $"graphPath"])
dstFile=($"graphPathDST".$"indexHTML") level=3]!=false);
:if ($"ok") do={
:foreach "image" in=$"graphImages" do={
:put (" ".$"baseURL".$"graphPath".$"image");
:do {
/tool fetch mode=http url=($"baseURL".[$"urlEncode" ($"graphPath".$"image")])
dst-path=($"graphPathDST".$"image") output=file;
} on-error={ :set $"ok" (false); };
}
}
}
}
:if (!$"ok") do={
/file remove [find name=($"baseDST".$"outFolder")];
:error "Graphs download error occured.";
}
:put "==> Done. <==";
# Function $tgFunc by @diamuxin
:global tgFunc do={
:local BotToken "XXXXXXXXX:XXXXXXXXXXXX-XXXXXXXXXXXXXXXXXX"
:local ChatID "XXXXXXXXX"
:local parseMode "HTML"
:local SendText $1
:local DisableWebPagePreview True
/tool fetch url="https://api.telegram.org/bot$BotToken/s ... \?chat_id=\
$ChatID&parse_mode=$parseMode&text=$SendText&disable_web_page_preview=\
$DisableWebPagePreview" keep-result=no
:log info "=> Send Telegram message"
}
# Function $SymbolByUnicodeName by @eworm
:global SymbolByUnicodeName do={
:local Symbols {
"abacus"="\F0\9F\A7\AE";
"alarm-clock"="\E2\8F\B0";
"calendar"="\F0\9F\93\85";
"card-file-box"="\F0\9F\97\83";
"chart-decreasing"="\F0\9F\93\89";
"chart-increasing"="\F0\9F\93\88";
"cloud"="\E2\98\81";
"cross-mark"="\E2\9D\8C";
"earth"="\F0\9F\8C\8D";
"fire"="\F0\9F\94\A5";
"floppy-disk"="\F0\9F\92\BE";
"high-voltage-sign"="\E2\9A\A1";
"incoming-envelope"="\F0\9F\93\A8";
"information"="\E2\84\B9";
"large-orange-circle"="\F0\9F\9F\A0";
"large-red-circle"="\F0\9F\94\B4";
"link"="\F0\9F\94\97";
"lock-with-ink-pen"="\F0\9F\94\8F";
"memo"="\F0\9F\93\9D";
"mobile-phone"="\F0\9F\93\B1";
"pushpin"="\F0\9F\93\8C";
"scissors"="\E2\9C\82";
"sparkles"="\E2\9C\A8";
"speech-balloon"="\F0\9F\92\AC";
"up-arrow"="\E2\AC\86";
"warning-sign"="\E2\9A\A0";
"white-heavy-check-mark"="\E2\9C\85"
}
:return (($Symbols->$1) . "\EF\B8\8F");
}
# Telegram Test
{
:global tgFunc
:global SymbolByUnicodeName
$tgFunc ("$[$SymbolByUnicodeName "calendar"] Telegram Test") ; # send OK
$tgFunc ("$[$SymbolByUnicodeName "calendar,memo"] Telegram Test") ; # Not OK
}
# Function $SymbolByUnicodeName by @eworm
:global SymbolByUnicodeName do={
:local Symbols {
"abacus"="\F0\9F\A7\AE";
"alarm-clock"="\E2\8F\B0";
"calendar"="\F0\9F\93\85";
"card-file-box"="\F0\9F\97\83";
"chart-decreasing"="\F0\9F\93\89";
"chart-increasing"="\F0\9F\93\88";
"cloud"="\E2\98\81";
"cross-mark"="\E2\9D\8C";
"earth"="\F0\9F\8C\8D";
"fire"="\F0\9F\94\A5";
"floppy-disk"="\F0\9F\92\BE";
"high-voltage-sign"="\E2\9A\A1";
"incoming-envelope"="\F0\9F\93\A8";
"information"="\E2\84\B9";
"large-orange-circle"="\F0\9F\9F\A0";
"large-red-circle"="\F0\9F\94\B4";
"link"="\F0\9F\94\97";
"lock-with-ink-pen"="\F0\9F\94\8F";
"memo"="\F0\9F\93\9D";
"mobile-phone"="\F0\9F\93\B1";
"pushpin"="\F0\9F\93\8C";
"scissors"="\E2\9C\82";
"sparkles"="\E2\9C\A8";
"speech-balloon"="\F0\9F\92\AC";
"up-arrow"="\E2\AC\86";
"warning-sign"="\E2\9A\A0";
"white-heavy-check-mark"="\E2\9C\85"
}
:local symnames [:toarray $1]
:local retval ""
:foreach symname in=$symnames do={
:set retval ($retval . ($Symbols->$symname))
}
:return ($retval . "\EF\B8\8F");
}
:do {
:global Symbols;
:local bot "5778830696:AAF0SNevlZom-i9l7B3tDU4fY_bcGqcyQ4M";
:local chatID "6397372473";
:set Symbols ("\E2\84\B9" . "\E2\8F\B0" . "\F0\9F\93\85" . "\F0\9F\97\83" . "\
F0\9F\94\8F" . "\F0\9F\94\97" . "\E2\9A\A0");
/tool fetch url="https://api.telegram.org/bot$bot/sendmessage\?
chat_id=$chatID&text=$Symbols" keep-result=no;} on-error={};
"chart-decreasing"="\F0\9F\93\89";
"chart-increasing"="\F0\9F\93\88";
"cloud"="\E2\98\81";
"cross-mark"="\E2\9D\8C";
"earth"="\F0\9F\8C\8D";
"fire"="\F0\9F\94\A5";
"floppy-disk"="\F0\9F\92\BE";
"high-voltage-sign"=;
"incoming-envelope"="\F0\9F\93\A8";
"information"="\E2\84\B9";
"large-orange-circle"="\F0\9F\9F\A0";
"large-red-circle"="\F0\9F\94\B4";
"link"="\F0\9F\94\97";
"lock-with-ink-pen"="\F0\9F\94\8F";
"memo"="\F0\9F\93\9D";
"mobile-phone"="\F0\9F\93\B1";
"pushpin"="\F0\9F\93\8C";
"scissors"="\E2\9C\82";
"sparkles"="\E2\9C\A8";
"speech-balloon"="\F0\9F\92\AC";
"up-arrow"="\E2\AC\86";
"warning-sign"="\E2\9A\A0";
"white-heavy-check-mark"="\E2\9C\85"]);
/tool fetch url="https://api.telegram.org/bot$bot/sendmessage\?
chat_id=$chatID&text=$Symbols" keep-result=no;} on-error={};