Render page update timestamp in the page footer (HowTo ideas)
(DOCU-2624)
|
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Sub-task | Priority: | Neutral |
| Reporter: | Alex Mansell | Assignee: | Martin Drápela |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Date of First Response: |
| Comments |
| Comment by Martin Drápela [ 13/Dec/22 ] |
|
working intermediate solution for dateStart 1670940551 dateEnd at the top of the page
#!/bin/sh
TMPFILE="/tmp/${0##*/}.$$"
for f in "$@"; do ### the only difference from above recipe
case "$f" in
*.adoc) : fall through ;;
*) continue
esac
cp "$f" "$TMPFILE" || continue
awk -v new="dateStart $(date +%s) dateEnd" \
'NR==1{sub("^dateStart .* dateEnd$",new)}1' \
< "$TMPFILE" > "$f"
git add -u -- "$f"
done
TODO: use and escape adoc pass: |