mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-12-02 16:58:23 +01:00
formatting changes
This commit is contained in:
@@ -342,8 +342,7 @@ Future<void> otherMenuUi(Tree node, var contactList) async {
|
|||||||
relays.printInfo();
|
relays.printInfo();
|
||||||
print("\n");
|
print("\n");
|
||||||
printUnderlined("Posts");
|
printUnderlined("Posts");
|
||||||
print("Total number of posts: ${node.count()}");
|
print("Total number of posts: ${node.count()}\n");
|
||||||
print("\n");
|
|
||||||
printUnderlined("User Info");
|
printUnderlined("User Info");
|
||||||
if( userPrivateKey.length == 64) {
|
if( userPrivateKey.length == 64) {
|
||||||
print("You are signed in, and your public key is: $userPublicKey");
|
print("You are signed in, and your public key is: $userPublicKey");
|
||||||
@@ -351,6 +350,9 @@ Future<void> otherMenuUi(Tree node, var contactList) async {
|
|||||||
print("You are not signed in, and are using public key: $userPublicKey");
|
print("You are not signed in, and are using public key: $userPublicKey");
|
||||||
}
|
}
|
||||||
print("Your name as seen in metadata event is: ${getAuthorName(userPublicKey)}");
|
print("Your name as seen in metadata event is: ${getAuthorName(userPublicKey)}");
|
||||||
|
|
||||||
|
//printUnderlined("Program Arguments");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
|
|||||||
@@ -205,11 +205,12 @@ void printIntro(String msg) {
|
|||||||
|
|
||||||
String toPrint =
|
String toPrint =
|
||||||
"""
|
"""
|
||||||
|
|
||||||
▀█▄ ▀█▀ ▄
|
▀█▄ ▀█▀ ▄
|
||||||
█▀█ █ ▄▄▄ ▄▄▄▄ ▄██▄ ▄▄▄ ▄▄
|
█▀█ █ ▄▄▄ ▄▄▄▄ ▄██▄ ▄▄▄ ▄▄
|
||||||
█ ▀█▄ █ ▄█ ▀█▄ ██▄ ▀ ██ ██▀ ▀▀
|
█ ▀█▄ █ ▄█ ▀█▄ ██▄ ▀ ██ ██▀ ▀▀
|
||||||
█ ███ ██ ██ ▄ ▀█▄▄ ██ ██
|
█ ███ ██ ██ ▄ ▀█▄▄ ██ ██
|
||||||
▄█▄ ▀█ ▀█▄▄█▀ █▀▄▄█▀ ▀█▄▀ ▄██▄
|
▄█▄ ▀█▄ ▀█▄▄█▀ █▀▄▄█▀ ▀█▄▀ ▄██▄
|
||||||
|
|
||||||
██████╗ ██████╗ ███╗ ██╗███████╗ ██████╗ ██╗ ███████╗
|
██████╗ ██████╗ ███╗ ██╗███████╗ ██████╗ ██╗ ███████╗
|
||||||
██╔════╝██╔═══██╗████╗ ██║██╔════╝██╔═══██╗██║ ██╔════╝
|
██╔════╝██╔═══██╗████╗ ██║██╔════╝██╔═══██╗██║ ██╔════╝
|
||||||
|
|||||||
@@ -161,6 +161,8 @@ class Tree {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//getEvents(tempWithoutParent);
|
||||||
|
|
||||||
//if( gDebug != 0) print("In Tree FromEvents: at end of tree from events: Total number of chat rooms: ${rooms.length}");
|
//if( gDebug != 0) print("In Tree FromEvents: at end of tree from events: Total number of chat rooms: ${rooms.length}");
|
||||||
if(gDebug != 0) print("In Tree FromEvents: number of events in map which are not kind 1 = ${numEventsNotPosts}");
|
if(gDebug != 0) print("In Tree FromEvents: number of events in map which are not kind 1 = ${numEventsNotPosts}");
|
||||||
if(gDebug != 0) print("In Tree FromEvents: number of events in map of kind 40 = ${numKind40Events}");
|
if(gDebug != 0) print("In Tree FromEvents: number of events in map of kind 40 = ${numKind40Events}");
|
||||||
@@ -1056,8 +1058,6 @@ Tree getTree(Set<Event> events) {
|
|||||||
// remove all events other than kind 0 (meta data), 1(posts replies likes), 3 (contact list), 7(reactions), 40 and 42 (chat rooms)
|
// remove all events other than kind 0 (meta data), 1(posts replies likes), 3 (contact list), 7(reactions), 40 and 42 (chat rooms)
|
||||||
events.removeWhere( (event) => !Tree.typesInEventMap.contains(event.eventData.kind));
|
events.removeWhere( (event) => !Tree.typesInEventMap.contains(event.eventData.kind));
|
||||||
|
|
||||||
print("In getTree: after removing unwanted kind, number of events remaining: ${events.length}");
|
|
||||||
|
|
||||||
// process kind 0 events about metadata
|
// process kind 0 events about metadata
|
||||||
int totalKind0Processed = 0, notProcessed = 0;
|
int totalKind0Processed = 0, notProcessed = 0;
|
||||||
events.forEach( (event) => processKind0Event(event)? totalKind0Processed++: notProcessed++);
|
events.forEach( (event) => processKind0Event(event)? totalKind0Processed++: notProcessed++);
|
||||||
@@ -1076,9 +1076,11 @@ Tree getTree(Set<Event> events) {
|
|||||||
// translate and expand mentions for all
|
// translate and expand mentions for all
|
||||||
events.forEach( (event) => event.eventData.translateAndExpandMentions());
|
events.forEach( (event) => event.eventData.translateAndExpandMentions());
|
||||||
|
|
||||||
|
if( gDebug > 0) print("In getTree: after removing unwanted kind, number of events remaining: ${events.length}");
|
||||||
|
|
||||||
// create tree from events
|
// create tree from events
|
||||||
Tree node = Tree.fromEvents(events);
|
Tree node = Tree.fromEvents(events);
|
||||||
|
|
||||||
if(gDebug != 0) print("total number of events in main tree = ${node.count()}");
|
if(gDebug != 0) print("total number of posts/replies in main tree = ${node.count()}");
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user