7 lines
394 B
Bash
Executable File
7 lines
394 B
Bash
Executable File
#!/bin/bash
|
|
# usage: shot.sh name width height -> img/name.png (2x)
|
|
cd "$(dirname "$0")"
|
|
timeout 60 google-chrome --headless=new --no-sandbox --disable-gpu --hide-scrollbars --force-device-scale-factor=2 \
|
|
--window-size=$2,$3 --virtual-time-budget=2000 --screenshot="img/$1.png" "file://$PWD/mock/$1.html" >/dev/null 2>&1
|
|
echo "img/$1.png $(identify -format '%wx%h' img/$1.png 2>/dev/null)"
|