summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorla-ninpre <aaoth@aaoth.xyz>2025-12-09 17:51:33 +0300
committerla-ninpre <aaoth@aaoth.xyz>2025-12-09 17:51:33 +0300
commita22fbf4e2582d4792dd386f1f679643914659cd0 (patch)
treea8db4d3faba0df7f81fb96b0491a8104aa81bc5d
parente7c63d1aafa8aa6ad9303407abb37b01cb049355 (diff)
downloadaaothxyz-decadv-a22fbf4e2582d4792dd386f1f679643914659cd0.tar.gz
aaothxyz-decadv-a22fbf4e2582d4792dd386f1f679643914659cd0.zip
day 9: meta
tweaks to newlog.sh
-rw-r--r--decadv-2025.html15
-rwxr-xr-xnewlog.sh4
2 files changed, 17 insertions, 2 deletions
diff --git a/decadv-2025.html b/decadv-2025.html
index 1928dd2..3107e39 100644
--- a/decadv-2025.html
+++ b/decadv-2025.html
@@ -39,6 +39,21 @@
</p>
</div>
-->
+ <h3 id="2025-12-09">2025-12-09</h3>
+ <div class="win">
+ <p>
+today is a little meta-day.
+i've added a little script to compose new log entries.
+see how i said no automation and here i am, writing ed scripts.
+oh, btw, i wrote this using ed(1). on workdays i can't use my home pc with a comfy acme.
+as i once said, ed(1) is the best text editor for a phone.
+no jokes. also it kinda forces you to think what you type and slow down a bit.
+every line entered could not be edited with backspace.
+once i wanted to write my own ed, but with more powerful regexes and with some features borrowed from sam(1),
+like, for example, ability to forget that line terminators exist and treat text as a one-dimensional array of bytes.
+but that's for another day maybe.
+ </p>
+ </div>
<h3 id="2025-12-08">2025-12-08</h3>
<div class="win">
<p>
diff --git a/newlog.sh b/newlog.sh
index 58cd1c2..8b24c64 100755
--- a/newlog.sh
+++ b/newlog.sh
@@ -4,8 +4,8 @@
_log_file="decadv-2025.html"
-day="$(printf '%02d' "$1")"
-[ -z "$1" ] && day="$(date +%d)"
+day="$1"
+[ -z "$1" ] && day="$(date +%d)" || day="$(printf '%02d' "$1")"
echo "new log entry for day $day"