#!/bin/bash

url=""
file_name=""

read -p "Image URL: " url
read -p "Output File: " file_name

if [ -z url ]; then
    echo "Please input a image source URL"
    echo "Abortung..."
fi


if [ -z file_name ]; then
    echo "Please input a image target file name"
    echo "Abortung..."
fi

cd /home/jan/wallpapers/originals/
curl -o "$file_name.jpg" $url
magick "$file_name.jpg" -resize 1920x1200 "/home/jan/wallpapers/$file_name.jpg"
