diff --git a/api/recently-updated/findmod-json.sh b/api/recently-updated/findmod-json.sh new file mode 100755 index 0000000..d047dc8 --- /dev/null +++ b/api/recently-updated/findmod-json.sh @@ -0,0 +1,2 @@ +#!/bin/bash +find /home/*/public_html -regex "/home/\_?[0-9a-zA-Z]*/public_html/index.html" -type f -name "index.html" -mtime 0 -printf '%T@ %p %TD %Tr %TY-%Tm-%TdT%TTZ\n' 2> /dev/null | sort -r | perl -CSD -pe 'BEGIN { print "{ \"pagelist\": [ \n"; }; END { print "] }\n"; }; if ($i > 0) { print ", "; }; s|([0-9\.]+) /home/([\p{L}\p{N}_]*?)/public_html/index.html (.*) (.*)|{ "username": "$2", "homepage": "http://tilde.club/~$2/", "modtime": "$4" }|; $i++' diff --git a/api/recently-updated/findmod.sh b/api/recently-updated/findmod.sh new file mode 100755 index 0000000..fa36756 --- /dev/null +++ b/api/recently-updated/findmod.sh @@ -0,0 +1,5 @@ +#!/bin/bash +cat /home/delfuego/bin/header.tpl +find /home/*/public_html -regex "/home/\_?[0-9a-zA-Z]*/public_html/index.html" -type f -name "index.html" -mtime 0 -printf '%T@ %p %TD %Tr %TY-%Tm-%TdT%TTZ\n' 2> /dev/null | sort -r | perl -CSD -pe 's|([0-9\.]+) /home/([\p{L}\p{N}_]*?)/public_html/index.html (.*) (.*)|