ops/bin/envs.net/envs_user_info_genpage.pl

50 lines
1.2 KiB
Perl
Raw Normal View History

2019-10-14 22:08:03 +00:00
#!/usr/bin/perl
#
# envs.net - this script generates the user_updates.php
2019-10-14 22:08:03 +00:00
# source from pgadey (ctrl-c.club)
# url: https://github.com/pgadey/bin/blob/master/ctrl-c.club/updated.pl
2019-10-14 22:08:03 +00:00
#
print "<?php
// do not touch
// this files is generated by /usr/local/bin/envs.net/envs_user_updated.sh
2019-10-14 22:08:03 +00:00
\$title = \"envs.net | recently user updates\";
\$desc = \"envs.net | recently user updates\";
include 'header.php';
?>
<body id=\"body\" class=\"dark-mode\">
<div>
<div class=\"button_back\">
<pre class=\"clean\"><strong><a href=\"/\">&lt; back</a></strong></pre>
</div>
2020-01-20 01:31:05 +00:00
<div id=\"main\">
2019-10-14 22:08:03 +00:00
<div class=\"block\">
<h1><em>recently user updates</em></h1>
2020-01-20 01:34:47 +00:00
<p></p>
2019-10-14 22:08:03 +00:00
</div>
2020-01-19 20:12:09 +00:00
<pre>this is a static list of the pages modified in <code>/home/*/public_html/*</code>. it updates every hour.</pre>
<br />
2019-10-14 22:08:03 +00:00
<ul>\n";
while (<>) {
chomp;
($date, $index) = split(/ /, $_);
$date = `date --date="\@$date" +'%F %H:%M:%S'`;
$author = $index;
$file = $index;
$author =~ s%/home/(\w+)/public_html/(\S+)%$1%;
$file =~ s%/home/(\w+)/public_html/(\S+)%$2%;
print "<li><a href=\"https://envs.net/\~$author/\">\~$author</a> (<a href=\"https://envs.net/\~$author/$file\">$file</a>) at $date</li>\n";
};
print "</ul>
</div>
<?php include 'footer.php'; ?>";