From 250933bf414592acc8d929c43c04d740ec02226c Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Tue, 14 Jan 2025 21:37:11 -0500 Subject: [PATCH] ssb: Suppress noisy output when running command-line actions with output intended to be parsed. --- apps/ssb/tf-app.js | 14 +++++++---- apps/ssb/tf-message.js | 2 +- apps/ssb/tf-tab-news-feed.js | 21 +++++++++------- apps/ssb/tf-tab-news.js | 6 ++--- src/main.c | 8 ++++++ src/ssb.c | 48 +++++++++++++++++++++++++++++------- src/ssb.h | 7 ++++++ 7 files changed, 79 insertions(+), 27 deletions(-) diff --git a/apps/ssb/tf-app.js b/apps/ssb/tf-app.js index 43449b18..86a32d16 100644 --- a/apps/ssb/tf-app.js +++ b/apps/ssb/tf-app.js @@ -417,9 +417,8 @@ class TfElement extends LitElement { ON messages.author = following.value GROUP BY messages.author `, - [ - JSON.stringify(Object.keys(users)), - ]); + [JSON.stringify(Object.keys(users))] + ); for (let row of info) { users[row.author].seq = row.max_seq; users[row.author].ts = row.max_ts; @@ -459,7 +458,11 @@ class TfElement extends LitElement { ); start_time = new Date(); users = await this.fetch_user_info(users); - console.log('user info took', (new Date() - start_time) / 1000.0, 'seconds'); + console.log( + 'user info took', + (new Date() - start_time) / 1000.0, + 'seconds' + ); this.users = users; console.log( `load finished ${whoami} => ${this.whoami} in ${(new Date() - start_time) / 1000}` @@ -593,7 +596,8 @@ class TfElement extends LitElement { style="position: static; top: 0; z-index: 10" >