FOERBICO/sb/scripts/get-weight-by-publishdate.sh
Ludger Sicking 96408a4ca9
Some checks reported warnings
ci/woodpecker/push/build_and_copy_blog Pipeline was rejected
erste Version des Blogs, auf die Schnelle
2024-11-18 12:15:27 +01:00

7 lines
273 B
Bash
Executable file

#!/bin/bash
FILE=$1
WEIGHT="weight: -20500101"
echo "working on >>"$FILE"<<"
DETECTED_DATE=$(grep datePublished $FILE | sed -E 's/datePublished...(2024)-(..)-(..)./\1\2\3/')
echo "weight to set: >>-"$DETECTED_DATE"<<"
sed -i "s/weight: xxx/weight: -${DETECTED_DATE}/" $FILE