feat: added mkgpost, for cross-posting annoucements to ~vern

This commit is contained in:
Vitor Gonçalves 2023-05-20 15:19:52 -03:00
parent eab82fe73b
commit 3a3c9acf00
Signed by: vitorg
GPG Key ID: B90BF113DF56EB41
2 changed files with 19 additions and 0 deletions

18
tilserv/mkgpost Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env -S bash -e
[[ -z "$1" ]] && {
printf "Usage: %s message [description]\n" "$0"
exit 1
}
GMI_ANNO="$HOME"/docs/vern.gmi
DATE="$(date --rfc-email -u)"
[[ -z "$2" ]] && {
MSG="### $DATE - $1"
} || {
MSG="### $DATE - $1\n\n$2\n"
}
sed -i "s/## Annoucements/## Annoucements\n\n$MSG/" $GMI_ANNO

View File

@ -5,6 +5,7 @@
}
mkwpost "$1" "$2"
mkgpost "$1" "$2"
mkfpost "$1" ${2:+"$2"}
mkmpost "$1" "$2"
mkxpost "$1" "$2"