commit: aa0014169da560e1c64447df54523eb6a6379ce9
parent a60026492c858733e255fef507173f83f327a722
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Tue, 14 Mar 2023 12:36:28 +0100
notes_index.pm: Extract modification time from git
Diffstat:
2 files changed, 43 insertions(+), 47 deletions(-)
diff --git a/notes/index.xhtml b/notes/index.xhtml
@@ -13,47 +13,44 @@
<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 data-value="16480" data-type="int">16 480 B</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 data-value="3231" data-type="int">3 231 B</td><td>2021-01-17 06:20:02</td></tr>
- <tr><td><a href="PDAs">PDAs</a></td><td data-value="5041" data-type="int">5 041 B</td><td>2021-01-17 06:20:02</td></tr>
- <tr><td><a href="PPC.txt">PPC.txt</a></td><td data-value="531" data-type="int">531 B</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 data-value="2829" data-type="int">2 829 B</td><td>2021-01-17 06:20:02</td></tr>
- <tr><td><a href="VR-wayland.gmi">VR-wayland.gmi</a></td><td data-value="1669" data-type="int">1 669 B</td><td>2021-02-06 13:18:14</td></tr>
- <tr><td><a href="ansi.txt">ansi.txt</a></td><td data-value="5164" data-type="int">5 164 B</td><td>2022-09-20 17:51:39</td></tr>
- <tr><td><a href="bc.txt">bc.txt</a></td><td data-value="356" data-type="int">356 B</td><td>2021-01-17 06:20:02</td></tr>
- <tr><td><a href="bootstrapping">bootstrapping</a></td><td data-value="7487" data-type="int">7 487 B</td><td>2023-03-02 16:19:39</td></tr>
- <tr><td><a href="ciphers.txt">ciphers.txt</a></td><td data-value="717" data-type="int">717 B</td><td>2021-01-17 06:20:02</td></tr>
- <tr><td><a href="cloudchaser-issues">cloudchaser-issues</a></td><td data-value="3754" data-type="int">3 754 B</td><td>2023-02-16 00:31:33</td></tr>
- <tr><td><a href="computing-truths.txt">computing-truths.txt</a></td><td data-value="7363" data-type="int">7 363 B</td><td>2022-09-20 17:51:39</td></tr>
- <tr><td><a href="drivers">drivers</a></td><td data-value="3549" data-type="int">3 549 B</td><td>2021-01-17 06:20:02</td></tr>
- <tr><td><a href="editors">editors</a></td><td data-value="1353" data-type="int">1 353 B</td><td>2021-01-17 06:20:02</td></tr>
- <tr><td><a href="feeds">feeds</a></td><td data-value="1023" data-type="int">1 023 B</td><td>2021-01-17 06:20:02</td></tr>
- <tr><td><a href="font-test.js">font-test.js</a></td><td data-value="1862" data-type="int">1 862 B</td><td>2023-02-09 11:19:08</td></tr>
- <tr><td><a href="font-test">font-test</a></td><td data-value="4500" data-type="int">4 500 B</td><td>2023-02-09 12:03:44</td></tr>
- <tr><td><a href="free_ipv6.txt">free_ipv6.txt</a></td><td data-value="2737" data-type="int">2 737 B</td><td>2021-10-27 12:25:08</td></tr>
- <tr><td><a href="gitlab">gitlab</a></td><td data-value="659" data-type="int">659 B</td><td>2021-01-17 06:20:02</td></tr>
- <tr><td><a href="license-pick">license-pick</a></td><td data-value="3849" data-type="int">3 849 B</td><td>2023-01-10 03:22:44</td></tr>
- <tr><td><a href="minitel2.txt">minitel2.txt</a></td><td data-value="542" data-type="int">542 B</td><td>2021-05-18 16:01:45</td></tr>
- <tr><td><a href="native-terms">native-terms</a></td><td data-value="4" data-type="int">4 B</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 data-value="274" data-type="int">274 B</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 data-value="1863" data-type="int">1 863 B</td><td>2021-11-08 23:12:30</td></tr>
- <tr><td><a href="new-install-checklist">new-install-checklist</a></td><td data-value="1246" data-type="int">1 246 B</td><td>2021-01-17 06:20:02</td></tr>
- <tr><td><a href="oric-atmos">oric-atmos</a></td><td data-value="1340" data-type="int">1 340 B</td><td>2021-04-14 00:13:46</td></tr>
- <tr><td><a href="osu%21">osu!</a></td><td data-value="1360" data-type="int">1 360 B</td><td>2021-01-17 06:20:02</td></tr>
- <tr><td><a href="petitions">petitions</a></td><td data-value="1510" data-type="int">1 510 B</td><td>2022-03-27 12:57:13</td></tr>
- <tr><td><a href="phone-required-features">phone-required-features</a></td><td data-value="2963" data-type="int">2 963 B</td><td>2021-07-13 03:01:19</td></tr>
- <tr><td><a href="pure-wayland">pure-wayland</a></td><td data-value="30218" data-type="int">30 218 B</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 data-value="207699" data-type="int">207 699 B</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 data-value="17747" data-type="int">17 747 B</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 data-value="3218" data-type="int">3 218 B</td><td>2021-05-09 12:34:38</td></tr>
- <tr><td><a href="right_tool">right_tool</a></td><td data-value="1909" data-type="int">1 909 B</td><td>2022-10-28 17:01:49</td></tr>
- <tr><td><a href="services">services</a></td><td data-value="1403" data-type="int">1 403 B</td><td>2021-01-17 06:20:02</td></tr>
- <tr><td><a href="sucks.txt">sucks.txt</a></td><td data-value="4238" data-type="int">4 238 B</td><td>2021-04-01 01:18:14</td></tr>
- <tr><td><a href="systems.json">systems.json</a></td><td data-value="642" data-type="int">642 B</td><td>2023-01-09 20:04:17</td></tr>
- <tr><td><a href="tips.md">tips.md</a></td><td data-value="174" data-type="int">174 B</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 data-value="792" data-type="int">792 B</td><td>2021-01-17 06:20:02</td></tr>
- <tr><td><a href="unix-defects">unix-defects</a></td><td data-value="5965" data-type="int">5 965 B</td><td>2023-03-13 21:44:10</td></tr>
- <tr><td><a href="zfs">zfs</a></td><td data-value="1262" data-type="int">1 262 B</td><td>2021-01-17 06:20:02</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 data-value="16480" data-type="int">16 480 B</td><td>2021-03-10 14:58:17 +0100</td></tr>
+ <tr><td><a href="NETGEAR%20ReadyNAS%20Duo%20v2">NETGEAR ReadyNAS Duo v2</a></td><td data-value="3231" data-type="int">3 231 B</td><td>2020-07-08 04:21:23 +0200</td></tr>
+ <tr><td><a href="PDAs">PDAs</a></td><td data-value="5041" data-type="int">5 041 B</td><td>2020-07-08 04:21:23 +0200</td></tr>
+ <tr><td><a href="PPC.txt">PPC.txt</a></td><td data-value="531" data-type="int">531 B</td><td>2019-09-28 00:44:05 +0200</td></tr>
+ <tr><td><a href="SSH%20Daemon%20Comparison.md">SSH Daemon Comparison.md</a></td><td data-value="2829" data-type="int">2 829 B</td><td>2019-02-06 05:05:27 +0100</td></tr>
+ <tr><td><a href="VR-wayland.gmi">VR-wayland.gmi</a></td><td data-value="1669" data-type="int">1 669 B</td><td>2021-02-06 14:18:51 +0100</td></tr>
+ <tr><td><a href="ansi.txt">ansi.txt</a></td><td data-value="5164" data-type="int">5 164 B</td><td>2021-07-31 05:32:58 +0200</td></tr>
+ <tr><td><a href="bc.txt">bc.txt</a></td><td data-value="356" data-type="int">356 B</td><td>2017-10-18 14:42:34 +0200</td></tr>
+ <tr><td><a href="bootstrapping">bootstrapping</a></td><td data-value="7487" data-type="int">7 487 B</td><td>2023-02-19 20:15:40 +0100</td></tr>
+ <tr><td><a href="ciphers.txt">ciphers.txt</a></td><td data-value="717" data-type="int">717 B</td><td>2018-09-13 11:34:17 +0200</td></tr>
+ <tr><td><a href="cloudchaser-issues">cloudchaser-issues</a></td><td data-value="3754" data-type="int">3 754 B</td><td>2023-02-12 20:27:12 +0100</td></tr>
+ <tr><td><a href="computing-truths.txt">computing-truths.txt</a></td><td data-value="7363" data-type="int">7 363 B</td><td>2021-04-29 01:33:38 +0200</td></tr>
+ <tr><td><a href="copyright-assignment.txt">copyright-assignment.txt</a></td><td data-value="409" data-type="int">409 B</td><td></td></tr>
+ <tr><td><a href="drivers">drivers</a></td><td data-value="3549" data-type="int">3 549 B</td><td>2020-07-08 04:21:23 +0200</td></tr>
+ <tr><td><a href="editors">editors</a></td><td data-value="1353" data-type="int">1 353 B</td><td>2020-07-08 04:21:23 +0200</td></tr>
+ <tr><td><a href="feeds">feeds</a></td><td data-value="1023" data-type="int">1 023 B</td><td>2020-07-08 04:21:23 +0200</td></tr>
+ <tr><td><a href="font-test.js">font-test.js</a></td><td data-value="1862" data-type="int">1 862 B</td><td>2023-02-09 11:21:52 +0100</td></tr>
+ <tr><td><a href="font-test">font-test</a></td><td data-value="4500" data-type="int">4 500 B</td><td>2023-02-09 11:21:52 +0100</td></tr>
+ <tr><td><a href="free_ipv6.txt">free_ipv6.txt</a></td><td data-value="2737" data-type="int">2 737 B</td><td>2021-10-27 13:01:20 +0200</td></tr>
+ <tr><td><a href="gitlab">gitlab</a></td><td data-value="659" data-type="int">659 B</td><td>2020-07-08 04:21:23 +0200</td></tr>
+ <tr><td><a href="license-pick">license-pick</a></td><td data-value="3849" data-type="int">3 849 B</td><td>2023-01-10 04:23:21 +0100</td></tr>
+ <tr><td><a href="minitel2.txt">minitel2.txt</a></td><td data-value="542" data-type="int">542 B</td><td>2023-03-02 18:30:28 +0100</td></tr>
+ <tr><td><a href="new-install-checklist">new-install-checklist</a></td><td data-value="1246" data-type="int">1 246 B</td><td>2020-05-22 11:33:33 +0200</td></tr>
+ <tr><td><a href="npm.txt">npm.txt</a></td><td data-value="127" data-type="int">127 B</td><td></td></tr>
+ <tr><td><a href="oric-atmos">oric-atmos</a></td><td data-value="1340" data-type="int">1 340 B</td><td>2021-04-12 19:13:09 +0200</td></tr>
+ <tr><td><a href="osu%21">osu!</a></td><td data-value="1360" data-type="int">1 360 B</td><td>2020-07-08 04:21:23 +0200</td></tr>
+ <tr><td><a href="petitions">petitions</a></td><td data-value="1510" data-type="int">1 510 B</td><td>2022-03-02 22:39:07 +0100</td></tr>
+ <tr><td><a href="programming-languages.txt">programming-languages.txt</a></td><td data-value="1677" data-type="int">1 677 B</td><td></td></tr>
+ <tr><td><a href="pure-wayland">pure-wayland</a></td><td data-value="30218" data-type="int">30 218 B</td><td>2022-09-27 00:37:53 +0200</td></tr>
+ <tr><td><a href="pure_wayland_T495_glewinfo.log">pure_wayland_T495_glewinfo.log</a></td><td data-value="207699" data-type="int">207 699 B</td><td>2021-05-03 14:14:58 +0200</td></tr>
+ <tr><td><a href="pure_wayland_T495_glinfo.log">pure_wayland_T495_glinfo.log</a></td><td data-value="17747" data-type="int">17 747 B</td><td>2021-05-03 14:14:58 +0200</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 data-value="3218" data-type="int">3 218 B</td><td>2021-05-09 14:24:48 +0200</td></tr>
+ <tr><td><a href="services">services</a></td><td data-value="1403" data-type="int">1 403 B</td><td>2020-07-08 04:21:23 +0200</td></tr>
+ <tr><td><a href="systems.json">systems.json</a></td><td data-value="642" data-type="int">642 B</td><td>2023-01-09 21:04:12 +0100</td></tr>
+ <tr><td><a href="tips.md">tips.md</a></td><td data-value="174" data-type="int">174 B</td><td>2018-01-02 01:42:26 +0100</td></tr>
+ <tr><td><a href="tuple_truth_table.txt">tuple_truth_table.txt</a></td><td data-value="792" data-type="int">792 B</td><td>2019-10-04 02:06:42 +0200</td></tr>
+ <tr><td><a href="unix-defects">unix-defects</a></td><td data-value="5965" data-type="int">5 965 B</td><td>2023-03-13 22:45:26 +0100</td></tr>
+ <tr><td><a href="zfs">zfs</a></td><td data-value="1262" data-type="int">1 262 B</td><td>2020-05-22 11:33:33 +0200</td></tr>
</tbody>
</table>
</main>
diff --git a/notes_index.pm b/notes_index.pm
@@ -1,9 +1,8 @@
#!/usr/bin/env perl
# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
# SPDX-License-Identifier: MIT
-use DateTime;
-use File::Find;
-use URI::Escape;
+use File::Find; # dev-perl/URI
+use URI::Escape; # dev-lang/perl
my @content;
@@ -50,15 +49,15 @@ foreach(sort(@content)) {
my $escaped = uri_escape_utf8($fn);
$escaped =~ s@%2F@/@;
- my ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, $ctime) = lstat($raw);
+ my $size = (lstat($raw))[7];
- my $mtime_dt = DateTime->from_epoch( epoch => $mtime);
+ my $now = `git log -1 --format="format:%ai" -- "$raw"`;
# thousand separation
my $size_pp = $size;
while ($size_pp =~ s/(\d+)(\d{3})/$1 $2/){};
- printf " <tr><td><a href=\"%s\">%s</a></td><td data-value=\"%s\" data-type=\"int\">%s B</td><td>%s %s</td></tr>\n", $escaped, $fn, $size, $size_pp, $mtime_dt->ymd, $mtime_dt->hms;
+ printf " <tr><td><a href=\"%s\">%s</a></td><td data-value=\"%s\" data-type=\"int\">%s B</td><td>%s</td></tr>\n", $escaped, $fn, $size, $size_pp, $now;
};
print ' </tbody>