basic bitch obfuscation of email, telephone
This commit is contained in:
@@ -7,11 +7,23 @@ if ! which gojq; then
|
||||
go install github.com/itchyny/gojq@latest
|
||||
fi &> /dev/null
|
||||
|
||||
html_escape_str() {
|
||||
local str="$1"
|
||||
for i in $(seq 0 $(("${#str}"-1))); do
|
||||
LC_CTYPE=C printf '&#%d;' "'"${1:i:1}
|
||||
done
|
||||
}
|
||||
html_escape_str contact@blapointe.com
|
||||
|
||||
while sleep 1; do
|
||||
date
|
||||
cat ./homebrew.yaml \
|
||||
| sed "s/@/$(html_escape_str @ | sed 's/\&/\\\&/g')/g" \
|
||||
| sed "s/mailto:/$(html_escape_str mailto: | sed 's/\&/\\\&/g')/g" \
|
||||
| sed "s/tel:/$(html_escape_str tel: | sed 's/\&/\\\&/g')/g" \
|
||||
| gojq --yaml-input . \
|
||||
| tpl --file homebrew.tmpl \
|
||||
> ./homebrew.html
|
||||
| tee ./homebrew.html \
|
||||
> /dev/null
|
||||
date
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user