summaryrefslogtreecommitdiff
path: root/.zk
diff options
context:
space:
mode:
authorLibravatar Mora Unie Youer <[email protected]>2026-02-04 18:51:54 +0300
committerLibravatar Mora Unie Youer <[email protected]>2026-02-04 18:51:54 +0300
commitaba5c81c79fe4e3108fef6d69933195e36588d20 (patch)
treea28248520aa39d7662b0b407cb49971543501c80 /.zk
parentfeat: initial commit (diff)
downloadzk-aba5c81c79fe4e3108fef6d69933195e36588d20.tar.gz
zk-aba5c81c79fe4e3108fef6d69933195e36588d20.tar.bz2
zk-aba5c81c79fe4e3108fef6d69933195e36588d20.tar.lz
zk-aba5c81c79fe4e3108fef6d69933195e36588d20.tar.xz
zk-aba5c81c79fe4e3108fef6d69933195e36588d20.tar.zst
zk-aba5c81c79fe4e3108fef6d69933195e36588d20.zip
snapshot: 2026-02-04
Diffstat (limited to '')
-rwxr-xr-x.zk/commit.sh12
-rw-r--r--.zk/config.toml3
2 files changed, 15 insertions, 0 deletions
diff --git a/.zk/commit.sh b/.zk/commit.sh
new file mode 100755
index 0000000..55dace9
--- /dev/null
+++ b/.zk/commit.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+grep $(date -I) <(git log -1) >/dev/null
+if [ $? -eq 0 ]; then
+ # Committed today already
+ git add -A
+ git commit --amend --reset-author --no-edit
+else
+ # New commit today
+ git add -A
+ git commit -m "snapshot: $(date -I)"
+fi
diff --git a/.zk/config.toml b/.zk/config.toml
index 3a9b19a..24fc620 100644
--- a/.zk/config.toml
+++ b/.zk/config.toml
@@ -201,6 +201,9 @@ dead-link = "error"
# Edit this configuration file.
conf = '$EDITOR "$ZK_NOTEBOOK_DIR/.zk/config.toml"'
+# Commmit changes
+commit = "$ZK_NOTEBOOK_DIR/.zk/commit.sh"
+
# Creation commands
huge-idea = 'zk new --no-input --template="huge-idea.md"'
tiny-idea = 'zk new --no-input --template="tiny-idea.md"'