Human readable date
time is still making trouble.
This commit is contained in:
parent
59c92430cc
commit
ec36d3ccb9
10
add_date.sh
10
add_date.sh
|
@ -60,13 +60,15 @@ BASEPATH=$(dirname $(realpath $0))
|
|||
sed -i "s|replacemealarmt|${alarmt//\\n/\\\\n}|g" $ics
|
||||
sed -i "s|replacemealarmt|${alarme//\\n/\\\\n}|g" $ics
|
||||
# AktenzeichenXYZ
|
||||
# human-readable date
|
||||
sed -i "s|replacemedate|$(date -d $2 +%d.%m.%Y), 2300|g" $ics
|
||||
# description:
|
||||
sed -i "s|replacemedescription|${3//$'\n'/\\\\n}|g" $ics
|
||||
# what we might need to replace, but not even that often:
|
||||
# dtstart, time component optional:
|
||||
[ -n $4 ] && sed -i "s|230000|$4|g" $ics
|
||||
# dtend, time component optional:
|
||||
[ -n $5 ] && sed -i "s|235959|$5|g" $ics
|
||||
# dtstart, time component optional. We only work with minutes here:
|
||||
[ -n $4 ] && sed -i "s|2300|$4|g" $ics
|
||||
# dtend, same as dtstart:
|
||||
[ -n $5 ] && sed -i "s|2359|$5|g" $ics
|
||||
# UUID:
|
||||
sed -i "s|99g999gggg|$UUID|g" $ics
|
||||
|
||||
|
|
Loading…
Reference in a new issue