2019-12-25 10:08:25 +00:00
|
|
|
#! /usr/bin/bash
|
|
|
|
# Download current page as pdf file
|
|
|
|
|
|
|
|
# use title of current page / selected text as filename
|
|
|
|
filename=${QUTE_SELECTED_TEXT:-$QUTE_TITLE}
|
|
|
|
# revert to default name if nothing else is set; remove special chars
|
2019-12-28 10:19:10 +00:00
|
|
|
filename=$(echo "${filename:-downloaded.pdf}" | sed 's/[<>,/]/_/g')
|
2019-12-25 10:08:25 +00:00
|
|
|
|
|
|
|
# print to pdf
|
|
|
|
echo "print --pdf '$QUTE_DOWNLOAD_DIR/${1:-$filename}.pdf'" >>"$QUTE_FIFO"
|