bwt-dev / bwt

A lightweight wallet indexer for Bitcoin, available as an Electrum RPC server and a modern HTTP REST API.
https://bwt.dev
MIT License
275 stars 26 forks source link

Optional ASCII-only console output #89

Open jsarenik opened 3 years ago

jsarenik commented 3 years ago

When bwt is run, following is printed:

 INFO  bwt > bwt v0.2.4 connected to /Satoshi:0.21.0/ on main at height 680094

   ██████  ██     ██ ████████ 
   ██   ██ ██     ██    ██    
   ██████  ██  █  ██    ██        █▀▀█   █▀█    █▀█  
   ██   ██ ██ ███ ██    ██    █ █ █  █    ▄▀   █▄▄█▄ 
   ██████   ███ ███     ██    ▀▄▀ █▄▄█ █ █▄▄ █    █  

   /Satoshi:0.21.0/

   ✂️ ᴘʀᴜɴᴇᴅ 🗣️ ᴍᴇᴍᴘᴏᴏʟ ʀᴇʟᴀʏ 🙉 ɴᴏʟɪsᴛᴇɴ

     NETWORK: 🌐  ᴍᴀɪɴɴᴇᴛ
   CONNECTED: 💻  1 ᴘᴇᴇʀs
      UPTIME: ⏱️  22 ᴍɪɴs

   BANDWIDTH: 📶  12.6 ᴍʙ 🔼  430.0 ᴍʙ 🔽 (24ʜ ᴀᴠɢ)
  CHAIN SIZE: 💾  564.6 ᴍʙ

    HASHRATE: ⛏️  139.0 ᴇʜ/s (7ᴅ ᴀᴠɢ)
  DIFFICULTY: 🏋️  23.6 ᴛ (ʀᴇ-🎯  ɪɴ 9 ᴅᴀʏs ⏳)
  REWARD ERA: 🎁  6.25 ʙᴛᴄ (½ ɪɴ 37 ᴍᴏɴᴛʜs ⏳)

  LAST BLOCK: ⛓️  680094 / 7 ᴍɪɴs ᴀɢᴏ / 4.0 ᴍᴡᴜ / 1.7ᴋ ᴛxs
                 Fᴇᴇ ʀᴀᴛᴇ 144-282 / ᴀᴠɢ 211 / ᴛᴏᴛᴀʟ 2.113 ʙᴛᴄ
     MEMPOOL: 💭  45.1 ᴠᴍʙ / 36.3ᴋ ᴛxs / ᴍɪɴ Fᴇᴇ ʀᴀᴛᴇ 1
    FEES EST: 🏷️  20 ᴍɪɴs: 255 / 4 ʜᴏᴜʀs: 149 / 1 ᴅᴀʏ: 16

 SUPPORT DEV: 🚀  bc1qmuagsjvq0lh3admnafk0qnlql0vvxv08au9l2d / https://btcpay.shesek.info
...

This output is full of (probably fancy, just that I do not see them) UTF-8 characters. Even the half-sized capitals (for example Fᴇᴇ ʀᴀᴛᴇ) are printed as question-marks in my terminal (rxvt-unicode using Terminus font).

I think it would be a big help if there was an --ascii option, even better if ASCII output was the default and there was a --fancy option… What do you think @shesek ? Thank you for this amazing tool! It works very welly. This is just a way to say someone else uses it :)

jsarenik commented 3 years ago

F of Fᴇᴇ ʀᴀᴛᴇ is printed correctly of course. It is a common capital letter F with equivalent representation both in ASCII and UTF-8.

shesek commented 3 years ago

Thanks for the suggestion! I will look into making an ASCII-only version of the banner.

In the meanwhile, if you find the broken characters annoying, you can turn it off entirely using --no-startup-banner.

jsarenik commented 3 years ago

I actually like the banner! :-) Just wondering how to make it more readable in constrained environments… שבוע טוב!