Skip to content

Commit

Permalink
readme screenshots + gif
Browse files Browse the repository at this point in the history
  • Loading branch information
robinovitch61 committed Jan 6, 2024
1 parent 00094bd commit 02e4628
Show file tree
Hide file tree
Showing 5 changed files with 195 additions and 54 deletions.
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@ An efficient terminal application/TUI for interacting with your [HashiCorp Nomad
- See full job or allocation specs
- Save any content to a local file

![](./img/home.png)
`wander` is written with tools from [Charm](https://charm.sh/).

[More Screenshots](./img/screenshots#readme)
[Feature requests and bug reports are welcome](https://github.com/robinovitch61/wander/issues/new/choose).

![](./img/wander_flow.drawio.png)
## Demo

`wander` is written with tools from [Charm](https://charm.sh/).
![](./img/wander.gif)

[Screenshots](./img/screenshots#readme)

[Feature requests and bug reports for wander are welcome](https://github.com/robinovitch61/wander/issues/new/choose).
## Flow Diagram
![](./img/wander_flow.drawio.png)

## Installation

Expand All @@ -52,17 +55,11 @@ yay -S wander-bin

# with go (https://go.dev/doc/install)
go install github.com/robinovitch61/wander@latest

# build from source
git clone [email protected]:robinovitch61/wander.git
cd wander
go build
mv ./wander /usr/local/bin # or somewhere else in your PATH

# OR download prebuilt release from https://github.com/robinovitch61/wander/releases
# and move the unpacked executable to somewhere in your PATH, e.g. /usr/local/bin
```

You can also download [prebuilt releases](https://github.com/robinovitch61/wander/releases) and move the unpacked
executable to somewhere in your `PATH`, e.g. `/usr/local/bin`.

## Usage

Run the app by running `wander` in a terminal. See `wander --help` and config section below for details.
Expand Down Expand Up @@ -234,8 +231,7 @@ Serve the ssh app with `wander serve`.

## Trying It Out

You can try `wander` out by running a local nomad cluster in dev mode
following [these instructions](https://learn.hashicorp.com/tutorials/nomad/get-started-run?in=nomad/get-started):
You can try `wander` out by running a local development nomad cluster following [these instructions](https://learn.hashicorp.com/tutorials/nomad/get-started-run?in=nomad/get-started):

```sh
# in first terminal session, start and leave nomad running in dev mode
Expand Down Expand Up @@ -263,9 +259,14 @@ In this case, you're responsible for ensuring the specified version is in sync w

## Development

The `scripts/dev.sh` script watches the source code and rebuilds the app on changes
using [entr](https://github.com/eradman/entr). Install the latest release of `nomad`.
To manually build:

```shell
git clone [email protected]:robinovitch61/wander.git
cd wander
go build # outputs ./wander executable
```

`wander` runs the built app. You must rerun it on rebuild.
The [scripts][/scripts] directory contains various development helper scripts.

If the `WANDER_DEBUG` environment variable is set to `true`, the `dev.Debug(s string)` function outputs to `wander.log`.
Binary file removed img/home.png
Binary file not shown.
Binary file added img/wander.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions scripts/gif_demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# expects nomad to already be running locally
# should be run from scripts directory

# get the latest tag on this branch
latest_tag=$(git describe --tags --abbrev=0)
./rebuild.sh "$latest_tag"
tag=${1:-$latest_tag}
./rebuild.sh "$tag"
mv ~/.wander.{yaml,yaml.tmp}
vhs vhs.tape
mv ~/.wander.{yaml.tmp,yaml}
Expand Down
206 changes: 173 additions & 33 deletions scripts/vhs.tape
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
# Sleep:
# Sleep <time> Sleep for a set amount of <time> in seconds
#
# Type@1ms:
# Type@1ms[@<time>] "<characters>" Type@1ms <characters> into the terminal with a
# Type:
# Type[@<time>] "<characters>" Type <characters> into the terminal with a
# <time> delay between each character
#
# Keys:
Expand All @@ -40,78 +40,218 @@
# Hide Hide the subsequent commands from the output
# Show Show the subsequent commands in the output

Output "ignore.gif"
Require wander
Output "../img/wander.gif"

Set Padding 10
Set FontSize 13
Set Width 1100
Set Height 450
Set Framerate 15

Type@1ms "wander"
Hide
Type "wander"
Enter
Sleep 200ms
Show

# All Jobs
Type@1ms "j"
Sleep 200ms
Screenshot ../img/home.png
Sleep 200ms
Sleep 1s
Type@500ms "jj"
Type@500ms "k"
#Screenshot ../img/screenshots/Global_Events.png
Sleep 1s

# All Events
Type "V"
Sleep 200ms
Screenshot ../img/screenshots/Global_Events.png
Sleep 200ms
Sleep 2s
Type@300ms "j"
Enter
Sleep 1s
Type@500ms "dd"

# Job Events
Escape 2
Type@1ms "v"
Sleep 200ms
Screenshot ../img/screenshots/Job_Events.png
Sleep 200ms
# Back to All Jobs
Escape@1s 2
Sleep 1s

# All Tasks
Type@1ms "A"
Type@1ms "jj"
Type@1ms "k"
Type "A"
Sleep 1s
Type@500ms "jj"
Type@500ms "k"
Sleep 1s

# Exec for Task
Type@1ms "e"
Type "e"
Sleep 1s
Backspace 10
Type@1ms "bash"
Type@200ms "bash"
Sleep 500ms
Enter
Type@1ms "ls -la"
Type@150ms "ls -la"
Sleep 300ms
Enter
Sleep 2s
Ctrl+d
Escape 2
Sleep 2s
Escape@300ms 2
Sleep 500ms

# Back to All Jobs
Type@1ms "J"
Type "J"
Sleep 1s

# Tasks for Job
Enter
Sleep 2s

# Logs for Task, Filtering
Enter
Type@1ms "/"
Type@1ms "INFO"
Sleep 2s
Type "/"
Sleep 1s
Type@200ms "INFO"
Sleep 0.5s
Enter
Type@1ms "nnnN"
Type@1ms "jjkk"
Type@0.5s "nnnN"
Type@300ms "jjkk"
Enter
Escape 2
Sleep 1s
Escape@200ms 2

# Save Logs
Ctrl+S
Type@1ms "my_logs.txt"
Type@100ms "my_logs.txt"
Sleep 500ms
Enter
Sleep 3s

# Back to Tasks for Job
Escape
Sleep 1s

# Stats for Allocation
Type@1ms "s"
Type "s"
Sleep 2s

# Back to Tasks for Job
Escape
Sleep 1s

# TODO: rm
## VHS documentation
##
## Output:
## Output <path>.gif Create a GIF output at the given <path>
## Output <path>.mp4 Create an MP4 output at the given <path>
## Output <path>.webm Create a WebM output at the given <path>
##
## Settings:
## Set FontSize <number> Set the font size of the terminal
## Set FontFamily <string> Set the font family of the terminal
## Set Height <number> Set the height of the terminal
## Set Width <number> Set the width of the terminal
## Set LetterSpacing <float> Set the font letter spacing (tracking)
## Set LineHeight <float> Set the font line height
## Set Theme <string> Set the theme of the terminal (JSON)
## Set Padding <number> Set the padding of the terminal
## Set Framerate <number> Set the framerate of the recording
## Set PlaybackSpeed <float> Set the playback speed of the recording
##
## Sleep:
## Sleep <time> Sleep for a set amount of <time> in seconds
##
## Type@1ms:
## Type@1ms[@<time>] "<characters>" Type@1ms <characters> into the terminal with a
## <time> delay between each character
##
## Keys:
## Backspace[@<time>] [number] Press the Backspace key
## Down[@<time>] [number] Press the Down key
## Enter[@<time>] [number] Press the Enter key
## Space[@<time>] [number] Press the Space key
## Tab[@<time>] [number] Press the Tab key
## Left[@<time>] [number] Press the Left Arrow key
## Right[@<time>] [number] Press the Right Arrow key
## Up[@<time>] [number] Press the Up Arrow key
## Down[@<time>] [number] Press the Down Arrow key
## Ctrl+<key> Press the Control key + <key> (e.g. Ctrl+C)
##
## Display:
## Hide Hide the subsequent commands from the output
## Show Show the subsequent commands in the output
#
#Output "ignore.gif"
#Require wander
#
#Set Padding 10
#Set FontSize 13
#Set Width 1100
#Set Height 450
#Set Framerate 15
#
#Type@1ms "wander"
#Enter
#
## All Jobs
#Type@1ms "j"
#Sleep 200ms
#Screenshot ../img/home.png
#Sleep 200ms
#
## All Events
#Type "V"
#Sleep 200ms
#Screenshot ../img/screenshots/Global_Events.png
#Sleep 200ms
#
## Job Events
#Escape 2
#Type@1ms "v"
#Sleep 200ms
#Screenshot ../img/screenshots/Job_Events.png
#Sleep 200ms
#
## All Tasks
#Type@1ms "A"
#Type@1ms "jj"
#Type@1ms "k"
#
## Exec for Task
#Type@1ms "e"
#Backspace 10
#Type@1ms "bash"
#Enter
#Type@1ms "ls -la"
#Enter
#Ctrl+d
#Escape 2
#
## Back to All Jobs
#Type@1ms "J"
#
## Tasks for Job
#Enter
#
## Logs for Task, Filtering
#Enter
#Type@1ms "/"
#Type@1ms "INFO"
#Enter
#Type@1ms "nnnN"
#Type@1ms "jjkk"
#Enter
#Escape 2
#
## Save Logs
#Ctrl+S
#Type@1ms "my_logs.txt"
#Enter
#
## Back to Tasks for Job
#Escape
#
## Stats for Allocation
#Type@1ms "s"
#
## Back to Tasks for Job
#Escape

0 comments on commit 02e4628

Please sign in to comment.