use the .image suffix on downloaded images so chpaper can find them
This commit is contained in:
parent
3c14fdb471
commit
a724d1ecc8
2 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ fi
|
|||
|
||||
random_paper() {
|
||||
if [ -d "$DIR" ] ; then
|
||||
find -L "${DIR}"/ -type f -regextype egrep -regex ".*\.(jpe?g|png)$" | shuf -n1
|
||||
find -L "${DIR}"/ -type f -regextype egrep -regex ".*\.(jpe?g|png|image)$" | shuf -n1
|
||||
elif [ -f "$DIR" ] ; then
|
||||
echo "$DIR"
|
||||
fi
|
||||
|
|
|
@ -68,6 +68,6 @@ IMAGE_META=$(eval ${CURL_CMD})
|
|||
IMAGE_URL="$(echo "${IMAGE_META}" | jq -r '.data.path')"
|
||||
IMAGE_ID="$(echo "${IMAGE_META}" | jq -r '.data.id')"
|
||||
FILENAME="wallhaven-${IMAGE_ID}"
|
||||
curl --silent -L --output "${DIR}/${FILENAME}" "${IMAGE_URL}"
|
||||
echo "${DIR}/${FILENAME}"
|
||||
curl --silent -L --output "${DIR}/${FILENAME}.image" "${IMAGE_URL}"
|
||||
echo "${DIR}/${FILENAME}.image"
|
||||
|
||||
|
|
Loading…
Reference in a new issue