fix thoughts displaying in wrong order under weird circumstances

This commit is contained in:
gnat
2024-08-09 21:30:03 -07:00
parent 1d091570c8
commit 54e0560d5e
13 changed files with 14 additions and 8 deletions

View File

@ -13,7 +13,7 @@
<h1>arbitrary thoughts generated by natalie</h1>
I am bad at thinking of things to make blog posts for. this webpage might contain things that I would put in a blog post if I was more proficient at writing filler. It might also contain other things.
</section>
$[stat -c "%W %n" ./html/thoughts/* | sort -n --reverse | cut -d ' ' -f2- | while read -r file; do echo "<section><details><summary>$(stat -c'%w' $file | cut -d '.' -f1): $(grep '^<!-- TITLE:' $file | sed 's/^<!-- TITLE: //; s/-->$//')</summary><div>$(include $file)</details></section>"; done]
$[for file in ./html/thoughts/*; do echo $(grep DATE $file | awk '{print $3 $4}') $file; done | sort -k1,1 -r | cut -d' ' -f2 | while read -r file; do echo "<section><details id='$(basename $file)'><summary>$(grep '^<!-- DATE:' $file | sed 's/^<!-- DATE: //; s/-->$//'): $(grep '^<!-- TITLE:' $file | sed 's/^<!-- TITLE: //; s/-->$//')</summary><div>$(include $file)</details></section>"; done]
</main>
$[include html/footer.html]
</body>