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() {
|
random_paper() {
|
||||||
if [ -d "$DIR" ] ; then
|
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
|
elif [ -f "$DIR" ] ; then
|
||||||
echo "$DIR"
|
echo "$DIR"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -68,6 +68,6 @@ IMAGE_META=$(eval ${CURL_CMD})
|
||||||
IMAGE_URL="$(echo "${IMAGE_META}" | jq -r '.data.path')"
|
IMAGE_URL="$(echo "${IMAGE_META}" | jq -r '.data.path')"
|
||||||
IMAGE_ID="$(echo "${IMAGE_META}" | jq -r '.data.id')"
|
IMAGE_ID="$(echo "${IMAGE_META}" | jq -r '.data.id')"
|
||||||
FILENAME="wallhaven-${IMAGE_ID}"
|
FILENAME="wallhaven-${IMAGE_ID}"
|
||||||
curl --silent -L --output "${DIR}/${FILENAME}" "${IMAGE_URL}"
|
curl --silent -L --output "${DIR}/${FILENAME}.image" "${IMAGE_URL}"
|
||||||
echo "${DIR}/${FILENAME}"
|
echo "${DIR}/${FILENAME}.image"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue