Render page update timestamp in the page footer (HowTo ideas) (DOCU-2624)

[DOCU-2626] Testing solutions MD Created: 13/Dec/22  Updated: 13/Dec/22  Resolved: 13/Dec/22

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:

Generated at Mon Feb 12 01:28:48 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.