mirror of
https://github.com/tildeclub/tilde.club.git
synced 2026-03-10 05:00:19 +00:00
add my recently-updated-pages shell scripts (both HTML and JSON versions)
This commit is contained in:
2
api/recently-updated/findmod-json.sh
Executable file
2
api/recently-updated/findmod-json.sh
Executable file
@@ -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++'
|
||||
5
api/recently-updated/findmod.sh
Executable file
5
api/recently-updated/findmod.sh
Executable file
@@ -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 (.*) (.*)|<li><a class="homepage-link" href="http://tilde.club/~$2">$2</a> <time datetime="$4">$3</time></li>|'
|
||||
cat /home/delfuego/bin/footer.tpl
|
||||
|
||||
4
api/recently-updated/footer.tpl
Normal file
4
api/recently-updated/footer.tpl
Normal file
@@ -0,0 +1,4 @@
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
10
api/recently-updated/header.tpl
Normal file
10
api/recently-updated/header.tpl
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>tilde.24h</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>tilde.club home pages updated in last 24 hours</h1>
|
||||
<div>There's also <a href="./tilde.24h.json">a JSON version of this data</a>; it's all updated once a minute, so hold yer damn horses, people. Also, times are in the server's time zone (GMT, it appears).</div>
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user