Add gallery generation script

This commit is contained in:
Christian Muehlhaeuser 2019-11-28 07:11:17 +01:00
commit 810cdf1a2b
3 changed files with 20 additions and 7 deletions

View file

@ -34,16 +34,21 @@ You can supply a JSON stylesheet with the `-s` flag:
./gold -s mystyle.json
```
Style definitions located in `styles/` can be embedded into the binary by
running [statik](https://github.com/rakyll/statik).
```
statik -f -src styles -include "*.json"
```
## Example Output
![Gold Dark Style](https://github.com/charmbracelet/gold/raw/master/cmd/gold/styles/gold_dark.png)
## Colors
Currently `gold` uses the [Aurora ANSI colors](https://godoc.org/github.com/logrusorgru/aurora#Index).
## Example Output
## Development
![Gold Dark Style](https://github.com/charmbracelet/gold/raw/master/cmd/gold/styles/gold_dark.png)
Style definitions located in `styles/` can be embedded into the binary by
running [statik](https://github.com/rakyll/statik):
```
statik -f -src styles -include "*.json"
```
You can re-generate screenshots of all available styles by running `gallery.sh`.
This requires `termshot` and `pngcrush` installed on your system!

8
gallery.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
for style in ./styles/*.json; do
echo "Generating screenshot for ${style}"
filename="gold_`basename -s .json ${style}`.png"
termshot -o ./styles/ -f "$filename" ./gold -s ${style}
pngcrush -ow "./styles/$filename"
done

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Before After
Before After