Skip to content

Commit

Permalink
demos: add demos/README.md and run scripts to generate SVGs
Browse files Browse the repository at this point in the history
PNGs are updated in a descendant commit
  • Loading branch information
ilyagr committed Sep 17, 2023
1 parent 9f5343c commit b58a2fc
Show file tree
Hide file tree
Showing 7 changed files with 712 additions and 0 deletions.
41 changes: 41 additions & 0 deletions demos/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Screenshots with demos and scripts to generate them

The `demo_*.sh` scripts in this directory demo
various features of `jj`.

The `run_scripts.sh` script can be used to:

- Run them inside a standardized environment instead of the user's local
environment.
- Generate SVG and PNG images for the scripts.

The PNG images in the repo may be slightly older, as they take up more space in
the repo.

The SVG images have human-readable diffs, but may look different on different
computers with different fonts installed.

## Running `run_scripts.sh`

This requires ImageMagick and `term-transcript-cli` to be installed. See
`run_scripts.sh`'s error messages for some more details.

One way to make all the images and check the output is:

```shell
cd demos
./run_scripts.sh demo_*.sh |less
```

### A note on fonts

The exact PNG output depends on the fonts you have installed on your system.

The screenshots are usually generated on a Debian Linux system and use the "Fira
Code" font. It can be installed with `sudo apt install fonts-firacode`. It seems
to include all relevant Unicode symbols and be a little bolder and thus more
readable than the "Liberation Mono" font, which is used if Fira Code is not
installed (which also works OK). `Consolas` and `SFMono-Regular` are added for
web viewing.

`convert -list Fonts` will list the fonts ImageMagick is aware of.
87 changes: 87 additions & 0 deletions demos/git_compat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b58a2fc

Please sign in to comment.