We need more of these bots. Sopranos, lain, ergo proxy, true detective(s1) 🤔 what else?. Gotta love the serendipity:)

nostr:nevent1qqszj6xrmslf58xru8tag7yaf5uxkvhwytzecch5t93aux9me584hecpzemhxue69uhkummnw3ex2mrfw3jhxtn0wfnj7q3q37gavftkelnara27cx56uchxr6qxvf4ragjfpe8qmlsl64kwrf3qxpqqqqqqztdae73

Reply to this note

Please Login to reply.

Discussion

#!/usr/bin/env fish

set next (head -n 1 _next_frame)

echo "[eng] publishing frame $next"

# upload the image

set url (satellite-upload --sec $SECRET_KEY --base-name 'noi-' $next.png)

# format the timestamp

set minute (jq -n "$next / 60 | floor | . % 60" | string pad -w 2 -c 0)

set second (jq -n "$next % 60" | string pad -w 2 -c 0)

set timestamp "$(echo -n $minute)min$(echo -n $second)s"

# publish the event

set content "$timestamp

$url"

set event (nak event --sec $SECRET_KEY -k 1 -c $content $RELAY)

# print reference

set nevent (nak encode nevent -r $RELAY -a (nak key public $SECRET_KEY) (echo $event | jq -r .id))

echo "[eng] https://njump.me/$nevent"

# increase count for the next run

set next (echo $next | jq 'tonumber | . + 1' | string pad -w 4 -c 0)

echo "[eng] next is $next"

echo $next > _next_frame

# update picture

nak event --sec $SECRET_KEY -k 0 -c "{\"name\":\"emperor's new groove\",\"about\":\"we are playing the entire thing\",\"picture\":\"$url\"}" $RELAY purplepag.es relay.damus.io nos.lol relay.nos.social user.kindpag.es

This is the full code for running the thing, provided that you fill in the environment variables and run it from a folder that has all the images prepared, which you can do with some simple ffmpeg commands.

Thanks:)

I can't do any of that but I appreciate it. I like the idea:)