From 9e7d5d1ce381244631960b4fab2d3aafb94904d9 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 14:55:00 +0100 Subject: [PATCH 1/9] contrib/html.sh: link the logo with relative path --- contrib/html.sh | 1 + contrib/html.sh.d/head.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/html.sh b/contrib/html.sh index 287119f..3b5b420 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -6,6 +6,7 @@ RELTO="$(dirname "${1}")" sed \ -e "s|__TITLE__|$(head -n1 "${1}")|" \ -e "s|__STYLE__|$(realpath --relative-to="${RELTO}" style.css)|" \ + -e "s|__LOGO__|$(realpath --relative-to="${RELTO}" logo.png)|" \ < "${0}.d/head.html" markdown -f toc,idanchor "${1}" | sed \ -e 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' \ diff --git a/contrib/html.sh.d/head.html b/contrib/html.sh.d/head.html index 50653ae..779e246 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -2,5 +2,5 @@ RouterOS Scripts :: __TITLE__ - + From ef5929358e802a86b3bebcba5f9cd57dc8b48860 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 15:19:32 +0100 Subject: [PATCH 2/9] contrib/*: unify html code --- contrib/html.sh.d/head.html | 4 ++-- contrib/logo-color.html | 17 +++++++---------- contrib/notification.html | 17 +++++++---------- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/contrib/html.sh.d/head.html b/contrib/html.sh.d/head.html index 779e246..0ce3ff7 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -1,6 +1,6 @@ -RouterOS Scripts :: __TITLE__ - + +RouterOS Scripts :: __TITLE__ diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 802e36c..1dc74b0 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -1,14 +1,12 @@ - - - - -RouterOS-Scripts Logo Color Changer + + +RouterOS Scripts :: Logo Color Changer + - - + -

RouterOS-Scripts Logo Color Changer

+

Logo Color Changer

You want the logo for your own notifications? But you joined the Telegram Group and want @@ -36,5 +34,4 @@ for other browsers may differ.)

Set a profile photo for your Telegram bot.

- - + diff --git a/contrib/notification.html b/contrib/notification.html index 49bf8bd..1bd1ca5 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -1,14 +1,12 @@ - - - - -RouterOS-Scripts Notification Generator + + +RouterOS Scripts :: Notification Generator + - - + -

RouterOS-Scripts Notification Generator

+

Notification Generator

@@ -31,5 +29,4 @@

Then right-click, click "Take Screenshot" and finally select the notification and download it.

- - + From 1e64bbeccba1f4d2fa2e1bcef86fcf307c33724c Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 15:35:14 +0100 Subject: [PATCH 3/9] contrib/{logo-color,notification}: add navigation structure --- contrib/logo-color.html | 6 ++++++ contrib/notification.html | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 1dc74b0..78d19e6 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -8,6 +8,8 @@

Logo Color Changer

+

⬅️ Go back to main README

+

You want the logo for your own notifications? But you joined the Telegram Group and want something that differentiates? Color it!

@@ -34,4 +36,8 @@ for other browsers may differ.)

Set a profile photo for your Telegram bot.

+
+ +

⬅️ Go back to main README
+⬆️ Go back to top

diff --git a/contrib/notification.html b/contrib/notification.html index 1bd1ca5..a0eaa11 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -8,6 +8,8 @@

Notification Generator

+

⬅️ Go back to main README

+
@@ -29,4 +31,8 @@

Then right-click, click "Take Screenshot" and finally select the notification and download it.

+
+ +

⬅️ Go back to main README
+⬆️ Go back to top

From ae1a7cb8751df5d53259e82c3b007a79cb5d64fa Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 16:06:42 +0100 Subject: [PATCH 4/9] contrib/notification: update date format --- contrib/notification.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/notification.html b/contrib/notification.html index a0eaa11..5d761b9 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -16,7 +16,7 @@

[MikroTik] ℹ️ Subject

Message
-

⏰ This message was queued since oct/18/2022 18:30:48 and may be obsolete.

+

⏰ This message was queued since 2025-10-29 16:06:18 and may be obsolete.

✂️ The message was too long and has been truncated, cut off 13%!

@@ -25,7 +25,7 @@

Subject:

Message:

Show link:

-

Queued since

+

Queued since

Cut-off with percent

Then right-click, click "Take Screenshot" and finally select the From 0be7195371d7fe455dcce0bf110769cd188a3824 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 16:11:23 +0100 Subject: [PATCH 5/9] contrib/notification: format the values italic --- contrib/notification.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/notification.html b/contrib/notification.html index 5d761b9..298e3bd 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -16,8 +16,8 @@

[MikroTik] ℹ️ Subject

Message
-

⏰ This message was queued since 2025-10-29 16:06:18 and may be obsolete.

-

✂️ The message was too long and has been truncated, cut off 13%!

+

⏰ This message was queued since 2025-10-29 16:06:18 and may be obsolete.

+

✂️ The message was too long and has been truncated, cut off 13%!

From fd94b7e76bbaf88841b58dbda4f1c6a2e88d093c Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 30 Oct 2025 11:07:38 +0100 Subject: [PATCH 6/9] contrib/checksums.sh: output to stdout... ... and let the Makefile redirect. --- Makefile | 2 +- contrib/checksums.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a741fef..bff5458 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ style.css: contrib/general/style.css < $< > $@ checksums.json: contrib/checksums.sh *.rsc */*.rsc - contrib/checksums.sh + contrib/checksums.sh > $@ clean: rm -f $(HTML) checksums.json diff --git a/contrib/checksums.sh b/contrib/checksums.sh index b472b49..ab4e973 100755 --- a/contrib/checksums.sh +++ b/contrib/checksums.sh @@ -6,4 +6,4 @@ set -e md5sum $(find -name '*.rsc' | sort) | \ sed -e "s| \./||" -e 's|.rsc$||' | \ - jq --raw-input --null-input '[ inputs | split (" ") | { (.[1]): (.[0]) }] | add' > 'checksums.json' + jq --raw-input --null-input '[ inputs | split (" ") | { (.[1]): (.[0]) }] | add' From 59c5bfcc27e7eb22079754de8a2277a967273168 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sun, 2 Nov 2025 09:19:16 +0100 Subject: [PATCH 7/9] global-functions: $ScriptInstallUpdate: give hint on ignore Fixes: https://github.com/eworm-de/routeros-scripts/issues/112 --- global-functions.rsc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/global-functions.rsc b/global-functions.rsc index 5ede654..69f7e03 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1314,6 +1314,11 @@ $LogPrint warning $0 ("Removing dummy. Typo on installation?"); /system/script/remove $Script; } + :if ([ :len ($ScriptInfo->"base-url") ] = 0 && [ :len ($ScriptInfo->"url-suffix") ] = 0 && \ + [ :len $CheckSum ] = 0) do={ + $LogPrintOnce warning $0 \ + ("Added the script manually? Skip updates with 'ignore=true' in comment."); + } :error false; } From 9592a132b7c1cc6f6148c8f7911011a971e9e9e0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 3 Nov 2025 09:17:25 +0100 Subject: [PATCH 8/9] global-functions: $ScriptInstallUpdate: extra actions on 'not found' only --- global-functions.rsc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/global-functions.rsc b/global-functions.rsc index 69f7e03..28223cc 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1310,6 +1310,10 @@ } } do={ $LogPrint warning $0 ("Failed fetching script '" . $ScriptVal->"name" . "': " . $Err); + :if ($Err != "Fetch failed with status 404") do={ + :error false; + } + :if ($ScriptVal->"source" = "#!rsc by RouterOS\n") do={ $LogPrint warning $0 ("Removing dummy. Typo on installation?"); /system/script/remove $Script; From 2462ec2f04d0f35b3053bd93419c9bd3f4fdd8ec Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 6 Nov 2025 17:32:37 +0100 Subject: [PATCH 9/9] Makefile: clean up and add targets --- Makefile | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index bff5458..e376e56 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,22 @@ # template scripts -> final scripts # markdown files -> html files -CAPSMAN = $(wildcard *.capsman.rsc) -LOCAL = $(wildcard *.local.rsc) -WIFI = $(wildcard *.wifi.rsc) +ALL_RSC := $(wildcard *.rsc */*.rsc) +GEN_RSC := $(wildcard *.capsman.rsc *.local.rsc *.wifi.rsc) -MARKDOWN = $(wildcard *.md doc/*.md doc/mod/*.md) -HTML = $(MARKDOWN:.md=.html) style.css +MARKDOWN := $(wildcard *.md doc/*.md doc/mod/*.md) +HTML := $(MARKDOWN:.md=.html) style.css -all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json +.PHONY: all checksums docs rsc clean + +all: checksums docs rsc + +checksums: checksums.json + +checksums.json: contrib/checksums.sh $(ALL_RSC) + contrib/checksums.sh > $@ + +docs: $(HTML) style.css: contrib/general/style.css cp $< $@ @@ -17,6 +25,8 @@ style.css: contrib/general/style.css %.html: %.md style.css contrib/html.sh contrib/html.sh.d/head.html contrib/html.sh $< > $@ +rsc: $(GEN_RSC) + %.capsman.rsc: %.template.rsc Makefile sed -e '/\/interface\/wifi\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.capsman|' \ -e '/^# NOT \/caps-man\/ #$$/,/^# NOT \/caps-man\/ #$$/d' \ @@ -35,8 +45,5 @@ style.css: contrib/general/style.css -e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \ < $< > $@ -checksums.json: contrib/checksums.sh *.rsc */*.rsc - contrib/checksums.sh > $@ - clean: rm -f $(HTML) checksums.json