A CLI for DJ automation workflows.
Project description
๐ง DJ Automation CLI
Welcome to the DJ Automation CLI! This powerful tool streamlines your DJ workflow by automating tasks such as downloading tracks, organizing files, generating album covers, and uploading mixes to Mixcloud. Whether you're managing a personal collection or handling large-scale uploads, this CLI has got you covered. ๐
๐ Table of Contents
- ๐ง DJ Automation CLI
โจ Features
- Automated Downloads: Fetch audio tracks from various sources effortlessly.
- File Organization: Automatically organize your downloads for easy access.
- Album Cover Generation: Create stunning album 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
โ โโโ mixcloud_cli.py # Mixcloud-specific CLI functions
โ โโโ test_cli.py # CLI for running tests
โ โโโ download_cli.py # Download-specific CLI functions
โ โโโ organize_cli.py # Organization-specific CLI functions
โ
โโโ config/
โ โโโ settings.py # Main configuration settings
โ โโโ default_settings.py # Default configuration template
โ โโโ default_albumCoverConfig.json # Default album cover settings
โ โโโ albumCoverConfig.json # User album cover settings
โ
โโโ core/
โ โโโ color_utils.py # Utilities for colored CLI messages
โ โโโ file_utils.py # File handling utilities
โ โโโ metadata_utils.py # Metadata handling utilities
โ โโโ cover_utils.py # Album cover utilities
โ
โโโ modules/
โ โโโ download/
โ โ โโโ downloader.py # Module for downloading tracks
โ โ โโโ download_pexel.py # Module for downloading images
โ โ
โ โโโ covers/
โ โ โโโ create_album_cover.py # Module for creating album covers
โ โ
โ โโโ organize/
โ โ โโโ organize_files.py # Module for organizing files
โ โ
โ โโโ mixcloud/
โ โโโ uploader.py # Module for uploading to Mixcloud
โ
โโโ tests/
โ โโโ test_mixcloud.py # Tests for Mixcloud uploader
โ
โโโ .env # Environment variables (not committed)
โโโ requirements.txt # Python dependencies
โโโ setup.py # Package setup file
โโโ 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:
# 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=""
# Pexel
PEXEL_API_KEY=""
# General Settings
DEBUG_MODE=False
USE_COLOR_LOGS=True
๐ ๏ธ Configuration Setup
The easiest way to set up your configuration is to use the built-in setup wizard:
dj config --setup
This will guide you through:
- Creating necessary configuration directories
- Setting up default configuration files
- Entering your API keys
- Configuring paths and settings
You can also manually configure settings by editing the files in ~/Documents/DJCLI/configuration/.
๐ Installation
-
Clone the Repository:
git clone https://github.com/Katazui/DJAutomation.git cd DJAutomation
-
Create a Virtual Environment (recommended):
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Install the Package:
pip install -e .
-
Run the Setup Wizard:
python cli/main.py config --setup
Building the DJCLI Executable
To build a standalone executable for the DJCLI:
-
Install PyInstaller:
pip install pyinstaller
-
Build the Executable:
# For macOS/Linux pyinstaller --onefile --name dj cli/main.py # For Windows pyinstaller --onefile --name dj.exe cli/main.py
-
Move the Executable:
# For macOS/Linux mv dist/dj /usr/local/bin/ # For Windows # Move dist/dj.exe to a directory in your PATH
-
Verify Installation:
dj --version -
Configure the Executable:
dj config --setup
Note: The executable will be created in the dist directory. Make sure to move it to a location in your system's PATH for easy access.
๐ง Usage
๐ฅ Download Tracks
Download tracks from YouTube/SoundCloud links:
# Interactive mode
dj dl_audio
# File mode (reads from musicLinks.txt)
dj dl_audio --mode file
# Download and organize
dj dl_audio --organize
๐จ Create Album Covers
Generate album covers from images:
# Normal mode
dj create_ac
# Test mode
dj create_ac --test
๐ Organize Files
Organize downloaded files:
# Organize all files
dj org_dl
# Organize only requested files
dj org_dl --requested
โ๏ธ Upload to Mixcloud
Upload mixes to Mixcloud:
# Initialize Mixcloud settings
dj up_mixes --init-settings
# Upload mixes
dj up_mixes
# Dry run (no actual upload)
dj up_mixes --dry-run
๐งช Run Tests
Run tests to ensure everything is working correctly:
# Run all tests
dj test
# Run specific tests
dj test --mixcloud
dj test --download
๐ Modules Overview
๐ Download Module
- downloader.py: Handles downloading audio tracks from various sources
- download_pexel.py: Downloads images from Pexels for album covers
๐จ Covers Module
- create_album_cover.py: Creates album covers from downloaded images
๐ Organize Module
- organize_files.py: Organizes downloaded files into structured directories
โ๏ธ Mixcloud Module
- uploader.py: Manages uploading tracks to Mixcloud
๐ ๏ธ Core Module
- color_utils.py: CLI color utilities
- file_utils.py: File handling utilities
- metadata_utils.py: Metadata handling utilities
- cover_utils.py: Album cover utilities
๐ Security
- API keys and sensitive credentials are stored in
.envfile - The
.envfile is excluded from version control - OAuth authentication is used for Mixcloud integration
- HTTPS is used for all API communications
๐ Support
If you encounter any issues or have questions:
- Check the GitHub Issues
- Create a new issue if your problem isn't already reported
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Stay tuned for more features and improvements! Thank you for using DJ Automation CLI. ๐
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file djautomation-1.8.1.tar.gz.
File metadata
- Download URL: djautomation-1.8.1.tar.gz
- Upload date:
- Size: 51.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6bf146d10b62b5800f46fa816c812e48972602b84131c2297030bf95c000c53
|
|
| MD5 |
d02b86bccb8dcd8facfffbd025a74e38
|
|
| BLAKE2b-256 |
959d26e3f3dc04ae3c5190ba4687d3bdb6d45725c69dc930217a020b3b2e4ef5
|
File details
Details for the file djautomation-1.8.1-py3-none-any.whl.
File metadata
- Download URL: djautomation-1.8.1-py3-none-any.whl
- Upload date:
- Size: 48.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8535c2d3e1ed8b750ff2e3d6f17a63af32f907799046f6e1d5768b9ab9656bd
|
|
| MD5 |
56f61d4888d93313e65cafff37b02fb9
|
|
| BLAKE2b-256 |
affa639e0b4e9c65468402bb029891f87b9a71f0d57198b794c55718b855dc21
|