(defun get-buffer-text (&optional buf)
(nyxt/mode/document:select-all buf)
(nyxt/mode/document:copy buf)
(trivial-clipboard:text))
(define-internal-page cmd-result (&key text) (:title "*Result*")
(spinneret:with-html-string
(dolist (line (str:split #\newline text))
(:p line))))
(define-command-global buf-text-to-pipe-cmd (&optional buf cmd)
(let* ((buf (or buf (nyxt:current-buffer)))
(safe-text (uiop:escape-sh-token (get-buffer-text buf)))
(cmd (or cmd (prompt1 :prompt "cmd: " :sources 'prompter:raw-source)))
(cmd-output (uiop:run-program
`("bash" "-c" ,(str:concat "echo '" safe-text "' | " cmd))
:output :string)))
(nyxt:buffer-load-internal-page-focus 'cmd-result :text cmd-output)))
And then call the function like C-space buf-text-to-pipe-cmd and specify the commands to pipe to. Output will appear in a new buffer that can be further used as the source for piping.
You can increase COMP_MOVE_TIMEOUT (which is now 1 millisecond) to, say, 100 milliseconds.
RESET TIMEOUT defines how long the game is paused after game is finished to let the viewer to see the result, and NEW_GAME_START_TIMEOUT defines how long to wait before doing the first move when a new game is started.
The static image may be because of some browser security mechanisms; served as raw from GitHub the SVG is not animated for me either on Firefox, but when I download the SVG and view it from local drive in Firefox, it works. (It did work when served from GitHub at some point in history, though.)