api: Update example.

This commit is contained in:
dylan araps 2017-07-20 12:58:33 +10:00
parent b8d6049aa8
commit 8917eef29e

View File

@ -1,10 +1,11 @@
"""pywal api example."""
import pywal
def main():
"""Main function."""
image = "/home/dylan/Pictures/Wallpapers/anVmEaA.jpg"
# Validate image and pick a random image if a
# directory is given below.
image = pywal.get_image("/home/dylan/Pictures/Wallpapers/")
# Return a dict with the palette.
colors = pywal.create_palette(image)