commit: 4c6821655aafba29b848235abf95e156b4ac86bb parent 4a52c1aba19613baae89b23ee35abd1ea2915a6b Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me> Date: Fri, 3 Mar 2023 03:09:47 +0100 notes/index.xhtml: Pretty print sizeDiffstat:
M | notes/index.xhtml | 84 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | notes_index.pm | 6 | +++++- |
2 files changed, 47 insertions(+), 43 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>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> + <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">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">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">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">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">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">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">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">356 B</td><td>2021-01-17 06:20:02</td></tr> + <tr><td><a href="bootstrapping">bootstrapping</a></td><td data-value="7487">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">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">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">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">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">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">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">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">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">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">659 B</td><td>2021-01-17 06:20:02</td></tr> + <tr><td><a href="index">index</a></td><td data-value="0">0 B</td><td>2023-03-03 02:11:07</td></tr> + <tr><td><a href="license-pick">license-pick</a></td><td data-value="3849">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">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">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">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">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">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">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">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">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">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">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">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">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">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">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">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">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">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">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">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="3349">3 349 B</td><td>2023-03-02 16:19:39</td></tr> + <tr><td><a href="zfs">zfs</a></td><td data-value="1262">1 262 B</td><td>2021-01-17 06:20:02</td></tr> </tbody> </table> </main>diff --git a/notes_index.pm b/notes_index.pm
@@ -54,7 +54,11 @@ foreach(sort(@content)) { my $mtime_dt = DateTime->from_epoch( epoch => $mtime); - print ' <tr><td><a href="', $escaped, '">', $fn, "</a></td><td>", $size ,"</td><td>", $mtime_dt->ymd, " ", $mtime_dt->hms ,"</td></tr>\n"; + # 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\">%s B</td><td>%s %s</td></tr>\n", $escaped, $fn, $size, $size_pp, $mtime_dt->ymd, $mtime_dt->hms; }; print ' </tbody>