commit 170ab29aca28ddeebd466a44e907f8583e7006a9 parent cc5cfb85ff60262aae3ff662e86ef370deeb8953 Author: JayVii <jayvii[AT]posteo[DOT]de> Date: Fri, 20 Dec 2024 09:01:40 +0100 fix: only show domain name rather than sub-domain Diffstat:
M | fetch_favicon.sh | | | 3 | ++- |
M | run.sh | | | 4 | +++- |
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/fetch_favicon.sh b/fetch_favicon.sh @@ -12,7 +12,8 @@ URLS=`grep -E "^\s*-*\ web:" "$CONFIG" | sed -e 's/^.*web:\ //g'` # get domains DOMAINS=` - echo "$URLS" | sed -E -e 's/https:\/\/([^\/]+).*$/\1/g' | sort | uniq + echo "$URLS" | sed -E -e 's/https:\/\/([^\.]*\.*)([^\/]+).*$/\2/g' | \ + sort | uniq ` # Ensure directory exists diff --git a/run.sh b/run.sh @@ -43,7 +43,9 @@ sed -E -e "s/<\!--MANIFEST-->/\"$MANIFEST\"/" -i "$HTML" # sed -E -e 's/<\!--IMG\ src=\"https:\/\/([^\/]*)[^\"]*(\"[^>]*>)-->/<img src=\"assets\/site-icons\/\1\2 \1/g' -i "$HTML" # insert feed domain -sed -E -e 's/<\!--IMG\ src=\"https:\/\/([^\/]*)[^\"]*(\"[^>]*>)-->/\1/g' -i "$HTML" +sed -E \ + -e 's/<\!--IMG\ src=\"https:\/\/([^\.]*\.*)([^\/]+)[^\"]*(\"[^>]*>)-->/\2/g' \ + -i "$HTML" # Insert feeds list printf "Inserting feeds list...\n"