dotfiles/dots/scripts/apod
Valentin Boettcher 8fd0a4e997 Update
2018-09-06 07:13:35 +02:00

7 lines
285 B
Bash
Executable file

#!/bin/bash
DATA=$(curl -s "https://api.nasa.gov/planetary/apod?api_key=bRA8UPQcbm4k3RAfv7c87bKPdvLqN9PCkZp3n6sg")
TITLE=$(echo $DATA | jq -r ".title")
DESK=$(echo $DATA | jq -r ".explanation")
URL=$(echo $DATA | jq -r ".hdurl")
printf "$TITLE\n===========\n$DESK"
setWallFromUrl $URL