init
This commit is contained in:
26
gen.sh
Executable file
26
gen.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
DEV="192.168.1.179"
|
||||
USER="chrome"
|
||||
CHROME="/home/chrome/chrome/linux-144.0.7559.96/chrome-linux64/chrome"
|
||||
KEYFILE="chrome"
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
echo Requires argument
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PRINT=""
|
||||
|
||||
if [[ $(printf $1 | tail -c 4) = "html" ]]; then
|
||||
scp -i $KEYFILE $1 $USER@$DEV:/tmp/input.html
|
||||
echo html;
|
||||
PRINT="/tmp/input.html"
|
||||
else
|
||||
# This might be a bad idea, idk
|
||||
echo Assuming argument 1 is a url: $1
|
||||
PRINT=$1
|
||||
fi
|
||||
|
||||
scp -i $KEYFILE -r extension $USER@$DEV:~/
|
||||
ssh -i $KEYFILE $USER@$DEV $CHROME --headless=new --no-pdf-header-footer --print-to-pdf --load-extension="/home/$USER/extension" $PRINT
|
||||
scp -i $KEYFILE $USER@$DEV:~/*.pdf ./
|
||||
|
||||
Reference in New Issue
Block a user