The purpose of this project was to show how to automate certain processes using python for the Tufts Coding 101 Pre-College Course. The script leverages the Pokemon API
This project idea was taken from a Youtube Video that I watched, which will be linked in the Resources section below
Note that this will only work for MacOS users
In a terminal, run:
python3 -m venv env
to generate a virtual environment. env/bin/activate
to start up the virtual environmentpip3 install -r requirements.txt
to download all of the required libraries
You then must go into get_pokemon_background.py
and change the variable called FILENAME
towards the top of the file to be where you directory is located (Run pwd
in the terminal to get an idea if you are not sure how to do that)
Finally, run python3 get_pokemon_background.py
to get a new background
You can edit the way that it looks by going to System Preferences -> Desktop & Screen Saver and adjusting the images there
Cronjobs are tasks that can run at an interval that you set. To read more, look here
I would recommend looking at this Youtube Video since he does a great job of explaining it
Additionally, if it doesn't run and you are running it on MacOS, you will probably need to allow the cron command to have full disk access. Here is the stack overflow post I used to fix this problem
- Youtube Video Inspiration
- Helpful Page of How to use Crontab
- Crontab Guru - A good resource for figuring out cron schedule expressions
- Utilize other APIs (such as the NASA api) to create more random background images
- Make it generalizable for other operating systems