commit: 4a52c1aba19613baae89b23ee35abd1ea2915a6b
parent 6c5e877e2da6fe0a8bfbb34ae9d98d8a65feca4b
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 3 Mar 2023 02:48:06 +0100
notes/index.xhtml: Add size and last-modified
Diffstat:
2 files changed, 53 insertions(+), 48 deletions(-)
diff --git a/notes/index.xhtml b/notes/index.xhtml
@@ -13,48 +13,48 @@
<tr><th class="sorttable_sorted">Name</th><th>Size</th><th>Last Modified</th></tr>
</thead>
<tbody>
- <tr><td><a href="0001-autotools-Lazily-change-libGL-to-libOpenGL.patch">0001-autotools-Lazily-change-libGL-to-libOpenGL.patch</a></td><td></td></tr>
- <tr><td><a href="NETGEAR%20ReadyNAS%20Duo%20v2">NETGEAR ReadyNAS Duo v2</a></td><td></td></tr>
- <tr><td><a href="PDAs">PDAs</a></td><td></td></tr>
- <tr><td><a href="PPC.txt">PPC.txt</a></td><td></td></tr>
- <tr><td><a href="SSH%20Daemon%20Comparison.md">SSH Daemon Comparison.md</a></td><td></td></tr>
- <tr><td><a href="VR-wayland.gmi">VR-wayland.gmi</a></td><td></td></tr>
- <tr><td><a href="ansi.txt">ansi.txt</a></td><td></td></tr>
- <tr><td><a href="bc.txt">bc.txt</a></td><td></td></tr>
- <tr><td><a href="bootstrapping">bootstrapping</a></td><td></td></tr>
- <tr><td><a href="ciphers.txt">ciphers.txt</a></td><td></td></tr>
- <tr><td><a href="cloudchaser-issues">cloudchaser-issues</a></td><td></td></tr>
- <tr><td><a href="computing-truths.txt">computing-truths.txt</a></td><td></td></tr>
- <tr><td><a href="drivers">drivers</a></td><td></td></tr>
- <tr><td><a href="editors">editors</a></td><td></td></tr>
- <tr><td><a href="feeds">feeds</a></td><td></td></tr>
- <tr><td><a href="font-test">font-test</a></td><td></td></tr>
- <tr><td><a href="font-test.js">font-test.js</a></td><td></td></tr>
- <tr><td><a href="free_ipv6.txt">free_ipv6.txt</a></td><td></td></tr>
- <tr><td><a href="gitlab">gitlab</a></td><td></td></tr>
- <tr><td><a href="index">index</a></td><td></td></tr>
- <tr><td><a href="license-pick">license-pick</a></td><td></td></tr>
- <tr><td><a href="minitel2.txt">minitel2.txt</a></td><td></td></tr>
- <tr><td><a href="native-terms">native-terms</a></td><td></td></tr>
- <tr><td><a href="native-terms/countries.txt">native-terms/countries.txt</a></td><td></td></tr>
- <tr><td><a href="native-terms/languages.txt">native-terms/languages.txt</a></td><td></td></tr>
- <tr><td><a href="new-install-checklist">new-install-checklist</a></td><td></td></tr>
- <tr><td><a href="oric-atmos">oric-atmos</a></td><td></td></tr>
- <tr><td><a href="osu%21">osu!</a></td><td></td></tr>
- <tr><td><a href="petitions">petitions</a></td><td></td></tr>
- <tr><td><a href="phone-required-features">phone-required-features</a></td><td></td></tr>
- <tr><td><a href="pure-wayland">pure-wayland</a></td><td></td></tr>
- <tr><td><a href="pure_wayland_T495_glewinfo.log">pure_wayland_T495_glewinfo.log</a></td><td></td></tr>
- <tr><td><a href="pure_wayland_T495_glinfo.log">pure_wayland_T495_glinfo.log</a></td><td></td></tr>
- <tr><td><a href="review%3A%20Anti-Capitalist%20Software%20License%20v%201.4.txt">review: Anti-Capitalist Software License v 1.4.txt</a></td><td></td></tr>
- <tr><td><a href="right_tool">right_tool</a></td><td></td></tr>
- <tr><td><a href="services">services</a></td><td></td></tr>
- <tr><td><a href="sucks.txt">sucks.txt</a></td><td></td></tr>
- <tr><td><a href="systems.json">systems.json</a></td><td></td></tr>
- <tr><td><a href="tips.md">tips.md</a></td><td></td></tr>
- <tr><td><a href="tuple_truth_table.txt">tuple_truth_table.txt</a></td><td></td></tr>
- <tr><td><a href="unix-defects">unix-defects</a></td><td></td></tr>
- <tr><td><a href="zfs">zfs</a></td><td></td></tr>
+ <tr><td><a href="0001-autotools-Lazily-change-libGL-to-libOpenGL.patch">0001-autotools-Lazily-change-libGL-to-libOpenGL.patch</a></td><td>16480</td><td>2021-03-12 11:07:38</td></tr>
+ <tr><td><a href="NETGEAR%20ReadyNAS%20Duo%20v2">NETGEAR ReadyNAS Duo v2</a></td><td>3231</td><td>2021-01-17 06:20:02</td></tr>
+ <tr><td><a href="PDAs">PDAs</a></td><td>5041</td><td>2021-01-17 06:20:02</td></tr>
+ <tr><td><a href="PPC.txt">PPC.txt</a></td><td>531</td><td>2021-01-17 06:20:02</td></tr>
+ <tr><td><a href="SSH%20Daemon%20Comparison.md">SSH Daemon Comparison.md</a></td><td>2829</td><td>2021-01-17 06:20:02</td></tr>
+ <tr><td><a href="VR-wayland.gmi">VR-wayland.gmi</a></td><td>1669</td><td>2021-02-06 13:18:14</td></tr>
+ <tr><td><a href="ansi.txt">ansi.txt</a></td><td>5164</td><td>2022-09-20 17:51:39</td></tr>
+ <tr><td><a href="bc.txt">bc.txt</a></td><td>356</td><td>2021-01-17 06:20:02</td></tr>
+ <tr><td><a href="bootstrapping">bootstrapping</a></td><td>7487</td><td>2023-03-02 16:19:39</td></tr>
+ <tr><td><a href="ciphers.txt">ciphers.txt</a></td><td>717</td><td>2021-01-17 06:20:02</td></tr>
+ <tr><td><a href="cloudchaser-issues">cloudchaser-issues</a></td><td>3754</td><td>2023-02-16 00:31:33</td></tr>
+ <tr><td><a href="computing-truths.txt">computing-truths.txt</a></td><td>7363</td><td>2022-09-20 17:51:39</td></tr>
+ <tr><td><a href="drivers">drivers</a></td><td>3549</td><td>2021-01-17 06:20:02</td></tr>
+ <tr><td><a href="editors">editors</a></td><td>1353</td><td>2021-01-17 06:20:02</td></tr>
+ <tr><td><a href="feeds">feeds</a></td><td>1023</td><td>2021-01-17 06:20:02</td></tr>
+ <tr><td><a href="font-test.js">font-test.js</a></td><td>1862</td><td>2023-02-09 11:19:08</td></tr>
+ <tr><td><a href="font-test">font-test</a></td><td>4500</td><td>2023-02-09 12:03:44</td></tr>
+ <tr><td><a href="free_ipv6.txt">free_ipv6.txt</a></td><td>2737</td><td>2021-10-27 12:25:08</td></tr>
+ <tr><td><a href="gitlab">gitlab</a></td><td>659</td><td>2021-01-17 06:20:02</td></tr>
+ <tr><td><a href="index">index</a></td><td>0</td><td>2023-03-03 01:48:38</td></tr>
+ <tr><td><a href="license-pick">license-pick</a></td><td>3849</td><td>2023-01-10 03:22:44</td></tr>
+ <tr><td><a href="minitel2.txt">minitel2.txt</a></td><td>542</td><td>2021-05-18 16:01:45</td></tr>
+ <tr><td><a href="native-terms">native-terms</a></td><td>4</td><td>2021-11-11 16:13:16</td></tr>
+ <tr><td><a href="native-terms/countries.txt">native-terms/countries.txt</a></td><td>274</td><td>2021-11-11 16:13:16</td></tr>
+ <tr><td><a href="native-terms/languages.txt">native-terms/languages.txt</a></td><td>1863</td><td>2021-11-08 23:12:30</td></tr>
+ <tr><td><a href="new-install-checklist">new-install-checklist</a></td><td>1246</td><td>2021-01-17 06:20:02</td></tr>
+ <tr><td><a href="oric-atmos">oric-atmos</a></td><td>1340</td><td>2021-04-14 00:13:46</td></tr>
+ <tr><td><a href="osu%21">osu!</a></td><td>1360</td><td>2021-01-17 06:20:02</td></tr>
+ <tr><td><a href="petitions">petitions</a></td><td>1510</td><td>2022-03-27 12:57:13</td></tr>
+ <tr><td><a href="phone-required-features">phone-required-features</a></td><td>2963</td><td>2021-07-13 03:01:19</td></tr>
+ <tr><td><a href="pure-wayland">pure-wayland</a></td><td>30218</td><td>2022-10-22 08:54:22</td></tr>
+ <tr><td><a href="pure_wayland_T495_glewinfo.log">pure_wayland_T495_glewinfo.log</a></td><td>207699</td><td>2021-05-05 10:29:41</td></tr>
+ <tr><td><a href="pure_wayland_T495_glinfo.log">pure_wayland_T495_glinfo.log</a></td><td>17747</td><td>2021-05-05 10:29:41</td></tr>
+ <tr><td><a href="review%3A%20Anti-Capitalist%20Software%20License%20v%201.4.txt">review: Anti-Capitalist Software License v 1.4.txt</a></td><td>3218</td><td>2021-05-09 12:34:38</td></tr>
+ <tr><td><a href="right_tool">right_tool</a></td><td>1909</td><td>2022-10-28 17:01:49</td></tr>
+ <tr><td><a href="services">services</a></td><td>1403</td><td>2021-01-17 06:20:02</td></tr>
+ <tr><td><a href="sucks.txt">sucks.txt</a></td><td>4238</td><td>2021-04-01 01:18:14</td></tr>
+ <tr><td><a href="systems.json">systems.json</a></td><td>642</td><td>2023-01-09 20:04:17</td></tr>
+ <tr><td><a href="tips.md">tips.md</a></td><td>174</td><td>2021-01-17 06:20:02</td></tr>
+ <tr><td><a href="tuple_truth_table.txt">tuple_truth_table.txt</a></td><td>792</td><td>2021-01-17 06:20:02</td></tr>
+ <tr><td><a href="unix-defects">unix-defects</a></td><td>3349</td><td>2023-03-02 16:19:39</td></tr>
+ <tr><td><a href="zfs">zfs</a></td><td>1262</td><td>2021-01-17 06:20:02</td></tr>
</tbody>
</table>
</main>
diff --git a/notes_index.pm b/notes_index.pm
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
# SPDX-License-Identifier: MIT
+use DateTime;
use File::Find;
use URI::Escape;
@@ -11,9 +12,6 @@ sub wanted {
$fn =~ s@^\./@@;
- # try_files $uri $uri.shtml $uri.html $uri.xhtml $uri/ =404;
- $fn =~ s@\.(s|x)?html$@@;
-
if($fn !~ /^\.$/) {
push @content, $fn;
}
@@ -44,12 +42,19 @@ print '<!DOCTYPE html>
foreach(sort(@content)) {
my $raw = $_;
- my $escaped = uri_escape_utf8($raw);
+
+ # try_files $uri $uri.shtml $uri.html $uri.xhtml $uri/ =404;
+ my $fn = $raw;
+ $fn =~ s@\.(s|x)?html$@@;
+
+ my $escaped = uri_escape_utf8($fn);
$escaped =~ s@%2F@/@;
- my ($dev, $ino, $mode, $nlink, $uid, $gid) = lstat($raw);
+ my ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, $ctime) = lstat($raw);
+
+ my $mtime_dt = DateTime->from_epoch( epoch => $mtime);
- print ' <tr><td><a href="', $escaped, '">', $raw, "</a></td><td></td></tr>\n";
+ print ' <tr><td><a href="', $escaped, '">', $fn, "</a></td><td>", $size ,"</td><td>", $mtime_dt->ymd, " ", $mtime_dt->hms ,"</td></tr>\n";
};
print ' </tbody>