mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-21 07:34:18 +02:00
Add gallery generation script
This commit is contained in:
parent
af92548528
commit
810cdf1a2b
3 changed files with 20 additions and 7 deletions
19
README.md
19
README.md
|
|
@ -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
|
||||
|
||||

|
||||
|
||||
## Colors
|
||||
|
||||
Currently `gold` uses the [Aurora ANSI colors](https://godoc.org/github.com/logrusorgru/aurora#Index).
|
||||
|
||||
## Example Output
|
||||
## Development
|
||||
|
||||

|
||||
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
8
gallery.sh
Executable 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 |
Loading…
Add table
Add a link
Reference in a new issue