cpls is a minimalist Python-based CLI tool for copying music files from playlists to USB drives or external devices.
It intelligently handles path resolution, file format mapping, and automatic transcoding.
- Playlist Support: Tool for parsing
.m3u,.m3u8, and simple.txtfiles (one file path per line). - Metadata Awareness: Automatically skips lines starting with
#(e.g.,#EXTINFmetadata) and empty lines. - Context-Aware Paths: Full support for relative paths, resolved against the playlist file's location.
- Device Profiles: Use profile files in the
profiles/directory to define hardware compatibility. - Extension Mapping: Tool for renaming extensions based on profile rules (e.g.,
ogg opusmaps.opusfiles to.ogg). - Auto-Transcoding: Automatically converts any unsupported formats to MP3 via ffmpeg.
python cpls.py music.m3u /media/usb-drive/- Python 3.x
- ffmpeg (must be available in your system PATH for transcoding)
Profiles are stored as text files in the profiles/ directory. The program parses them line by line:
- Single extension per line: The format is considered supported (e.g.,
flac). - Multiple extensions per line: If a line contains multiple extensions (e.g.,
ogg opus), files using any of the subsequent extensions will be remapped to the first one in that line. - Automatic Conversion: Any file extension not listed in the active device profile is automatically transcoded to MP3 using
ffmpeg.
This project is licensed under the GNU General Public License v3.0 (GPLv3). See the LICENSE file for the full text.