summaryrefslogtreecommitdiff
path: root/topics/ui/adding-terminal-output.gmi
blob: afe4e9b3329bfdb84924c665ea77fc153169300c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Adding Terminal Output

GeneNetwork runs external tools. We would like to have an option for (advanced) users, such as I, to view terminal output while running them. It will give some insight that can only be gained from reading the flask logs, right now. Not everyone has that access. The first candidate is xterm.js which is also used by Jupyter and others. It can talk web sockets:

=> https://xtermjs.org/docs/api/addons/attach/ xterm.js websocket support

As GN3 (REST) API handles calling external tools it kinda make sense to handle the terminal output page through GN3 and communicate through websockets. But first I'll do a Sinatra test run.

## Tags

* assigned: ??
* keywords: GN3, terminal, CLI
* status: unclear
* priority: low

## possible xtermjs alternative

=> https://github.com/joewalnes/websocketd possible xtermjs alternative

=> http://websocketd.com/ home page with tutorials in various languages 

They forgot scheme:

```
(define (websocketd-loop n)
"Count from 1 to n, pausing
for a second between each iteration"
  (if (zero? n)
      'done!
      (begin
        (display n)
        (display "\n")
        (sleep 1)
        (websocketd-loop (- n 1)))))
```