Skip to content

CLI to streamlines your DJ workflow by automating tasks such as downloading tracks, organizing files, generating AI covers, and uploading mixes to Mixcloud.

License

Notifications You must be signed in to change notification settings

Katazui/DJAutomation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

98 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎧 DJ Automation CLI

License: MIT Python Tests GitHub commit activity Repo Size GitHub Release Buy Me A Coffee GitHub Forks GitHub Stars

DJ Automation Banner

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.

Buy Me A Coffee


πŸ“œ Table of Contents


✨ Features

  • 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. 🎨

πŸ—‚οΈ Project Structure

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

βš™οΈ Configuration

πŸ“„ .env File

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.

πŸ“Œ Sample .env:

# .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=""

πŸ› οΈ config/settings.py

Centralized configuration file that imports environment variables and sets default values.

πŸ“Œ Key Settings

β€’ 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.


πŸš€ Installation

  1. Clone the Repository:

    git clone https://github.com/Katazui/DJAutomation.git
    cd DJAutomation
    
  2. Create a Virtual Environment (optional but recommended):

    python3 -m venv venv
    source venv/bin/activate
    
  3. Install Dependencies:

    pip install -r requirements.txt
    
  4. Configure Environment Variables:

    β€’ Create a .env file in the root directory.

    β€’ Populate it with the necessary credentials and paths as shown in the Configuration section.


πŸ”§ Usage

πŸ“₯ Download Tracks

TODO

🎡 Upload to Mixcloud

TODO

πŸ§ͺ Run Tests

Run all tests or specific ones (e.g. Mixcloud tests, Album Cover, Downloads, etc).

Run All Tests:

python cli/main.py test

Run Mixcloud Tests Only:

python cli/main.py test --mixcloud

πŸ§ͺ Custom Testing

Ensure your codebase remains robust by running automated tests.

  1. 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.

  1. Run Tests Directly with Pytest:
pytest tests/
  1. 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.


πŸ“š Modules Overview

πŸ” Download Module (modules/download/)

β€’ 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.

☁️ Mixcloud Module (modules/mixcloud/)

β€’ 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.

🎨 Core Module (core/)

β€’ color_utils.py: Provides utilities for color-coded messages in the CLI, enhancing readability and user experience.

πŸ› οΈ Configuration (config/)

β€’ settings.py: Centralized configuration file importing environment variables and setting default values.

β€’ mixcloud/settings.py: Mixcloud-specific configurations, including API credentials and upload parameters.

πŸ§ͺ Tests (tests/)

β€’ test_mixcloud.py: Contains unit and integration tests for the Mixcloud uploader module, ensuring reliability and correctness.


πŸ”’ Security

β€’ 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.


πŸ“ž Support

If you encouynter any issues or have questions, feel free to reach out:

β€’ Email: [email protected]

β€’ GitHub Issues: Open an Issue


πŸ“ License

This project is licensed under the MIT License. See the LICENSE file for details.


πŸ™ Contributing

Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.

  1. Fork the Repository.

  2. Create a Feature Branch:

git checkout -b feature/YourFeature
  1. Commit Your Changes:
git commit -m "Add Your Feature Name"
  1. Push to the Branch:
git push origin feature/YourFeature
  1. Open a Pull Request.

Stay tuned for more features and improvements! Thank you for using DJ Automation CLI. πŸŽ‰

About

CLI to streamlines your DJ workflow by automating tasks such as downloading tracks, organizing files, generating AI covers, and uploading mixes to Mixcloud.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages