~aleteoryx/ntalk

ref: d100582bea7c0ff7578a804006ae504ae9992352 ntalk/README.md -rw-r--r-- 3.1 KiB
d100582b — glenda plan 9 client! 14 days ago

#ntalk

nanochat utils

see also teapot's client, olive's client, chloe's client, soxfox's client, d_m's client, zireh's client, bcntry's client, wolfdog's client, and probably other things

#ntalk.sh: simple nanotalk server

meant to be run under a connection broker like socat.

probably there's a chance of the file being clobbered. will get slower with more scrollback, cause it's just implemented with tail and head and wc. :P

#ntalk.tcl: tcl/tk nanotalk client

requires you have wish(1) installed.

the config is just a tcl script. ntalk boots to a config file editor, in which you can set fonts and stuff the connection is done entirely over $sok, so set that to whatever. if you want to include e.g. tcltls, go ahead. the config file is saved to/read from ~/.config/ntalk/cscript.tcl.

right click on any sixel in the chatlog, and you can save it under a custom name. saved sixels can be accessed through the "sixels" option in the top menu. slashes are interpreted, so naming one e.g. "faces / :D" will create a submenu called "faces". sixels are saved to/read from ~/.config/ntalk/cscript.tcl. each non-empty line stores one sixel, with the first '=' separating the name and the data.

if $cmds is set, it will be used for command parsing, as part of a switch statement. the rhs is the command name, the lhs is the script. the contents of the line are in $line if $server is set, it'll be shown in the top bar. if $user is set, it'll be used for the username.

to see the builtin commands, read the source code. they're torwards the bottom.

if tklib is installed, history will be setup on the main input box.

Ctrl-Shift-R will restart the client, allowing you to test config changes rapidly. Ctrl-Q exits.

#9talk: rc client for plan 9

consists of the following scripts:

  • 9talk/log [addr]: connects to $addr, or a hard-coded default (edit it!), fetches the last 16 messages, and updates every 5 seconds
  • 9talk/cmd [addr] [nick]: connects to $addr with $nick, or hard-coded defaults (edit them!). for each input line, sends one of the following:
    • '!': sends $line.
    • '.' or ':': sends $nick $line.
    • '"' or no prefix: sends $nick: $line
  • 9talk/chat: opens a window with /log and /cmd running

#scrollbackup.sh: simple backup script

just sends HIST and QUIT and logs it to a file whose name indicates when it was generated and from what server

#botlib.py: nanochat bot library

contains some functions for writing a nanochat bot. mostly netcode and code to parse input lines. it is intentionally very idiosyncratic and loose in how it parses stuff.

#dee.py: ``advanced'' AI for nanochat

a simple bot. documented at https://aleteoryx.me/deeman.md.