mirror of
https://github.com/jooray/nostr-scripts.git
synced 2026-05-03 06:51:40 +00:00
commit
7815f55da4
@ -43,3 +43,5 @@ done
|
||||
|
||||
echo "Publishing to ${TARGET_RELAY}..."
|
||||
sort -u ~/tmp/nostr-backup.json | nak event ${TARGET_RELAY}
|
||||
#Remove duplicities again for future use.
|
||||
sort -u -o ~/tmp/nostr-backup.json ~/tmp/nostr-backup.json
|
||||
|
||||
@ -7,5 +7,5 @@ for RELAY in wss://relay.nostrplebs.com wss://relay.nostr.band
|
||||
do
|
||||
echo "Publishing to ${RELAY}"
|
||||
# We can post to different relays in parallel, they don't know about each other
|
||||
do python3 slow-post.py "${RELAY}" < "${1}";done ) &
|
||||
python3 slow-post.py "${RELAY}" < "${1}" &
|
||||
done
|
||||
|
||||
@ -9,7 +9,14 @@ if len(sys.argv) < 2:
|
||||
|
||||
relay = sys.argv[1]
|
||||
|
||||
data = json.loads(sys.stdin.read())
|
||||
data = []
|
||||
for line in sys.stdin:
|
||||
try:
|
||||
item = json.loads(line)
|
||||
data.append(item)
|
||||
except json.JSONDecodeError as e:
|
||||
print(f"Error decoding JSON: {e}", file=sys.stderr)
|
||||
continue
|
||||
|
||||
# Execute the binary for each element in the JSON array
|
||||
for item in data:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user