Pixawttr is a golang program to automate the creation of a pretty composite forcast image.
It uses the wttr.in service to get "Current conditions" data and an analogous PNG.
It uses the Pixabay Search API to enable the random downloading of an image based on a query string.
go get github.com/erindatkinson/pixawttr
Pixawttr has an external dependency of imagemagick.
brew bundle
- Follow the instructions
- Make sure that the tools are accessible and set in the PATH
- If
composite --help
doesn't work in Powershell and the PATH is set correctly, you will also need to Set-Alias formagick composite
tocomposite
.
To use pixawttr, you'll need to sign up for a Pixabay account, once you've logged in, you can see your API key in the key
parameter under the Search Images section of the API docs. (I haven't been able to find a way besides this to get the key :woman-shrugging:)
Once you have the key, you can place it in the environment variable PixabayAPIKey
or at $HOME/.pixawttr in the following format
PixabayAPIKey: 12345678-f4f79534645cd471ea614adf92efffbc
after which, you can run
pixawttr
pixawttr -q "search term for bg image"
pixawttr -u f
pixawttr -o alternate_output.png
and the resulting image will be either what you've entered for the outFile path, or outFile.png
in the directory you run it.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
All contributors are held to the Code of Conduct adapted from the Contributor Covenant version 1.4
By using this you agree to abide by the Pixabay License in the usage of images downloaded from Pixabay.
The code for pixawttr is licensed under MPL V2.0 License