1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

bots: run tlg wotd on social.krebsco.de

This commit is contained in:
2024-11-26 21:27:02 +01:00
parent 56e44e94e0
commit 61ec35a29b
2 changed files with 6 additions and 4 deletions

View File

@@ -4,7 +4,9 @@
config,
niveumPackages,
...
}: {
}: let
mastodonEndpoint = "https://social.krebsco.de";
in {
systemd.services.bot-tlg-wotd = {
enable = true;
wants = ["network-online.target"];
@@ -122,12 +124,12 @@
-F parse_mode=Markdown \
-F caption="$telegram_caption"
mastodon_upload_response=$(curl -X POST "https://botsin.space/api/v2/media" \
mastodon_upload_response=$(curl -X POST "${mastodonEndpoint}/api/v2/media" \
-H "Authorization: Bearer $MASTODON_TOKEN" \
-F "file=@$photo_path" \
-F "description=$word $definition")
mastodon_image_id=$(echo $mastodon_upload_response | jq -r .id)
curl -X POST "https://botsin.space/api/v1/statuses" \
curl -X POST "${mastodonEndpoint}/api/v1/statuses" \
-H "Authorization: Bearer $MASTODON_TOKEN" \
-d "status=$mastodon_caption" \
-d "visibility=public" \

Submodule secrets updated: 08e9e16c2c...6c23ca9fcc