A simple utility to find and copy Windows spotlight images on your Windows PC to your preferred destination so that they can be used as wallpapers and such.
OS: Windows
Packages: git, python3, pip
In a Windows powershell or command prompt, run the following:
git clone https://github.com/agrawpri/windows-spotlight
cd windows-spotlight
python3 -m pip install -r requirements.txt
python3 -m pip install pyinstaller
$env:path += ';C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts;'
pyinstaller.exe --onefile --windowed driver.py
This should generate a ./dist/main.exe
. Just run (double-click) this file, and it should copy all the spotlight images
to C:\Users\Admin\Pictures\Spotlight
. Rerun once every day to copy new images downloaded that day.
OS: Windows(10+)
Installations: Docker desktop, git
In a Windows powershell or command prompt, run the following:
git clone https://github.com/agrawpri/windows-spotlight
cd windows-spotlight
docker-compose run --rm windows-spotlight
Rerun step #3 once every day to copy new images downloaded that day to C:\Users\Admin\Pictures\Spotlight
. That's it!
Notice how using docker simplifies the workflow so much. This is because of the following reasons:
- You don't need to have python3/pip pre-installed. Instead, we can just use a docker image which has those installed.
- You don't manually need to install python requirements (pip install) since the Dockerfile already knows to do that.
- You don't need to use something like
pyinstaller
to build a Windows executable out of this source code. Windows (10+) natively supports running linux based docker containers.
I love Windows's spotlight images and always wanted to set them as wallpapers. However, Windows does not provide this feature. So, I decided to develop a simple Windows application (.exe) which I could use to find and save the windows spotlight images to a folder of my choice so that I could use them as wallpapers.
To achieve the objective, I first figured out where and how the spotlight images are stored in Windows. Then, I wrote a python script to transfer the images to a preferred destination. Then, I setup a workflow to package the python script into a Windows executable so that this application could be distributed easily i.e. downloaded by other people who want to do the same. I also built a docker image out of my application and pushed it to DockerHub to make it easy for people to build the binary (.exe) from source and run it locally.