Skip to content

Commit

Permalink
docs: add ecalc selftest gif (#626)
Browse files Browse the repository at this point in the history
  • Loading branch information
markusrf authored Sep 25, 2024
1 parent ef21d6f commit 738815e
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ ecalc selftest

Please refer to [Docker Docs](https://docs.docker.com/) for details on how to use Docker.

![ecalc-selftest](docs/gifs/selftest.gif)

### Create and run your first model

Please refer to the https://equinor.github.io/ecalc/docs/about/modelling/setup/ on how to set up your own model
Expand Down
19 changes: 19 additions & 0 deletions docs/gifs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# How to generate eCalc CLI gifs for documentation

Install `vhs` as per their [documentation](https://github.com/charmbracelet/vhs?tab=readme-ov-file#installation), then restart your shell.

Create a venv and install `libecalc` in this directory.

```sh
python -m venv venv
source venv/bin/activate
pip install libecalc
```

The `.tape`-file is the script showing what will be run when creating the `.gif`.

To generate a new `.gif`, run `vhs` with the desired `.tape` file.:

```sh
vhs selftest.tape
```
Binary file added docs/gifs/selftest.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions docs/gifs/selftest.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Output selftest.gif

Set Framerate 60
Set WindowBar Colorful
Set BorderRadius 10
Set Margin 20
Set MarginFill "#181926"
Set Theme "Catppuccin Macchiato"
Set Width 1300
Set Height 600
Set Shell bash

Hide
Type@50ms "source venv/bin/activate; clear"
Enter
Show

Type "ecalc --version"
Sleep 0.5s
Enter
Sleep 5s

Enter 2
Type "ecalc selftest"
Sleep 0.5s
Enter
Sleep 5s

0 comments on commit 738815e

Please sign in to comment.