Welcome to the DJ Automation CLI! This powerful tool streamlines your DJ workflow by automating tasks such as downloading tracks, organizing files, generating AI covers, and uploading mixes to Mixcloud. Whether you're managing a personal collection or handling large-scale uploads, this CLI has got you covered. π
LAST UPDATE 1/13/25: Documentation will be updated with the correct details. Many of the functions still work as intended.
- π§ DJ Automation CLI
- π§ͺ Custom Testing
- π Security
- π Support
- π License
- π Contributing
- Automated Downloads: Fetch audio tracks from various sources effortlessly.
- File Organization: Automatically organize your downloads for easy access.
- AI Cover Generation: (Coming Soon) Create stunning AI-generated covers for your mixes.
- Mixcloud Integration: Seamlessly upload your mixes to Mixcloud with OAuth authentication.
- Scheduling: Schedule uploads to publish your mixes at optimal times.
- Robust Testing: Ensure reliability with comprehensive automated tests.
- Colorful CLI: Enjoy an intuitive and visually appealing command-line interface with color-coded messages. π¨
DJAutomation/
β
βββ cli/
β βββ main.py # Main CLI entry point
β βββ test_cli.py # CLI for running tests
β
βββ config/
β βββ settings.py # Configuration settings
β βββ mixcloud/
β βββ settings.py # Mixcloud-specific configurations
β
βββ core/
β βββ color_utils.py # Utilities for colored CLI messages
β
βββ modules/
β βββ download/
β β βββ downloader.py # Module for downloading tracks
β β βββ post_process.py # Module for organizing downloaded files
β β
β βββ mixcloud/
β βββ uploader.py # Module for uploading to Mixcloud
β βββ scheduler.py # Module for scheduling uploads
β βββ cli.py # CLI-specific functions for Mixcloud
β
βββ tests/
β βββ test_mixcloud.py # Tests for Mixcloud uploader
β
βββ .env # Environment variables (not committed)
βββ requirements.txt # Python dependencies
βββ README.md # Project documentation
All sensitive credentials and environment-specific settings are managed through the .env file. Ensure this file is listed in your .gitignore to prevent accidental commits of sensitive information.
# .env
# Only store API keys or other sensitive credentials here.
# Example placeholders have been left blank. Fill in as needed.
# Mixcloud OAuth
MIXCLOUD_CLIENT_ID=""
MIXCLOUD_CLIENT_SECRET=""
# Spotify
SPOTIFY_CLIENT_ID=""
SPOTIFY_CLIENT_SECRET=""
# Last.fm
LASTFM_API_KEY=""
# Deezer
DEEZER_API_KEY=""
# MusicBrainz
MUSICBRAINZ_API_TOKEN=""Centralized configuration file that imports environment variables and sets default values.
β’ Paths: Directories for tracks, covers, finished uploads, etc.
β’ API Credentials: Client IDs and secrets for Mixcloud, Spotify, etc.
β’ Upload Parameters: Maximum uploads per run, publish times, and tags.
β’ Toggles: Enable or disable features like Mixcloud integration and color logs.
-
Clone the Repository:
git clone https://github.com/Katazui/DJAutomation.git cd DJAutomation -
Create a Virtual Environment (optional but recommended):
python3 -m venv venv source venv/bin/activate -
Install Dependencies:
pip install -r requirements.txt -
Configure Environment Variables:
β’ Create a
.envfile in the root directory.β’ Populate it with the necessary credentials and paths as shown in the Configuration section.
TODO
TODO
Run all tests or specific ones (e.g. Mixcloud tests, Album Cover, Downloads, etc).
python cli/main.py test
python cli/main.py test --mixcloud
Ensure your codebase remains robust by running automated tests.
- Run Tests via CLI:
python cli/main.py test
β’ All Tests: Executes all tests in the tests/ directory.
β’ Specific Tests: Use flags like --mixcloud to run targeted tests.
- Run Tests Directly with Pytest:
pytest tests/
- Adding New Tests:
β’ Create new test files in the tests/ directory following the test_*.py nameing convention.
β’ Ensure your tests cover different modukles and functionalities.
β’ downloader.py: Handles downloading audio tracks from provided links. Supports interactive and file-based modes.
β’ post_process.py: Organizes downloaded files into structured directories for easy management.
β’ uploader.py: Manages the uploading of tracks to Mixcloud, including handling OAuth authentication and file uploads.
β’ scheduler.py: (Future) Implements scheduling logic to automate upload timings.
β’ cli.py: Contains CLI-specific functions for Mixcloud integration.
β’ color_utils.py: Provides utilities for color-coded messages in the CLI, enhancing readability and user experience.
β’ settings.py: Centralized configuration file importing environment variables and setting default values.
β’ mixcloud/settings.py: Mixcloud-specific configurations, including API credentials and upload parameters.
β’ test_mixcloud.py: Contains unit and integration tests for the Mixcloud uploader module, ensuring reliability and correctness.
β’ Sensitive Data: All sensitive credentials (API keys, secrets) are stored in the .env file and never committed to version control.
β’ .gitignore: Ensure your .env file is listed in .gitignore to prevent accidental exposure.
If you encouynter any issues or have questions, feel free to reach out:
β’ Email: [email protected]
β’ GitHub Issues: Open an Issue
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.
-
Fork the Repository.
-
Create a Feature Branch:
git checkout -b feature/YourFeature
- Commit Your Changes:
git commit -m "Add Your Feature Name"
- Push to the Branch:
git push origin feature/YourFeature
- Open a Pull Request.
Stay tuned for more features and improvements! Thank you for using DJ Automation CLI. π

