mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-06-22 23:03:19 +02:00
changed relays. added udpate and 300 ms delay in menu 2,1. improved scripts.
This commit is contained in:
parent
67c3c99fa4
commit
cf3ef9fe63
@ -1351,10 +1351,13 @@ Future<void> socialMenuUi(Store node) async {
|
|||||||
while(socialMenuContinue) {
|
while(socialMenuContinue) {
|
||||||
|
|
||||||
if( !firstTime) {
|
if( !firstTime) {
|
||||||
|
//stdout.write("calling paie");
|
||||||
await processAnyIncomingEvents(node); // this takes 300 ms
|
await processAnyIncomingEvents(node); // this takes 300 ms
|
||||||
firstTime = false;
|
//stdout.write("returned from paie");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
firstTime = false;
|
||||||
|
|
||||||
// the main menu
|
// the main menu
|
||||||
int option = showMenu([
|
int option = showMenu([
|
||||||
'Your Feed', // 1
|
'Your Feed', // 1
|
||||||
@ -1374,7 +1377,9 @@ Future<void> socialMenuUi(Store node) async {
|
|||||||
case 1:
|
case 1:
|
||||||
bool selectorTrees_followActionsNoNotifications (Tree t) => t.treeSelectorUserPostAndLike(getFollows( userPublicKey).union(gDefaultFollows).union({userPublicKey}), enableNotifications: false);
|
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);
|
node.printStoreTrees(0, DateTime.now().subtract(Duration(hours:gHoursDefaultPrint)), selectorTrees_followActionsNoNotifications, true);
|
||||||
|
|
||||||
await processAnyIncomingEvents(node, true);
|
await processAnyIncomingEvents(node, true);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -50,15 +50,16 @@ int gHoursDefaultPrint = 6; // print latest given hours only
|
|||||||
int numFileEvents = 0, numFilePosts = 0, numUserPosts = 0, numFeedPosts = 0, numOtherPosts = 0;
|
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";
|
String defaultServerUrl = "wss://relay.damus.io";
|
||||||
Set<String> gListRelayUrls = { defaultServerUrl,
|
Set<String> gListRelayUrls = { defaultServerUrl,
|
||||||
"wss://nostr-01.bolt.observer",
|
|
||||||
"wss://nostr.wine",
|
"wss://nostr.wine",
|
||||||
"wss://relay2.nostrchat.io",
|
"wss://relay.nostr.info",
|
||||||
"wss://nostr.swiss-enigma.ch"
|
"wss://nos.lol",
|
||||||
|
"wss://relay.nostr.band"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// well known disposable test private key
|
// well known disposable test private key
|
||||||
const String gDefaultPublicKey = "";
|
const String gDefaultPublicKey = "";
|
||||||
String userPrivateKey = "";
|
String userPrivateKey = "";
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# echo '\n' ; for line in `cowsay hi` ; do echo -e "${line}\\\n" ; done
|
# echo '\n' ; for line in `cowsay hi` ; do echo -e "${line}\\\n" ; done
|
||||||
|
|
||||||
IFS=$'\n'
|
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`
|
# { 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=$message'\n' ; for line in `cowsay hi` ; do message=$message"${line} \n" ; done
|
message=$message'\n' ; for line in `cowsay hi` ; do message=$message"${line} \n" ; done
|
||||||
echo $message
|
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`
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# tested on Linux/Ubuntu
|
# * tested on Linux/Ubuntu
|
||||||
# will go to the channel mentioned in this variable; change it to go to that channel
|
# * 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
|
# * 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 $@
|
||||||
|
|
||||||
|
@ -8,14 +8,14 @@ nostr_relays=(
|
|||||||
"wss://nostr.zebedee.cloud"
|
"wss://nostr.zebedee.cloud"
|
||||||
"wss://nostr.coinos.io"
|
"wss://nostr.coinos.io"
|
||||||
"wss://nostr-01.bolt.observer"
|
"wss://nostr-01.bolt.observer"
|
||||||
#"wss://nostr.openchain.fr"
|
|
||||||
|
|
||||||
"wss://nostr-relay.wlvs.space"
|
"wss://nostr-relay.wlvs.space"
|
||||||
|
"wss://nostr-relay-dev.wlvs.space"
|
||||||
|
|
||||||
"wss://nostr-pub.wellorder.net"
|
"wss://nostr-pub.wellorder.net"
|
||||||
"wss://nos.lol"
|
"wss://nos.lol"
|
||||||
"wss://nostr-relay-dev.wlvs.space"
|
|
||||||
#"wss://nostr.shawnyeager.net"
|
|
||||||
#"wss://relay.nostr.info"
|
|
||||||
"wss://nostr.semisol.dev"
|
"wss://nostr.semisol.dev"
|
||||||
"wss://relay.nostr.info"
|
"wss://relay.nostr.info"
|
||||||
|
|
||||||
@ -55,8 +55,6 @@ nostr_relays=(
|
|||||||
"wss://nostr.onsats.org"
|
"wss://nostr.onsats.org"
|
||||||
"wss://nostr-relay.digitalmob.ro"
|
"wss://nostr-relay.digitalmob.ro"
|
||||||
|
|
||||||
"wss://offchain.pub"
|
|
||||||
|
|
||||||
"wss://relay.valireum.net"
|
"wss://relay.valireum.net"
|
||||||
"wss://nostr-relay.trustbtc.org"
|
"wss://nostr-relay.trustbtc.org"
|
||||||
"wss://relay.stoner.com"
|
"wss://relay.stoner.com"
|
||||||
@ -73,12 +71,14 @@ nostr_relays=(
|
|||||||
|
|
||||||
"wss://brb.io"
|
"wss://brb.io"
|
||||||
|
|
||||||
"wss://dummyurl.example.com"
|
"wss://dummyurl.example.com")
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# reference
|
# reference
|
||||||
# nostr.info
|
# nostr.info
|
||||||
# https://nostr.watch/relays/find
|
# https://nostr.watch/relays/find
|
||||||
|
|
||||||
|
#"wss://nostr.openchain.fr"
|
||||||
|
#"wss://nostr.shawnyeager.net"
|
||||||
|
#"wss://relay.nostr.info"
|
||||||
|
@ -17,12 +17,11 @@ source $configfile
|
|||||||
limit=300
|
limit=300
|
||||||
numHours=1
|
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` ;
|
sinceSeconds=`date -d "-$numHours hour" +%s` ;
|
||||||
|
|
||||||
N=2
|
#N=2
|
||||||
inLastNDays=`date -d "$N days" +%s`
|
#inLastNDays=`date -d "$N days" +%s`
|
||||||
|
|
||||||
#echo "Events in last $N days"
|
#echo "Events in last $N days"
|
||||||
#req="[\"REQ\",\"id_mention_#p_nostr.coinos.io\",{\"#p\":[\"82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2\"],\"limit\":20000,\"since\":$inLastNDays},{\"authors\":[\"82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2\"]}]"
|
#req="[\"REQ\",\"id_mention_#p_nostr.coinos.io\",{\"#p\":[\"82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2\"],\"limit\":20000,\"since\":$inLastNDays},{\"authors\":[\"82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2\"]}]"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user