The Wallpaper Downloader is a Django web application that allows users to download random wallpapers from Unsplash. This application utilizes the power of Celery for task management and Redis as a message broker to efficiently generate and download wallpapers. Users have the flexibility to choose between desktop and mobile wallpapers according to their preferences.
Follow these steps to set up the project and run it locally:
- Go to the Unsplash Developer website.
- Create an account or log in if you already have one.
- Once logged in, go to the Applications page.
- Click on the "New Application" button to create a new application.
- After creating the application, you will see your Access Key. Copy it; you'll need it later.
- Clone this repository to your local machine:
git clone [email protected]:chukhraiartur/wallpaper-downloader.git
- Navigate to the project directory:
cd wallpaper-downloader
- Create a
.env
file in the project root directory. You can do this using the following command:
touch .env
- Open the
.env
file with a text editor and add your Unsplash API key to it:
UNSPLASH_ACCESS_KEY=your-access-key-goes-here
Replace your-access-key-goes-here
with the Access Key you obtained from Unsplash.
- Build and start the Docker containers using Docker Compose:
sudo service docker start
sudo docker-compose up --build
-
Open your web browser and go to http://127.0.0.1:8000/ to access the Wallpaper Downloader application.
-
Use the application to select the download type (desktop or mobile) and specify the folder path where you want to save the downloaded wallpapers.
-
Click the "Download" button to initiate the wallpaper download.
To stop the application, press Ctrl + C
in the terminal where Docker Compose is running. Then, run the following command to clean up the containers:
sudo docker-compose down
If you have feedback or would like to contribute to this project, please feel free to create an issue or submit a pull request.
Happy wallpaper downloading!