Configuration
When the djtools
command is run, build_config
looks for a config.yaml
in the package's config
directory and creates a BaseConfig
object using its values.
If djtools
was run with any CLI options, those values override whatever was set in the BaseConfig
using the values in config.yaml
.
If config.yaml
doesn't exist, it will be generated when running djtools
.
If config.yaml
, or any of the values it might contain, is missing then the default values in the Python object are used instead.
If config.yaml
contains any unsupported options, djtools
will fail as extra keys are forbidden.
Base config
artist_first
: used to indicate that your Beatcloud tracks adhere to theArtist1, Artist2 - Title (Artist2 Remix)
format rather than theTitle (Artist2 Remix) - Artist1, Artist2
format expected by defaultlog_level
: logger log levelverbosity
: verbosity level for logging messages
Collection config
collection_path
: the full path to your collection...the parent directory where this points to is also where all other collections generated or utilized by this library will existcollection_playlists
: boolean flag to trigger the generation of a playlist structure (as informed bycollection_playlists.yaml
) using the tags incollection_path
...the resulting collection is the file atcollection_path
collection_playlists_remainder
: whether tracks of remainder tags (those not specified incollection_playlists.yaml
) will be placed in afolder
called "Unused Tags" with individual tag playlists or aplaylist
called "Unused Tags"collection_playlist_filters
: list ofPlaylistFilter
classes used to apply special filtering logic to tag playlistscopy_playlists
: list of playlists incollection_path
to (a) have audio files copied and (b) have track data written to a new collection with updated locationscopy_playlists_destination
: path to copy audio files toplatform
: DJ platform used (e.g.rekordbox
)shuffle_playlists
: list of playlists that will have their tracks shuffled
Spotify config
reddit_client_id
: client ID for registered Reddit API applicationreddit_client_secret
: client secret for registered Reddit API applicationreddit_user_agent
: user-agent for registered Reddit API applicationspotify_client_id
: client ID for registered Spotify API applicationspotify_client_secret
: client secret for registered Spotify API applicationspotify_playlists
: boolean flag to trigger the automatic generation or updating of Spotify playlists from subredditsspotify_playlist_default_limit
: default number of tracks for a Spotify playlistspotify_playlist_default_period
: default subreddit period for a Spotify playlistspotify_playlist_default_type
: default subreddit filter type for a Spotify playlistspotify_playlist_from_upload
: boolean flag to trigger automatic generation of updating of a Spotify playlist from the Discord webhook output of a user's music upload (output must be copied to the system clipboard)spotify_playlist_fuzz_ratio
: the minimum Levenshtein similarity between a Spotify API track search result and a subreddit post title (if post is not directly a Spotify URL) to trigger the addition of that track to the corresponding Spotify auto-playlistspotify_playlist_post_limit
: the maximum number of posts to retrieve from a subredditspotify_playlist_subreddits
: list ofSubredditConfig
objects from which tracks should be added to Spotify auto-playlist; each element is a dictionary with keys for a subreddit's "name", "type", "period", and "limit"spotify_redirect_uri
: redirect URI for registered Spotify API applicationspotify_username
: Spotify username that will keep playlists automatically generated
Sync config
aws_profile
: the name of the profile used when runningaws configure --profile
aws_use_date_modified
: up/download files that already exist at the destination if the date modified field at the source is after that of the destination...BE SURE THAT ALL USERS OF YOURBEATCLOUD
INSTANCE ARE ON BOARD BEFORE UPLOADING WITH THIS FLAG SET!bucket_url
: URL for an AWS S3 API compliant storage locationdiscord_url
: webhook URL for messaging a Discord server's channel when new music has been uploaded to thebeatcloud
download_collection
: sync the collection ofimport_user
from thebeatcloud
to the directory thatcollection_path
is indownload_exclude_dirs
: the list of paths (relative to theDJ Music
folder on yourusb_path
) that should NOT be downloaded from thebeatcloud
when running thedownload_music
sync operationdownload_include_dirs
: the list of paths (relative to theDJ Music
folder on yourusb_path
) that should exclusively be downloaded from thebeatcloud
when running thedownload_music
sync operationdownload_music
: sync beatcloud to "DJ Music" folderdownload_spotify_playlist
: if this is set to the name of a playlist (present inspotify_playlists.yaml
), then only the Beatcloud tracks present in this playlist will be downloadeddryrun
: showaws s3 sync
command output without runningimport_user
: the username of a fellowbeatcloud
user whose collection you want to downloadupload_collection
: synccollection_path
to the beatcloudupload_exclude_dirs
: the list of paths (relative to theDJ Music
folder on yourusb_path
) that should NOT be uploaded to thebeatcloud
when running theupload_music
sync operationupload_include_dirs
: the list of paths (relative to theDJ Music
folder on yourusb_path
) that should exclusively be uploaded to thebeatcloud
when running theupload_music
sync operationupload_music
: sync "DJ Music" folder to the beatcloudusb_path
: the full path to the USB drive which contains all your music filesuser
: this is the username of the current user...if left as an empty string, then your operating system username will be used...it's recommended that you only override this if your username changes from what other users of yourbeatcloud
instance are expecting (to ensure consistency...i.e. when you get a new computer with a different username)
Utils config
audio_bitrate
: string representing the integer in the range [36
,320
] for the bitrate to write audio at e.g."320"
audio_destination
: path to where downloaded and / or exported files go toaudio_format
: string representing the file format write audio in e.g."mp3"
audio_headroom
: non-negative float representing the amount of headroom in decibels to leave when normalizing audiocheck_tracks
: boolean flag to trigger checking the contents of thebeatcloud
(to identify redundancies)check_tracks_fuzz_ratio
: the minimum Levenshtein similarity for indicating potential redundancies between Spotify playlists / local directories and thebeatcloud
check_tracks_spotify_playlists
: list of Spotify playlists to use withcheck_tracks
(must exist inspotify_playlists.yaml
)local_dirs
: list of local directories to use withcheck_tracks
normalize_audio
: boolean flag to trigger normalizing audio files atlocal_dirs
,process_recording
: boolean flag to trigger processing an audio recording using a Spotify playlistrecording_file
: Audio recording to pair withrecording_playlist
recording_playlist
: Spotify playlist to pair withrecording_file
trim_initial_silence
: Milliseconds of initial silence to trim offrecording_file
. Can also be a negative integer to prepend silence. Can also be "auto" or "smart" for automatic silence detection or a home-brewed algorithm for finding the optimal offset.url_download
: URL from which music files should be downloaded (i.e. a Soundcloud playlist)