Compare commits

...

42 commits

Author SHA1 Message Date
Christian Hesse
79c98a4b3a Merge branch 'screenshots' into next 2025-11-20 15:36:23 +01:00
Christian Hesse
e49f68c1f2 doc/mod/notification-matrix: update screenshots, with terminal window 2025-11-20 15:33:53 +01:00
Christian Hesse
2f4e83990a doc/mod/scriptrunonce: update screenshot, with terminal window 2025-11-20 15:33:53 +01:00
Christian Hesse
77dc0565a9 doc/mod/inspectvar: update screenshot, with terminal window 2025-11-20 15:32:56 +01:00
Christian Hesse
564c7f6bbc doc/mod/ipcalc: update screenshots, with terminal window 2025-11-20 15:31:40 +01:00
Christian Hesse
6718b90780 doc/mod/notification-telegram: update screenshot, with terminal window 2025-11-20 15:31:40 +01:00
Christian Hesse
e6faf346c2 doc/accesslist-duplicates: update screenshot, with terminal window 2025-11-20 14:58:39 +01:00
Christian Hesse
295fa3144a README: update screenshots, with terminal window
Started xterm with:

    xterm -xrm 'XTerm.vt100.allowTitleOps: false' -T 'Terminal: rsc.eworm.de'
2025-11-20 14:07:21 +01:00
Christian Hesse
b65f3512d0 README: add scheduler with start-time=startup 2025-11-20 14:03:00 +01:00
Christian Hesse
8a904dadf4 contrib/notification: add the copyright notice in footer 2025-11-20 11:53:55 +01:00
Christian Hesse
fa64e8906b contrib/logo-color: add the copyright notice in footer 2025-11-20 11:53:27 +01:00
Christian Hesse
2feaaf36b2 README: highlight the long way for first time users with hint 2025-11-20 11:26:59 +01:00
Christian Hesse
30743c0e87 README: mention broken installation for initial commands 2025-11-20 11:26:59 +01:00
Christian Hesse
725eb834f4 README: link the long way in detail 2025-11-20 11:26:59 +01:00
Christian Hesse
b97a434a9c Makefile: also clean contrib 2025-11-20 11:26:59 +01:00
Christian Hesse
70675a9fee contrib/Makefile: add target clean 2025-11-20 11:26:59 +01:00
Christian Hesse
e0b12a9050 contrib/static-html: add badges 2025-11-20 11:26:59 +01:00
Christian Hesse
a64e9bed80 contrib/static-html: find static html files by comment 2025-11-20 11:26:59 +01:00
Christian Hesse
e10455fb18 contrib/static-html: split off from Makefile 2025-11-20 11:26:59 +01:00
Christian Hesse
ed9dee3c5f contrib/html: simplify handling of relative paths 2025-11-20 11:26:59 +01:00
Christian Hesse
4f778cb1c6 general/clipboard: add a visual feedback 2025-11-20 11:26:59 +01:00
Christian Hesse
a61fbfb75c general/style: add a "📋 Copy!" hint to code blocks 2025-11-20 11:26:59 +01:00
Christian Hesse
903a3f44a0 contrib/html: support click on code block to copy to clipboard 2025-11-20 11:26:59 +01:00
Christian Hesse
638258000b contrib/commitinfo: support updating the commit info 2025-11-20 11:26:59 +01:00
Christian Hesse
b285f2c5d2 global-functions: add and fix global scheduler automatically...
... and also adjust README and INITIAL-COMMANDS.
2025-11-20 11:26:59 +01:00
Christian Hesse
93eb218589 global-functions: $FetchUserAgentStr: add commit info in user agent string 2025-11-20 11:26:59 +01:00
Christian Hesse
45e2f7b0a8 Merge branch 'rsc-eworm-de' into next 2025-11-20 11:26:59 +01:00
Christian Hesse
b29f3535b6 Merge branch 'contrib-template' into next 2025-11-20 11:26:59 +01:00
Christian Hesse
fa9c4be576 doc/mod/scriptrunonce: get script from rsc.eworm.de 2025-11-20 11:26:59 +01:00
Christian Hesse
ce37544bae contrib/logo-color: drop width & height properties for images 2025-11-20 11:26:59 +01:00
Christian Hesse
aeca778284 contrib/template-wifi: split off from Makefile 2025-11-20 11:26:59 +01:00
Christian Hesse
af5f01a973 INITIAL-COMMANDS: install from rsc.eworm.de 2025-11-20 11:26:59 +01:00
Christian Hesse
0b7528db99 contrib/logo-color: place screenshots below each other...
... not side by side.
2025-11-20 11:26:59 +01:00
Christian Hesse
54612e333f contrib/template-local: split off from Makefile 2025-11-20 11:26:59 +01:00
Christian Hesse
05f0838119 README: install from rsc.eworm.de 2025-11-20 11:26:59 +01:00
Christian Hesse
c6451c87f1 general/style: make the blockquote darker 2025-11-20 11:26:59 +01:00
Christian Hesse
4935c81bd9 contrib/template-capsman: split off from Makefile 2025-11-20 11:26:59 +01:00
Christian Hesse
d12be8f1ac fw-addr-lists.d/allow: use rsc.eworm.de in the list 2025-11-20 11:26:59 +01:00
Christian Hesse
c4a060c3d4 Merge branch 'contrib-html-head-foot' into next 2025-11-20 11:26:59 +01:00
Christian Hesse
f3afee3e4b fw-addr-lists.d/{allow,block}: use short url rsc.eworm.de 2025-11-20 11:26:59 +01:00
Christian Hesse
82587ec589 contrib/html: add copyright notice in footer 2025-11-20 11:26:59 +01:00
Christian Hesse
edd51ca719 contrib/html: add a footer with date and version info 2025-11-20 11:23:45 +01:00
55 changed files with 177 additions and 65 deletions

View file

@ -17,7 +17,7 @@ Initial commands
Run the complete base installation: Run the complete base installation:
{ {
:local BaseUrl "https://git.eworm.de/cgit/routeros-scripts/plain/"; :local BaseUrl "https://rsc.eworm.de/main/";
:local CertCommonName "ISRG Root X2"; :local CertCommonName "ISRG Root X2";
:local CertFileName "ISRG-Root-X2.pem"; :local CertFileName "ISRG-Root-X2.pem";
:local CertFingerprint "69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470"; :local CertFingerprint "69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470";
@ -45,9 +45,6 @@ Run the complete base installation:
}; };
:put "Loading configuration and functions..."; :put "Loading configuration and functions...";
/system/script { run global-config; run global-functions; }; /system/script { run global-config; run global-functions; };
:put "Scheduling to load configuration and functions...";
/system/scheduler/remove [ find where name="global-scripts" ];
/system/scheduler/add name="global-scripts" start-time=startup on-event="/system/script { run global-config; run global-functions; }";
:if ([ :len [ /certificate/find where fingerprint=$CertFingerprint ] ] > 0) do={ :if ([ :len [ /certificate/find where fingerprint=$CertFingerprint ] ] > 0) do={
:put "Renaming certificate by its common-name..."; :put "Renaming certificate by its common-name...";
:global CertificateNameByCN; :global CertificateNameByCN;

View file

@ -8,7 +8,11 @@ GEN_RSC := $(wildcard *.capsman.rsc *.local.rsc *.wifi.rsc)
MARKDOWN := $(wildcard *.md doc/*.md doc/mod/*.md) MARKDOWN := $(wildcard *.md doc/*.md doc/mod/*.md)
HTML := $(MARKDOWN:.md=.html) HTML := $(MARKDOWN:.md=.html)
.PHONY: all checksums docs rsc clean DATE ?= $(shell date --rfc-email)
VERSION ?= $(shell git symbolic-ref --short HEAD 2>/dev/null)/$(shell git rev-list --count HEAD 2>/dev/null)/$(shell git rev-parse --short=8 HEAD 2>/dev/null)
export DATE VERSION
.PHONY: all checksums commitinfo docs rsc clean
all: checksums docs rsc all: checksums docs rsc
@ -17,30 +21,26 @@ checksums: checksums.json
checksums.json: contrib/checksums.sh $(ALL_RSC) checksums.json: contrib/checksums.sh $(ALL_RSC)
contrib/checksums.sh > $@ contrib/checksums.sh > $@
commitinfo: global-functions.rsc
contrib/commitinfo.sh $< > $<~
mv $<~ $<
docs: $(HTML) docs: $(HTML)
%.html: %.md general/style.css contrib/html.sh contrib/html.sh.d/head.html %.html: %.md general/style.css contrib/html.sh contrib/html.sh.d/head.html contrib/html.sh.d/foot.html
contrib/html.sh $< > $@ contrib/html.sh $< > $@
rsc: $(GEN_RSC) rsc: $(GEN_RSC)
%.capsman.rsc: %.template.rsc Makefile %.capsman.rsc: %.template.rsc contrib/template-capsman.sh
sed -e '/\/interface\/wifi\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.capsman|' \ contrib/template-capsman.sh $< > $@
-e '/^# NOT \/caps-man\/ #$$/,/^# NOT \/caps-man\/ #$$/d' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
< $< > $@
%.local.rsc: %.template.rsc Makefile %.local.rsc: %.template.rsc contrib/template-local.sh
sed -e '/\/caps-man\//d' -e '/\/interface\/wifi\//d' -e 's|%TEMPL%|.local|' \ contrib/template-local.sh $< > $@
-e '/^# NOT \/interface\/wireless\/ #$$/,/^# NOT \/interface\/wireless\/ #$$/d' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
< $< > $@
%.wifi.rsc: %.template.rsc Makefile %.wifi.rsc: %.template.rsc contrib/template-wifi.sh
sed -e '/\/caps-man\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.wifi|' \ contrib/template-wifi.sh $< > $@
-e '/^# NOT \/interface\/wifi\/ #$$/,/^# NOT \/interface\/wifi\/ #$$/d' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
< $< > $@
clean: clean:
rm -f $(HTML) checksums.json rm -f $(HTML) checksums.json
make -C contrib/ clean

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After

View file

@ -55,9 +55,12 @@ Initial setup
### Get me ready! ### Get me ready!
If you know how things work just copy and paste the If you know how things work just copy and paste the
[initial commands](INITIAL-COMMANDS.md). Remember to edit and rerun [initial commands](INITIAL-COMMANDS.md). These also support fixing an
existing but broken installation. Remember to edit and rerun
`global-config-overlay`! `global-config-overlay`!
First time users should take the long way below.
> 💡️ **Hint**: First time users should take
> [the long way in detail](#the-long-way-in-detail) below.
### Live presentation ### Live presentation
@ -87,7 +90,7 @@ If you intend to download the scripts from a
different location (for example from github.com) install the corresponding different location (for example from github.com) install the corresponding
certificate chain. certificate chain.
/tool/fetch "https://git.eworm.de/cgit/routeros-scripts/plain/certs/ISRG-Root-X2.pem" dst-path="isrg-root-x2.pem"; /tool/fetch "https://rsc.eworm.de/main/certs/ISRG-Root-X2.pem" dst-path="isrg-root-x2.pem";
![screenshot: download certs](README.d/01-download-certs.avif) ![screenshot: download certs](README.d/01-download-certs.avif)
@ -125,16 +128,16 @@ date and time is set correctly!
Now let's download the main scripts and add them in configuration on the fly. Now let's download the main scripts and add them in configuration on the fly.
:foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={ /system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ("https://git.eworm.de/cgit/routeros-scripts/plain/" . $Script . ".rsc") output=user as-value]->"data"); }; :foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={ /system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ("https://rsc.eworm.de/main/" . $Script . ".rsc") output=user as-value]->"data"); };
![screenshot: import scripts](README.d/04-import-scripts.avif) ![screenshot: import scripts](README.d/04-import-scripts.avif)
And finally load configuration and functions and add the scheduler. And finally run configuration and functions. This will also add the
scheduler for loading at system startup automatically.
/system/script { run global-config; run global-functions; }; /system/script { run global-config; run global-functions; };
/system/scheduler/add name="global-scripts" start-time=startup on-event="/system/script { run global-config; run global-functions; }";
![screenshot: run and schedule scripts](README.d/05-run-and-schedule-scripts.avif) ![screenshot: run scripts](README.d/05-run-scripts.avif)
> 💡️ **Hint**: You see complaints regarding syntax errors? Most likely the > 💡️ **Hint**: You see complaints regarding syntax errors? Most likely the
> RouterOS on your device is too old. Check for updates! > RouterOS on your device is too old. Check for updates!
@ -222,7 +225,7 @@ cleanup add a scheduler entry.
$ScriptInstallUpdate dhcp-to-dns,lease-script; $ScriptInstallUpdate dhcp-to-dns,lease-script;
/ip/dhcp-server/set lease-script=lease-script [ find ]; /ip/dhcp-server/set lease-script=lease-script [ find ];
/system/scheduler/add name="dhcp-to-dns" interval=5m on-event="/system/script/run dhcp-to-dns;"; /system/scheduler/add name="dhcp-to-dns" interval=5m start-time=startup on-event="/system/script/run dhcp-to-dns;";
![screenshot: setup lease script](README.d/12-setup-lease-script.avif) ![screenshot: setup lease script](README.d/12-setup-lease-script.avif)

View file

@ -1,13 +1,17 @@
# Makefile # Makefile
HTML := $(wildcard *.html) HTML := $(shell grep -xl '<!-- static html //-->' *.html)
.PHONY: all docs .PHONY: all docs clean
all: docs all: docs
docs: $(HTML) badges.html: badges.md
sed -i \ markdown $< > $@
-e '/href=/s|\.md|\.html|' \
-e '/blockquote/s|/\*! display \*/|display: none;|' \ docs: static-html.sh $(HTML) badges.html
$(HTML) ./static-html.sh $(HTML)
clean:
rm -f badges.html
git checkout HEAD -- $(HTML)

6
contrib/badges.md Normal file
View file

@ -0,0 +1,6 @@
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

6
contrib/commitinfo.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
sed \
-e "/^:global CommitId/c :global CommitId \"${COMMITID:-unknown}\";" \
-e "/^:global CommitInfo/c :global CommitInfo \"${COMMITINFO:-unknown}\";" \
< "${1}"

View file

@ -6,16 +6,18 @@ RELTO="$(dirname "${1}")"
sed \ sed \
-e "s|__TITLE__|$(head -n1 "${1}")|" \ -e "s|__TITLE__|$(head -n1 "${1}")|" \
-e "s|__STYLE__|$(realpath --relative-to="${RELTO}" general/style.css)|" \ -e "s|__GENERAL__|$(realpath --relative-to="${RELTO}" general/)|" \
-e "s|__LOGO__|$(realpath --relative-to="${RELTO}" logo.png)|" \ -e "s|__ROOT__|$(realpath --relative-to="${RELTO}" ./)|" \
-e "s|__EWORM__|$(realpath --relative-to="${RELTO}" general/eworm-meadow.avif)|" \
-e "s|__QR_CODE__|$(realpath --relative-to="${RELTO}" general/qr-code.png)|" \
< "${0}.d/head.html" < "${0}.d/head.html"
markdown -f toc,idanchor "${1}" | sed \ markdown -f toc,idanchor "${1}" | sed \
-e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \ -e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \
-e '/<h[1234] /s| id="\(.*\)">| id="\L\1">|' \ -e '/<h[1234] /s| id="\(.*\)">| id="\L\1">|' \
-e '/<h[1234] /s|-2[1789cd]-||g' -e '/<h[1234] /s|--26-amp-3b-||g' \ -e '/<h[1234] /s|-2[1789cd]-||g' -e '/<h[1234] /s|--26-amp-3b-||g' \
-e '/^<pre>/s|pre|pre onclick="CopyToClipboard(this)"|g' \
-e '/The above link may be broken on code hosting sites/s|blockquote|blockquote style="display: none;"|' -e '/The above link may be broken on code hosting sites/s|blockquote|blockquote style="display: none;"|'
printf '</body></html>' sed \
-e "s|__DATE__|${DATE:-$(date --rfc-email)}|" \
-e "s|__VERSION__|${VERSION:-unknown}|" \
< "${0}.d/foot.html"

View file

@ -0,0 +1,5 @@
<p class="foot">RouterOS Scripts documentation generated on <i>__DATE__</i> for <i>__VERSION__</i><br />
Copyright &copy; 2013-2025 Christian Hesse &lt;mail@eworm.de&gt;</p>
</body></html>

View file

@ -1,13 +1,14 @@
<!DOCTYPE html><html lang="en"> <!DOCTYPE html><html lang="en">
<head><meta http-equiv="content-type" content="text/html; charset=UTF-8"> <head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>RouterOS Scripts :: __TITLE__</title> <title>RouterOS Scripts :: __TITLE__</title>
<link rel="stylesheet" type="text/css" href="__STYLE__"> <link rel="stylesheet" type="text/css" href="__GENERAL__/style.css">
<link rel="icon" type="image/png" href="__LOGO__"> <link rel="icon" type="image/png" href="__ROOT__/logo.png">
<script type="text/javascript" src="__GENERAL__/clipboard.js"></script>
</head><body> </head><body>
<table><tr> <table><tr>
<td><img src="__EWORM__" alt="eworm on meadow" /></td> <td><img src="__GENERAL__/eworm-meadow.avif" alt="eworm on meadow" /></td>
<td><img src="__QR_CODE__" alt="QR code: rsc.eworm.de" /></td> <td><img src="__GENERAL__/qr-code.png" alt="QR code: rsc.eworm.de" /></td>
<td class="head"><span class="top">RouterOS Scripts</span><br /> <td class="head"><span class="top">RouterOS Scripts</span><br />
<span class="bottom">a collection of scripts for MikroTik RouterOS</span></td> <span class="bottom">a collection of scripts for MikroTik RouterOS</span></td>
</tr></table> </tr></table>

View file

@ -1,4 +1,5 @@
<!DOCTYPE html><html lang="en"> <!DOCTYPE html><html lang="en">
<!-- static html //-->
<head><meta http-equiv="content-type" content="text/html; charset=UTF-8"> <head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>RouterOS Scripts :: Logo Color Changer</title> <title>RouterOS Scripts :: Logo Color Changer</title>
<link rel="stylesheet" type="text/css" href="../general/style.css"> <link rel="stylesheet" type="text/css" href="../general/style.css">
@ -16,9 +17,11 @@
<h1>Logo Color Changer</h1> <h1>Logo Color Changer</h1>
<!-- badges here //-->
<p><a href="../README.md">⬅️ Go back to main README</a></p> <p><a href="../README.md">⬅️ Go back to main README</a></p>
<blockquote style="/*! display */"><p>💡️ <strong>Hint</strong>: This site or links <blockquote style="/* display */"><p>💡️ <strong>Hint</strong>: This site or links
on it may be broken on code hosting sites. Use on it may be broken on code hosting sites. Use
<a href="https://rsc.eworm.de/main/contrib/logo-color.html">Logo Color Changer</a> <a href="https://rsc.eworm.de/main/contrib/logo-color.html">Logo Color Changer</a>
instead.</p></blockquote> instead.</p></blockquote>
@ -37,9 +40,9 @@ something that differentiates? Color it!</p>
<p>Then right-click, click "<i>Take Screenshot</i>" and finally select the <p>Then right-click, click "<i>Take Screenshot</i>" and finally select the
logo and download it.</p> logo and download it.</p>
<p><img src="logo-color.d/browser-01.avif" width=533 height=482 alt="Screenshot Browser 01"> <p><img src="logo-color.d/browser-01.avif" alt="Screenshot Browser 01"></p>
<img src="logo-color.d/browser-02.avif" width=533 height=482 alt="Screenshot Browser 02"> <p><img src="logo-color.d/browser-02.avif" alt="Screenshot Browser 02"></p>
<img src="logo-color.d/browser-03.avif" width=533 height=482 alt="Screenshot Browser 03"></p> <p><img src="logo-color.d/browser-03.avif" alt="Screenshot Browser 03"></p>
<p>(This example is with <p>(This example is with
<a href="https://www.mozilla.org/de/firefox/new/">Firefox</a>. The workflow <a href="https://www.mozilla.org/de/firefox/new/">Firefox</a>. The workflow
@ -53,4 +56,7 @@ a profile photo</a> for your Telegram bot.</p>
<p><a href="../README.md">⬅️ Go back to main README</a><br/> <p><a href="../README.md">⬅️ Go back to main README</a><br/>
<a href="#top">⬆️ Go back to top</a></p> <a href="#top">⬆️ Go back to top</a></p>
<p class="foot">Copyright &copy; 2013-2025 Christian Hesse &lt;mail@eworm.de&gt;</p>
</body></html> </body></html>

View file

@ -1,4 +1,5 @@
<!DOCTYPE html><html lang="en"> <!DOCTYPE html><html lang="en">
<!-- static html //-->
<head><meta http-equiv="content-type" content="text/html; charset=UTF-8"> <head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>RouterOS Scripts :: Notification Generator</title> <title>RouterOS Scripts :: Notification Generator</title>
<link rel="stylesheet" type="text/css" href="../general/style.css"> <link rel="stylesheet" type="text/css" href="../general/style.css">
@ -16,9 +17,11 @@
<h1>Notification Generator</h1> <h1>Notification Generator</h1>
<!-- badges here //-->
<p><a href="../README.md">⬅️ Go back to main README</a></p> <p><a href="../README.md">⬅️ Go back to main README</a></p>
<blockquote style="/*! display */"><p>💡️ <strong>Hint</strong>: This site or links <blockquote style="/* display */"><p>💡️ <strong>Hint</strong>: This site or links
on it may be broken on code hosting sites. Use on it may be broken on code hosting sites. Use
<a href="https://rsc.eworm.de/main/contrib/notification.html">Notification Generator</a> <a href="https://rsc.eworm.de/main/contrib/notification.html">Notification Generator</a>
instead.</p></blockquote> instead.</p></blockquote>
@ -48,4 +51,7 @@ notification and download it.</p>
<p><a href="../README.md">⬅️ Go back to main README</a><br/> <p><a href="../README.md">⬅️ Go back to main README</a><br/>
<a href="#top">⬆️ Go back to top</a></p> <a href="#top">⬆️ Go back to top</a></p>
<p class="foot">Copyright &copy; 2013-2025 Christian Hesse &lt;mail@eworm.de&gt;</p>
</body></html> </body></html>

10
contrib/static-html.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
set -e
sed -i \
-e '/href=/s|\.md|\.html|' \
-e '/blockquote/s|/\* display \*/|display: none;|' \
-e '/<!-- badges here \/\/-->/r badges.html' \
-e '/<!-- badges here \/\/-->/d' \
"${@}"

11
contrib/template-capsman.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
set -e
sed \
-e '/\/interface\/wifi\//d' \
-e '/\/interface\/wireless\//d' \
-e 's|%TEMPL%|.capsman|' \
-e '/^# NOT \/caps-man\/ #$/,/^# NOT \/caps-man\/ #$/d' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
< "${1}"

11
contrib/template-local.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
set -e
sed \
-e '/\/caps-man\//d' \
-e '/\/interface\/wifi\//d' \
-e 's|%TEMPL%|.local|' \
-e '/^# NOT \/interface\/wireless\/ #$/,/^# NOT \/interface\/wireless\/ #$/d' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
< "${1}"

11
contrib/template-wifi.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
set -e
sed \
-e '/\/caps-man\//d' \
-e '/\/interface\/wireless\//d' \
-e 's|%TEMPL%|.wifi|' \
-e '/^# NOT \/interface\/wifi\/ #$/,/^# NOT \/interface\/wifi\/ #$/d' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
< "${1}"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -33,7 +33,7 @@ Call the function `$InspectVar` with a variable as parameter:
$InspectVar $ModeButton; $InspectVar $ModeButton;
![InspectVar](inspectvar.d/inspectvar.avif) ![InspectVar](inspectvar.d/01-inspectvar.avif)
--- ---
[⬅️ Go back to main README](../../README.md) [⬅️ Go back to main README](../../README.md)

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -43,7 +43,7 @@ It expects an IP address in CIDR notation as argument.
$IPCalc 192.168.88.1/24; $IPCalc 192.168.88.1/24;
![IPCalc](ipcalc.d/ipcalc.avif) ![IPCalc](ipcalc.d/01-ipcalc.avif)
### IPCalcReturn ### IPCalcReturn
@ -53,7 +53,7 @@ the information in a named array.
:put ([ $IPCalcReturn 192.168.88.1/24 ]->"broadcast"); :put ([ $IPCalcReturn 192.168.88.1/24 ]->"broadcast");
![IPCalcReturn](ipcalc.d/ipcalcreturn.avif) ![IPCalcReturn](ipcalc.d/02-ipcalcreturn.avif)
--- ---
[⬅️ Go back to main README](../../README.md) [⬅️ Go back to main README](../../README.md)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -36,7 +36,7 @@ Configuration
Open Telegram, then start a chat with [BotFather ↗️](https://t.me/BotFather) and Open Telegram, then start a chat with [BotFather ↗️](https://t.me/BotFather) and
create your own bot: create your own bot:
![create new bot](notification-telegram.d/newbot.avif) ![create new bot](notification-telegram.d/01-newbot.avif)
Set that token from *BotFather* (use your own!) to `TelegramTokenId`, for Set that token from *BotFather* (use your own!) to `TelegramTokenId`, for
now just temporarily: now just temporarily:
@ -49,7 +49,7 @@ then send your first message. Any text will do. On your device run
$GetTelegramChatId; $GetTelegramChatId;
![get chat id](notification-telegram.d/getchatid.avif) ![get chat id](notification-telegram.d/02-getchatid.avif)
Finally edit `global-config-overlay`, add `TelegramTokenId` with the token Finally edit `global-config-overlay`, add `TelegramTokenId` with the token
from *BotFather* and `TelegramChatId` with your retrieved chat id. Then from *BotFather* and `TelegramChatId` with your retrieved chat id. Then
@ -104,7 +104,7 @@ Tips & Tricks
You can use a profile photo for your bot to make it recognizable. Open the You can use a profile photo for your bot to make it recognizable. Open the
chat with [BotFather ↗️](https://t.me/BotFather) and set it there. chat with [BotFather ↗️](https://t.me/BotFather) and set it there.
![set profile photo](notification-telegram.d/setuserpic.avif) ![set profile photo](notification-telegram.d/03-setuserpic.avif)
Have a look at my [Logo Color Changer](../../contrib/logo-color.html) Have a look at my [Logo Color Changer](../../contrib/logo-color.html)
to create a colored version of this scripts' logo. to create a colored version of this scripts' logo.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -48,9 +48,9 @@ Usage and invocation
The function `$ScriptRunOnce` expects an URL (or name if The function `$ScriptRunOnce` expects an URL (or name if
`ScriptRunOnceBaseUrl` is given) pointing to a script as parameter. `ScriptRunOnceBaseUrl` is given) pointing to a script as parameter.
$ScriptRunOnce https://git.eworm.de/cgit/routeros-scripts/plain/doc/mod/scriptrunonce.d/hello-world.rsc; $ScriptRunOnce https://rsc.eworm.de/main/doc/mod/scriptrunonce.d/hello-world.rsc;
![ScriptRunOnce](scriptrunonce.d/scriptrunonce.avif) ![ScriptRunOnce](scriptrunonce.d/01-scriptrunonce.avif)
Giving multiple scripts is possible, separated by comma. Giving multiple scripts is possible, separated by comma.

View file

@ -1,3 +1,3 @@
# an ip address list for use with fw-addr-lists script # an ip address list for use with fw-addr-lists script
# https://git.eworm.de/cgit/routeros-scripts/about/doc/fw-addr-lists.md # https://rsc.eworm.de/doc/fw-addr-lists.md
git.eworm.de rsc.eworm.de

View file

@ -1,5 +1,5 @@
# an ip address list for use with fw-addr-lists script # an ip address list for use with fw-addr-lists script
# https://git.eworm.de/cgit/routeros-scripts/about/doc/fw-addr-lists.md # https://rsc.eworm.de/doc/fw-addr-lists.md
# example.net # example.net
93.184.216.34 93.184.216.34

8
general/clipboard.js Normal file
View file

@ -0,0 +1,8 @@
/* copy code to clipboard */
function CopyToClipboard(element) {
element.style.filter = 'invert(1)';
navigator.clipboard.writeText(element.firstElementChild.innerHTML);
setTimeout(function() {
element.style.filter = 'invert(0)';
}, 100);
}

View file

@ -18,7 +18,7 @@ a:hover {
blockquote { blockquote {
border-left: 4px solid #ccc; border-left: 4px solid #ccc;
padding: 0 10px; padding: 0 10px;
color: #777; color: #555;
} }
code { code {
margin: 0 2px; margin: 0 2px;
@ -43,6 +43,10 @@ img.logo {
float: left; float: left;
border-radius: 50%; border-radius: 50%;
} }
p.foot {
color: #777;
text-align: center;
}
p.heading { p.heading {
margin: 0px; margin: 0px;
font-weight: bold; font-weight: bold;
@ -65,6 +69,12 @@ pre code {
padding: 0; padding: 0;
border: 0; border: 0;
} }
pre::before {
content: "📋 Copy!";
float: right;
border: 1px solid #ccc;
border-radius: 3px;
}
span.link { span.link {
color: #863600; color: #863600;
} }

View file

@ -6,7 +6,7 @@
# https://rsc.eworm.de/#editing-configuration # https://rsc.eworm.de/#editing-configuration
# Copy relevant configuration from global-config, paste and modify it here. # Copy relevant configuration from global-config, paste and modify it here.
# https://rsc.eworm.de/global-config.rsc # https://rsc.eworm.de/main/global-config.rsc
# End of global-config-overlay # End of global-config-overlay

View file

@ -539,10 +539,16 @@
:set FetchUserAgentStr do={ :set FetchUserAgentStr do={
:local Caller [ :tostr $1 ]; :local Caller [ :tostr $1 ];
:global CommitId;
:global CommitInfo;
:global IfThenElse;
:local Resource [ /system/resource/get ]; :local Resource [ /system/resource/get ];
:return ("User-Agent: Mikrotik/" . $Resource->"version" . " " . \ :return ("User-Agent: Mikrotik/" . $Resource->"version" . " " . $Resource->"architecture-name" . \
$Resource->"architecture-name" . " " . $Caller . "/Fetch (https://rsc.eworm.de/)"); " " . $Caller . "/Fetch (https://rsc.eworm.de/" . [ $IfThenElse ($CommitId != "unknown") \
("; " . $CommitInfo . "/" . [ :pick $CommitId 0 8 ]) ] . ")");
} }
# check for existence of file, optionally with type # check for existence of file, optionally with type
@ -1894,6 +1900,15 @@
} }
} }
# add (and fix) global scripts scheduler
:local OnEvent "/system/script { run global-config; run global-functions; }";
:if ([ :len [ /system/scheduler/find where name="global-scripts" ] ] = 0) do={
/system/scheduler/add name="global-scripts" start-time=startup;
}
:if ([ /system/scheduler/get "global-scripts" on-event ] != $OnEvent) do={
/system/scheduler/set "global-scripts" on-event=$OnEvent;
}
# Log success # Log success
:local Resource [ /system/resource/get ]; :local Resource [ /system/resource/get ];
$LogPrintOnce info $ScriptName ("Loaded on " . $Resource->"board-name" . \ $LogPrintOnce info $ScriptName ("Loaded on " . $Resource->"board-name" . \