diff --git a/Makefile b/Makefile index a741fef..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 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' 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..0ce3ff7 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -1,6 +1,6 @@ -
You want the logo for your own notifications? But you joined the Telegram Group and want @@ -36,5 +36,8 @@ for other browsers may differ.)
Set a profile photo for your Telegram bot. - - +⬅️ Go back to main README
+⬆️ Go back to top
[MikroTik] ℹ️ Subject
Message
🔗 https://eworm.de/
-⏰ This message was queued since oct/18/2022 18:30:48 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%!
Subject:
Message:
Show link:
-Queued since
+Queued since
Cut-off with percent
Then right-click, click "Take Screenshot" and finally select the notification and download it.
- - +