pxsocs / warden_terminal Goto Github PK
View Code? Open in Web Editor NEWWARden with an enhanced Text User Interface for Unix based systems
WARden with an enhanced Text User Interface for Unix based systems
Line 943 in a156a6f
Viewing last 40 lines does not work well when the widget may not be able to display more than 18 lines or so. Should this number of lines to tail from the debug file be a dynamic value based on row count and if you have a small screen or not?
Tested 16 lines when the display was 63 rows high looks awesome
BTC price will display but after a bit it goes to Loading... and stays there. refresh of program sometimes fixes this issue. thought maybe it was an issue with the free API key hitting request limit so made price fetch longer but issue still persisted.
Precise steps I took:
I'm getting this warning :
/home/admin/.local/lib/python3.8/site-packages/apscheduler/triggers/interval.py
:66: PytzUsageWarning:
The normalize method in no longer necessary, as this time zone supports the fold
attribute (PEP 495). For more details on migrating to a PEP 495-compliant
implementation, see
https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
return self.timezone.normalize(next_fire_time)
I will look into how to fix this and submit a PR if I find a fix, but my skills are not on par with yours.
I like this, because I can simply ssh into my Nodebox (running on a VM, hosted on my PowerEge-T410) and fire up WARden.
Thanks for your hard work.
Peace.
warden_terminal/connections.py
Line 20 in a156a6f
warden_terminal/connections.py
Line 38 in a156a6f
This website is not cooperating with non-tor connections and is failing the "Test Tor" portion of the code.
I replaced the website with https://api.myip.com and
warden_terminal/connections.py
Line 44 in a156a6f
Line 47 in a156a6f
Line 49 in a156a6f
Is this issue only happening on my end or do you see it too?
Also:
warden_terminal/connections.py
Line 41 in a156a6f
Line 832 in a156a6f
Any chance you could include a green text that counts how many blocks until taproot activation occurs (at 709632 i think) below the current block height?
Prazer, sou nyx.
Line 331 in 67a22e1
Using bitcoin.org, but it is a central server and even if their copy is taken down?
Consider sourcing from the blockchain,
sudo -u bitcoin bitcoin-cli getblock 00000000000000ecbbff6bafb7efa2f7df05b227d5c73dca8f2635af32a2e949 0 | tail -c+92167 | for ((o=0;o<946;++o)) ; do read -rN420 x ; echo -n ${x::130}${x:132:130}${x:264:130} ; done | xxd -r -p | tail -c+9 | head -c184292 > bitcoin.pdf
of course user can scp
to another computer if running headless, but a solution to show the text from the terminal is:
pdftotext bitcoin.pdf
less bitcoin.txt
After initial run and auto-connection to node (umbrel, raspiblitz, Mynode) we set a flag, maybe in the config.ini that tells Warden that it is connected to an Umbrel node for example, and to stop attempting to connect to the other node types?
Logging of the Specter desktop connection process and requests to Specter desktop; any failures or successes can be observed for troubleshooting, wallets gathered, balances, etc. Perhaps this should live in its own debug file since there is a lot going on here.
On the topic of Specter, where are you getting the URLs that are defined in Specter_importer.py?
self.login_url = self.base_url + 'auth/login'
self.tx_url = self.base_url + 'wallets/wallets_overview/txlist'
self.core_url = self.base_url + 'settings/bitcoin_core?'
These three URLs do not resolve to anything in the Specter Desktop running on Umbrel V0.4.0
warden_terminal/specter_importer.py
Lines 123 to 138 in 960f059
this fee adjustment to the transaction amount fails on a Keyerror and therefore the "send transactions" that get included in the overall specter wallet balance do not include the fees. Are we sure the fees are getting captured in the txlist?
Line 1117 in a156a6f
Although the variable "wallets" is defined earlier in the code, the addition of wallets = rpc_connection.getbalances()
is needed for the confirmed and unconfirmed balances to return values.
Line 1171 in 8803b41
I was playing around and thought about having a real-time BTC portfolio value in the header. By adding a variable in the Config.ini called "Own", we can easily pull that quantity of BTC, multiply by the current price of BTC, and then show it in the header. This would allow users to see their BTC portfolio value even if they do not have any Sats in their node's BTC wallet. If there is ever trending added, this would be a cool point to watch. Thoughts?
Config.ini:
[CURRENCIES]
primary_fx = 'USD'
fx_list = ['USD','EUR', 'GBP', 'CAD']
Own = 3.18688358
dashboard.py
if small_display is True:
from node_warden import load_config
config = load_config(quiet=True)
config = config['CURRENCIES']
Own = config.getfloat("Own")
primary_fx = ast.literal_eval(config.get('primary_fx'))
Worth = float(btc_price * Own)
txt = 'WARden Node Edition (Version: ' + version(
) + ") | " f"${jformat(btc_price, 0)} {primary_fx}/BTC " + " | " + f"Own: {Own} BTC | " + f"Net: ${jformat(Worth, 0)} {primary_fx}"
Should be simple:
Key input to reboot program
Are there plans to add the Specter Server data to the Multi Widgets screen?
warden_terminal/ansi_management.py
Line 26 in a156a6f
Suggest changing the color from blue to white (or even green) since the blue font on black background has such little contrast it makes reading the text quite difficult.
$ python node_warden.py
โ
Loading config.ini
Config Loaded [Success]
๐ฅ Testing Tor
Tor NOT connected [ERROR]
Could not connect to Tor. WARden requires Tor to run. Quitting...
Download Tor at: https://www.torproject.org/download/
However Tor works:
$ curl -x socks5h://localhost:9050 -s https://check.torproject.org/api/ip
{"IsTor":true,"IP":"xxx.xxx.xxx.xxx"}
What am I doing wrong?
After git clone https://github.com/pxsocs/warden_terminal
, cd warden_terminal
, pip3 install -r requirements.txt
, I see the following warnings:
The script tabulate is installed in '/home/admin/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
The script pyfiglet is installed in '/home/admin/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
After running python3 node_warden.py
:
admin@raspberrypi:~/warden_terminal $ python3 node_warden.py
Traceback (most recent call last):
File "node_warden.py", line 793, in store_local_ip
pickle_it('save', 'ip.pkl', ip)
File "node_warden.py", line 777, in pickle_it
with open(filename, 'wb') as handle:
FileNotFoundError: [Errno 2] No such file or directory: '/home/admin/warden_terminal/static/save/ip.pkl'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "node_warden.py", line 914, in <module>
main()
File "node_warden.py", line 800, in main
store_local_ip()
File "node_warden.py", line 795, in store_local_ip
pickle_it('save', 'ip.pkl', None)
File "node_warden.py", line 777, in pickle_it
with open(filename, 'wb') as handle:
FileNotFoundError: [Errno 2] No such file or directory: '/home/admin/warden_terminal/static/save/ip.pkl'
We need to nclude "data_umbrel" in the import from data.py
Lines 13 to 17 in 8eb15a3
Then Dashboard.py needs something like this:
def umbrel_updater(_loop, __data):
data = translate_text_for_urwid(data_umbrel())
mp_box.base_widget.set_text(data)
main_loop.set_alarm_in(1, umbrel_updater)
and
main_loop.set_alarm_in(0, umbrel_updater)
warden_terminal/connections.py
Line 178 in 64e5db1
I think the default port for RTL is 3001 not 3010
Also, maybe in the widget, we can show the port next to the IP address like "192.168.0.5:3001"
Include price chart (daily, weekly, etc). This repository may be helpful.
Can we please increase the level of logging that gets pushed to the debug.log? Spinners are nice during startup and when things are all working great, but they all disappear once the main dashboard loads
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.