Skip to main content

Nyancat

This example starts a shell, runs nyancat for 10 seconds, and records the session to both an asciicast (.cast) and a termshow (.termshow) file. See Recording for more details.

Asciicast

Termshow

Terminal recording: nyancat

Source

The recordings above are generated by this page’s front matter and the {term} blocks below:

---
extensions:
  term:
    record:
      - "nyancat.cast"
      - "nyancat.termshow"
    timeout: 30
    typing:
      speed: 400
---

The first block types the command without pressing Enter. The second block presses Enter, captures the full screen, and holds for 10 seconds while nyancat runs. The third block, which isn’t shown, stops nyancat with Ctrl-C.

```{term}
nyancat -s #! enter: false, hold: 0.5
```

```{term}
#| fullscreen: true
#| timeout: 15
enter #! literal: false, hold: 10.0
```

```{term}
#| include: false
ctrl-c #! literal: false
```

The final frame captured by the second block:

nyancat -s
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                        You have nyaned for 10 seconds!