PSF: Retrospective metadata injection complete. Kernel future-proofed with CREATED/EDITED drawer logic.
This commit is contained in:
10
system/extract-git-dates.sh
Executable file
10
system/extract-git-dates.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
NOTES_DIR="notes"
|
||||
for f in $NOTES_DIR/*.org; do
|
||||
CREATED=$(git log --diff-filter=A --format=%aI -- "$f" | tail -1)
|
||||
EDITED=$(git log -1 --format=%aI -- "$f")
|
||||
# If not in git, use file mtime
|
||||
[ -z "$CREATED" ] && CREATED=$(date -Iseconds -r "$f")
|
||||
[ -z "$EDITED" ] && EDITED=$(date -Iseconds -r "$f")
|
||||
echo "$f|$CREATED|$EDITED"
|
||||
done
|
||||
Reference in New Issue
Block a user