Command reference

cpe

Calliope is a set of tools for processing playlists.

cpe [OPTIONS] COMMAND [ARGS]...

Options

-v, --verbosity <verbosity>

bandcamp

Query Bandcamp

cpe bandcamp [OPTIONS] COMMAND [ARGS]...

Options

--user <user>

show data for the given Bandcamp user

collection

Show all albums in the collection of the given Bandcamp user.

cpe bandcamp collection [OPTIONS]

beets

Query the Beets media database

cpe beets [OPTIONS] COMMAND [ARGS]...

albums

Show all albums available locally..

cpe beets albums [OPTIONS] [QUERY]

Options

--include-tracks

List tracks for each album.

Arguments

QUERY

Optional argument

artists

Show artists stored in Beets database.

cpe beets artists [OPTIONS] [QUERY]

Arguments

QUERY

Optional argument

tracks

Show tracks stored in Beets database.

cpe beets tracks [OPTIONS] [QUERY]

Arguments

QUERY

Optional argument

diff

Compare multiple collections

cpe diff [OPTIONS] PLAYLIST1 PLAYLIST2

Options

--scope <scope>
Options

creator | album | song | track

Arguments

PLAYLIST1

Required argument

PLAYLIST2

Required argument

export

Convert to a different playlist format

cpe export [OPTIONS] PLAYLIST

Options

-f, --format <format_>
Options

cue | m3u | jspf | xspf

-t, --title <title>

Set title of playlist

Arguments

PLAYLIST

Required argument

export-split

Export multiple playlists from a stream based on playlist.title.

cpe export-split [OPTIONS] STREAM OUTPUT_PATH

Options

-f, --format <format_>
Options

cue | m3u | jspf | xspf

Arguments

STREAM

Required argument

OUTPUT_PATH

Required argument

import

Import playlists from other formats

Supported formats:

  • pls: Common INI-based playlist format

  • xspf: The XML Shareable Playlist Format

  • jspf: JSON variant of xspf

cpe import [OPTIONS] PLAYLIST

Arguments

PLAYLIST

Required argument

lastfm

Interface to the Last.fm music database

cpe lastfm [OPTIONS] COMMAND [ARGS]...

Options

--user <NAME>

show data for the given Last.fm user

annotate-tags

Annotate playlist with tags from Last.fm

cpe lastfm annotate-tags [OPTIONS] PLAYLIST

Arguments

PLAYLIST

Required argument

similar-artists

Return similar artists for a given artist name.

cpe lastfm similar-artists [OPTIONS] ARTIST

Options

-c, --count <count>

Maximum number of artists to return

Arguments

ARTIST

Required argument

similar-tracks

Return similar tracks for a given track.

cpe lastfm similar-tracks [OPTIONS] ARTIST TRACK

Options

-c, --count <count>

Maximum number of tracks to return

Arguments

ARTIST

Required argument

TRACK

Required argument

top-artists

Return user’s top artists.

cpe lastfm top-artists [OPTIONS]

Options

-c, --count <count>

Maximum number of artists to return

--time-range <time_range>
Options

overall | 7day | 1month | 3month | 6month | 12month

-i, --include <include>
Options

images

lastfm-history

Scrape and query user’s LastFM listening history

cpe lastfm-history [OPTIONS] COMMAND [ARGS]...

Options

--sync, --no-sync

update the local copy of the LastFM history

--user <NAME>

show data for the given Last.fm user

--server <server>

Server to fetch track info from, default is last.fm

--retry-on-error, --no-retry-on-error

try again if a network error occurs.

annotate

Annotate a playlist with lastfm listening stats for a user

cpe lastfm-history annotate [OPTIONS] PLAYLIST

Arguments

PLAYLIST

Required argument

artists

Query artists from the listening history

cpe lastfm-history artists [OPTIONS]

Options

--first-play-before <DATE>

show artists that were first played before DATE

--first-play-since <DATE>

show artists that were first played on or after DATE

--last-play-before <DATE>

show artists that were last played before DATE

--last-play-since <DATE>

show artists that were last played on or after DATE

--min-listens <N>

show only artists that were played N times

--show-listens-since <DATE>

query the number of listens since the given date

scrobbles

Export individual scrobbles as a playlist

cpe lastfm-history scrobbles [OPTIONS]

tracks

Query tracks from the listening history

cpe lastfm-history tracks [OPTIONS]

Options

--first-play-before <DATE>

show tracks that were first played before DATE

--first-play-since <DATE>

show tracks that were first played on or after DATE

--last-play-before <DATE>

show tracks that were last played before DATE

--last-play-since <DATE>

show tracks that were last played on or after DATE

--min-listens <N>

show only tracks that were played N times

--show-listens-since <DATE>

query the number of listens since the given date

musicbrainz

Query data from Musicbrainz

cpe musicbrainz [OPTIONS] COMMAND [ARGS]...

annotate

Annotate playlists with data from Musicbrainz

cpe musicbrainz annotate [OPTIONS] PLAYLIST

Options

--output <output>
-i, --include <include>
Options

areas | release | urls

--update, --no-update

Overwrite track metadata

--interactive, --no-interactive

Prompt for user input if no perfect matches are found

Arguments

PLAYLIST

Required argument

resolve-image

Resolve the ‘image’ property using the Cover Art API.

cpe musicbrainz resolve-image [OPTIONS] PLAYLIST

Options

-s, --max-size <max_size>

set a size limit in pixels for the returned image

Options

250 | 500 | none

Arguments

PLAYLIST

Required argument

play

Render a Calliope playlist to an audio file

cpe play [OPTIONS] PLAYLIST

Options

-o, --output <output>

Required

Arguments

PLAYLIST

Required argument

select

Select tracks from input playlist following a set of constraints.

Each constraint is defined by a key/value string. Here are some examples:

* –constraint=type:playlist-duration,vmin:60m,vmax:120m
* –constraint=type:fraction-global,prop:tags,values:rock;punk,fraction:0.5
cpe select [OPTIONS] PLAYLIST

Options

--constraint <constraints_list>

A single constraint.

Arguments

PLAYLIST

Required argument

shuffle

Shuffle a playlist or collection.

cpe shuffle [OPTIONS] PLAYLIST

Options

-c, --count <count>

number of songs to output

Arguments

PLAYLIST

Required argument

spotify

Interface to the Spotify online streaming service

cpe spotify [OPTIONS] COMMAND [ARGS]...

export

Query Spotify authenticated user’s playlists

cpe spotify export [OPTIONS]

Options

--library <library>

Export user library items

Options

track | album | artist

import

Upload one or more playlists to Spotify as authenticated user

cpe spotify import [OPTIONS] PLAYLIST

Options

--library, --no-library

Add items to library

Arguments

PLAYLIST

Required argument

resolve

Add Spotify-specific information to tracks in a playlist.

cpe spotify resolve [OPTIONS] PLAYLIST

Options

--output <output>
--update, --no-update

Overwrite track metadata

--interactive, --no-interactive

Prompt for user input if no perfect matches are found

Arguments

PLAYLIST

Required argument

top-artists

Return authenticated user’s top artists.

cpe spotify top-artists [OPTIONS]

Options

-c, --count <count>

Maximum number of artists to return

--time-range <time_range>
Options

short_term | medium_term | long_term

stat

Information about the contents of a playlist

cpe stat [OPTIONS] PLAYLIST

Options

-s, --size

show the total size on disk of the playlist contents

Arguments

PLAYLIST

Required argument

suggest

Suggest items or annotations

cpe suggest [OPTIONS] COMMAND [ARGS]...

tracks

Suggest tracks from a collection based on the given training inputs.

cpe suggest tracks [OPTIONS]

Options

--from <from_>

Required playlist from which tracks should be suggested

--count <count>

number of track suggestions to generate

--training-input <training_input>

a playlist used to train the recommender. A training input requires two arguments, the first is the path to the file, the second is how it should weight the training. Weight should be a value between -1.0 and 1.0, where 1.0 is the most positive weighting and -1.0 the most negative.

sync

Copy playlists & collections between devices

cpe sync [OPTIONS] PLAYLIST

Options

--dry-run

don’t execute commands, only print what would be done

-t, --target <target>

Required path to target device’s filesystem

-f, --allow-formats <allow_formats>

specify formats that the target device can read; transcoding can be done if needed.

Options

all | mp3

--album-per-dir

organise the files on the target device so each album is in its own directory

--number-dirs

ensure directory sort order matches desired playback order

--number-files

ensure filename sort order matches desired playback order

Arguments

PLAYLIST

Required argument

tracker

Query the Tracker media database

cpe tracker [OPTIONS] COMMAND [ARGS]...

albums

Show all albums available locally.

cpe tracker albums [OPTIONS]

Options

--artist <artist>

Limit to albums by the given artist

--include-tracks

List tracks for each album.

annotate-images

Add images from the local media-art cache.

cpe tracker annotate-images [OPTIONS] PLAYLIST

Arguments

PLAYLIST

Required argument

artists

Show all artists whose music is available locally.

cpe tracker artists [OPTIONS]

expand-tracks

Convert any ‘artist’ or ‘album’ type playlist items into ‘track’ items

cpe tracker expand-tracks [OPTIONS] PLAYLIST

Arguments

PLAYLIST

Required argument

resolve-content

Resolve the ‘location’ field using Tracker, if possible.

cpe tracker resolve-content [OPTIONS] PLAYLIST

Arguments

PLAYLIST

Required argument

resolve-image

Resolve ‘image’ property using the local media-art cache.

cpe tracker resolve-image [OPTIONS] PLAYLIST

Arguments

PLAYLIST

Required argument

top-artists

Query the top artists in a Tracker database

cpe tracker top-artists [OPTIONS]

Options

-c, --count <count>

Maximum number of artists to return

tracks

Show all tracks available locally.

cpe tracker tracks [OPTIONS]

validate

Validate a Calliope playlist stream.

cpe validate [OPTIONS] PLAYLIST

Arguments

PLAYLIST

Required argument

youtube

Interface to the Youtube online streaming service

cpe youtube [OPTIONS] COMMAND [ARGS]...

Options

--client-secrets <client_secrets>

Credentials file from Google developer console

export

Query user playlists from Youtube

cpe youtube export [OPTIONS] USERNAME

Arguments

USERNAME

Required argument