changed relays. added udpate and 300 ms delay in menu 2,1. improved scripts.

This commit is contained in:
vishalxl 2024-09-29 17:05:05 +05:30
parent 67c3c99fa4
commit cf3ef9fe63
6 changed files with 33 additions and 25 deletions

View File

@ -1351,10 +1351,13 @@ Future<void> socialMenuUi(Store node) async {
while(socialMenuContinue) {
if( !firstTime) {
//stdout.write("calling paie");
await processAnyIncomingEvents(node); // this takes 300 ms
firstTime = false;
//stdout.write("returned from paie");
}
firstTime = false;
// the main menu
int option = showMenu([
'Your Feed', // 1
@ -1374,7 +1377,9 @@ Future<void> socialMenuUi(Store node) async {
case 1:
bool selectorTrees_followActionsNoNotifications (Tree t) => t.treeSelectorUserPostAndLike(getFollows( userPublicKey).union(gDefaultFollows).union({userPublicKey}), enableNotifications: false);
node.printStoreTrees(0, DateTime.now().subtract(Duration(hours:gHoursDefaultPrint)), selectorTrees_followActionsNoNotifications, true);
await processAnyIncomingEvents(node, true);
break;
case 2:

View File

@ -50,15 +50,16 @@ int gHoursDefaultPrint = 6; // print latest given hours only
int numFileEvents = 0, numFilePosts = 0, numUserPosts = 0, numFeedPosts = 0, numOtherPosts = 0;
// edited on 17 march 2024
// edited on 29 sept 2024
String defaultServerUrl = "wss://relay.damus.io";
Set<String> gListRelayUrls = { defaultServerUrl,
"wss://nostr-01.bolt.observer",
"wss://nostr.wine",
"wss://relay2.nostrchat.io",
"wss://nostr.swiss-enigma.ch"
"wss://relay.nostr.info",
"wss://nos.lol",
"wss://relay.nostr.band"
};
// well known disposable test private key
const String gDefaultPublicKey = "";
String userPrivateKey = "";

View File

@ -4,7 +4,7 @@
# echo '\n' ; for line in `cowsay hi` ; do echo -e "${line}\\\n" ; done
IFS=$'\n'
channel=test99
channel=25e5c
# { echo -e "3\n1\n${channel}\nHello, this is a random test.\nx\nx\nx" ; cat /dev/stdin; } | ./nostr_console_ubuntu_x64 --prikey=`openssl rand -hex 32`
@ -12,4 +12,4 @@ channel=test99
message=""
message=$message'\n' ; for line in `cowsay hi` ; do message=$message"${line} \n" ; done
echo $message
{ echo -e "3\n1\n${channel}\nHello, this is a random test.\nx\nx\nx" ; cat /dev/stdin; } | ./nostr_console --prikey=`openssl rand -hex 32`
{ echo -e "3\n1\n${channel}\nHello, this is a random test.\nx\nx\nx" ; cat /dev/stdin; } | dart run ../bin/nostr_console.dart --prikey=`openssl rand -hex 32`

View File

@ -1,9 +1,12 @@
#!/bin/bash
# tested on Linux/Ubuntu
# will go to the channel mentioned in this variable; change it to go to that channel
# arguments passed to this script are passed to the nostr_console
# * tested on Linux/Ubuntu
# * will go to the channel mentioned in this variable; change it to go to that channel
# * arguments passed to this script are passed to the nostr_console
channel=52ca
{ echo -e "3\n1\n${channel}" ; cat /dev/stdin; } | ./nostr_console_ubuntu_x64 $@
#channel=52ca nostr console channel
channel=25e5c # nostr channel
{ echo -e "3\n1\n${channel}" ; cat /dev/stdin; } | dart run ../bin/nostr_console.dart $@

View File

@ -8,14 +8,14 @@ nostr_relays=(
"wss://nostr.zebedee.cloud"
"wss://nostr.coinos.io"
"wss://nostr-01.bolt.observer"
#"wss://nostr.openchain.fr"
"wss://nostr-relay.wlvs.space"
"wss://nostr-relay-dev.wlvs.space"
"wss://nostr-pub.wellorder.net"
"wss://nos.lol"
"wss://nostr-relay-dev.wlvs.space"
#"wss://nostr.shawnyeager.net"
#"wss://relay.nostr.info"
"wss://nostr.semisol.dev"
"wss://relay.nostr.info"
@ -55,8 +55,6 @@ nostr_relays=(
"wss://nostr.onsats.org"
"wss://nostr-relay.digitalmob.ro"
"wss://offchain.pub"
"wss://relay.valireum.net"
"wss://nostr-relay.trustbtc.org"
"wss://relay.stoner.com"
@ -73,12 +71,14 @@ nostr_relays=(
"wss://brb.io"
"wss://dummyurl.example.com"
)
"wss://dummyurl.example.com")
# reference
# nostr.info
# https://nostr.watch/relays/find
#"wss://nostr.openchain.fr"
#"wss://nostr.shawnyeager.net"
#"wss://relay.nostr.info"

View File

@ -17,12 +17,11 @@ source $configfile
limit=300
numHours=1
echo -e "Requesting all events in last $numHours hours with a limit of $limit by executing the following command for each:"
#echo -e "Requesting all events in last $numHours hours with a limit of $limit by executing the following command for each:"
sinceSeconds=`date -d "-$numHours hour" +%s` ;
N=2
inLastNDays=`date -d "$N days" +%s`
#N=2
#inLastNDays=`date -d "$N days" +%s`
#echo "Events in last $N days"
#req="[\"REQ\",\"id_mention_#p_nostr.coinos.io\",{\"#p\":[\"82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2\"],\"limit\":20000,\"since\":$inLastNDays},{\"authors\":[\"82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2\"]}]"