songchro
Synchronize playlists between iTunes and Plex
Installation
# Clone the repository
git clone https://github.com/acourtneybrown/songchro.git
cd songchro
# Install the package in development mode
pip install -e .
Configuration
Songchro uses a configuration file located at ~/.config/songchro/config.yml. This file contains settings for the different music libraries and general options.
Configuration File Structure
# Default logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
logging: INFO
# File library configuration
file:
# Root directory for playlist files
root: ~/playlists
# Root directory for music files
music_root: ~/Music
# iTunes library configuration
itunes:
# Path to iTunes Library XML file
xml: ~/Music/iTunes/iTunes Library.xml
# Root directory for music files
music_root: ~/Music/iTunes/iTunes Media/Music
# Plex library configuration
plex:
# Root directory for music files
music_root: /music
# Plex music section name (default is "Music")
section: Music
# Authentication options (use either username/password/server or baseurl/token)
username: your_username
password: your_password
server: your_server_name
# Alternative authentication
baseurl: http://plex-server:32400
token: your_plex_token
Usage
The songchro CLI tool provides commands to work with Apple Music, iTunes, Plex, and local file playlists.
General Options
Options that apply to all commands:
# Show help
songchro --help
# Show version
songchro --version
# Enable debug level logging
songchro --logging-level DEBUG [COMMAND]
# Enable info level logging
songchro --logging-level INFO [COMMAND]
# Use a specific config file
songchro --config /path/to/config.yml [COMMAND]
File Commands
# List file playlists
songchro file list
# Include list of song tracks in each playlist
songchro file list --songs
# Simplified output for using in pipelines
songchro file list --simple
# Filter by playlist kind (plain, folder, smart, all)
songchro file list --kind plain
# Update metadata for playlists in a subdirectory
songchro file update-meta [subdir]
# Migrate a playlist
songchro file migrate "My Playlist"
Apple Music Commands
# List Apple Music playlists
songchro apple list
# Include list of song tracks in each playlist
songchro apple list --songs
# Simplified output for using in pipelines
songchro apple list --simple
# Filter by playlist kind (plain, folder, smart, all)
songchro apple list --kind plain
# Export an Apple Music playlist to the local library
songchro apple export "My Playlist"
# Export with dry run (no changes)
songchro apple export "My Playlist" --dry-run
iTunes Commands
# List iTunes playlists
songchro itunes list
# Include list of song tracks in each playlist
songchro itunes list --songs
# Simplified output for using in pipelines
songchro itunes list --simple
# Filter by playlist kind (plain, folder, smart, all)
songchro itunes list --kind plain
# Export an iTunes playlist to the local library
songchro itunes export "My Playlist"
# Export with dry run (no changes)
songchro itunes export "My Playlist" --dry-run
# Export all iTunes playlists
songchro itunes export_all
# Export all with dry run (no changes)
songchro itunes export_all --dry-run
Plex Commands
Plex commands support an OTP code option at the group level:
# Use OTP code for Plex authentication (applies to all plex subcommands)
songchro plex --code "123456" [COMMAND]
# List Plex playlists
songchro plex list
# Include list of song tracks in each playlist
songchro plex list --songs
# Simplified output for using in pipelines
songchro plex list --simple
# Filter by playlist kind (plain, folder, smart, all)
songchro plex list --kind plain
# Export a Plex playlist to the local library
songchro plex export "My Playlist"
# Export with dry run (no changes)
songchro plex export "My Playlist" --dry-run
# Export all Plex playlists
songchro plex export_all
# Export all with dry run (no changes)
songchro plex export_all --dry-run
# Find tracks in Plex
songchro plex find --song-file "/path/to/song.json"
songchro plex find --title "Song Title" --artist "Artist Name"
songchro plex find --album "Album Name" --album-artist "Album Artist"
songchro plex find --filepath "/path/to/music/file.mp3"
# Import a playlist to Plex
songchro plex import "My Playlist"
# Import with dry run (no changes)
songchro plex import "My Playlist" --dry-run
Sync Playlists
# Synchronize playlists (defaults: file -> plex)
songchro sync "My Playlist"
# Specify source and destination types
songchro sync "My Playlist" --source-type plex --destination-type file
songchro sync "My Playlist" --from plex --to file
# Supported types: itunes, plex, file, apple_music
# Dry run (no changes)
songchro sync "My Playlist" --dry-run
# Use OTP code for Plex authentication
songchro sync "My Playlist" --code "123456"
Sync Plays
# Synchronize play counts
songchro sync-plays
# Dry run (no changes)
songchro sync-plays --dry-run
# Use OTP code for Plex authentication
songchro sync-plays --code "123456"
# Skip calling increase_plays
songchro sync-plays --skip-increase
Map Tracks
# Map tracks between platforms
songchro map-tracks
# Specify source and destination types
songchro map-tracks --from itunes --to plex
# Supported types: itunes, plex, file, apple_music
# Use OTP code for Plex authentication
songchro map-tracks --code "123456"
Shell Completion
# Generate shell completion script
songchro completion --shell bash
songchro completion --shell zsh
songchro completion --shell fish
Metadata
Release files for songchro 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| songchro-0.2.0.tar.gz | 20.1 kB | Without provenance | Details for songchro-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| songchro-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for songchro-0.2.0-py3-none-any.whl |
Total release size: 43.7 kB
Release files / songchro-0.2.0.tar.gz
| Download URL | songchro-0.2.0.tar.gz |
|---|---|
| Size | 20.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7be7d73dadd6606607dbc7a8bece11fa13f6fb233a89ee5f11f69b216244152f
|
|
BLAKE2b-256 checksum How to use checksums |
248fb969328934ca90c3c0086d4b1ff5b65abf586993f71ac4c135c9e694d8ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.13.18 Linux/7.0.0-38-generic
|
Release files / songchro-0.2.0-py3-none-any.whl
| Download URL | songchro-0.2.0-py3-none-any.whl |
|---|---|
| Size | 23.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9de37b47499be22fe0d01b54c46ea310abd368ef2956e256fa4a8a68008e466e
|
|
BLAKE2b-256 checksum How to use checksums |
adb0f45dec96015b4cade1ea71e10834421aacd29e957e2d21938f8587c06e4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.13.18 Linux/7.0.0-38-generic
|
Security for songchro 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.