使用DART的NOSTR控制台客戶端
這是一種實驗性或前阿爾法軟件,旨在顯示或知道NOSTR網絡客戶端的外觀。它每次都有90%的時間;當繼電器無法完美地工作時,更少。
首先查看或解壓縮代碼為目錄, cd為該目錄,然後從那裡鍵入以下命令:(確保Docker Desktop在後台運行)
docker build -t nostr_console .
然後使用
docker run -it nostr_console start
可以在此處找到來自此存儲庫的主分支的預構建碼頭圖像。
docker pull ghcr.io/vishalxl/nostr_console:main
進而
docker run -it ghcr.io/vishalxl/nostr_console:main
運行NoStr_Console的最簡單方法:轉到發布並為您的平台獲得可執行文件。
否則請以下操作:
dart pub get獲取所有依賴關係dart run bin/nostr_console.dart ,它將使用默認設置運行。dart compile exe bin/nostr_console.dart將為您的平台創建可執行文件。您可以使用所需參數調用EXE。在Windows上,您可以使用其中提到的所需命令行參數創建一個快捷方式。用法:
usage: dart run bin/nostr_console.dart [OPTIONS]
OPTIONS
-k, --prikey <private key> The nsec or hex private key of user you want to 'log in' as.
-p, --pubkey <public key> The npub or hex public key of user whose events and feed are shown. When given,
posts/replies can't be sent because for that a private key is needed.
-r, --relay <relay urls> The comma separated relay urls that are used as relays. If given, these are used
rather than the default relays.
-f, --file <filename> Read from given file, if it is present, and at the end of the program execution, write
to it all the events (including the ones read, and any new received). Even if not given,
the default is to read from and write to all_nostr_events.txt . Can be turned off by
the --disable-file flag
-d, --days <N as num> The latest number of days for which events are shown. Default is 1.
--request <REQ string> This request is sent verbatim to the default relay. It can be used to recieve all events
from a relay. If not provided, then events for default or given user are shown.
-s, --disable-file When turned on, even the default filename is not read from.
-t, --translate Translate some of the recent posts using Google translate site ( and not api). Google
is accessed for any translation request only if this flag is present, and not otherwise.
-l, --lnqr Flag, if set any LN invoices starting with LNBC will be printed as a QR code. Will set
width to 140, which can be reset if needed with the --width argument. Wider
space is needed for some qr codes.
-g, --location <location> The given value is added as a 'location' tag with every kind 1 post made. g in shortcut
standing for geographic location.
-h, --help Print help/usage message and exit.
-v, --version Print version and exit.
UI Options
-a, --align <left> When "left" is given as option to this argument, then the text is aligned to left. By
default the posts or text is aligned to the center of the terminal.
-w, --width <width as num> This specifies how wide you want the text to be, in number of columns. Default is 96.
Cant be less than 60.
-m, --maxdepth <depth as num> The maximum depth to which the threads can be displayed. Minimum is 2 and
maximum allowed is 12.
-c, --color <color> Color option can be green, cyan, white, black, red and blue.
Advanced
-y, --difficulty <number> The difficulty number in bits, only for kind 1 messages. Tne next larger number divisible
by 4 is taken as difficulty. Can't be more than 32 bits, because otherwise it typically
takes too much time. Minimum and default is 0, which means no difficulty.
-e, --overwrite Will over write the file with all the events that were read from file, and all newly
received. Is useful when the file has to be cleared of old unused events. A backup should
be made just in case of original file before invoking.
用私鑰K作為用戶“登錄”:
nostr_console.exe --prikey=K
為了在過去3天(在允許執行式執行的bash shell上獲取後繼上的所有最新消息),用於使用私鑰k的用戶:
nostr_console.exe --prikey=K --request=`echo "["REQ","l",{"since":$(date -d '-3 day' +%s)}]"`
獲取所有加密消息:
./nostr_console_elf64 --prikey=K --request='["REQ","cn",{"limit":20000,"kinds":[104,140,141,142],"since":1663417739}]' # run on linux/bash
要使用DART運行單元測試,在主/頂級目錄中運行:
dart run test -r expanded
如果程序沒有發送事件:
如果程序沒有提出事件:
當您處於阻止傳出HTTP(例如公司防火牆)的網絡中時,但是有一個代理可以在運行nostr_console之前設置環境變量。以下示例使用身份驗證。刪除用戶名:如果不需要密碼。
$ export HTTP_PROXY=http://username:[email protected]:1234
$ export HTTPS_PROXY=http://username:[email protected]:5678
要使您的外殼配置文件永久添加,例如/.bashrc或to /etc/profile.d/
C:setx HTTP_PROXY=http://username:[email protected]:1234
C:setx HTTPS_PROXY=http://username:[email protected]:5678
使用SETX設置環境變量更改當前命令提示符中使用的值和運行命令後創建的所有命令提示符會話。它不會影響您運行命令時已經運行的其他命令殼。
使用設置設置環境變量更改使用的值,直到當前命令提示會話結束,或直到將變量設置為其他值為止。
TOR可以用作HTTPTUNNELPORT的HTTP代理,而不僅僅是Socks5。


菜單的公共頻道概述

截至2022年底,公共渠道看起來像 - 譯-Translate Flag自動翻譯成英語。
NOSTR電報頻道
NOSTR控制台電報頻道
NOSTR PULIC通道52CAB2E3E504AD647D284B85B5CC601CA0613B151641E77FACFAC851C2CA816