calliope.cli
¶
Calliope command line interface.
This module provides the public command line interface for Calliope.
Module Contents¶
Classes¶
Functions¶
|
|
|
Calliope is a set of tools for processing playlists. |
|
|
|
Show all albums in the collection of the given Bandcamp user. |
|
Export tracks on a Bandcamp album as a playlist. |
|
Show albums published by a band or label. |
|
Show all albums in the wishlist of the given Bandcamp user. |
|
|
|
Show all albums available locally.. |
|
Show artists stored in Beets database. |
|
Show tracks stored in Beets database. |
|
|
|
Convert to a different playlist format |
|
Export multiple playlists from a stream based on playlist.title. |
|
Import playlists from other formats |
|
|
|
Annotate playlist with tags from Last.fm |
|
Return similar artists for a given artist name. |
|
Return similar tracks for a given track. |
|
Return user's top artists. |
|
|
|
|
|
|
|
Export a histogram of listens. |
|
|
|
|
|
|
|
|
|
Export playlists from Listenbrainz. |
|
|
|
|
|
|
|
Export a histogram of listens. |
|
Export individual listens as a playlist |
|
|
|
|
|
Annotate playlists with data from Musicbrainz |
|
List all possible values for --include option. |
|
Resolve the 'image' property using the Cover Art API. |
|
Render a Calliope playlist to an audio file |
|
Select tracks from input playlist following a set of constraints. |
|
Shuffle a playlist or collection. |
|
|
|
Query Spotify authenticated user's playlists |
|
Upload one or more playlists to Spotify as authenticated user |
|
Add Spotify-specific information to tracks in a playlist. |
|
Return authenticated user's top artists. |
|
Information about the contents of a playlist |
|
|
|
Suggest tracks from a collection based on the given training inputs. |
|
Copy playlists & collections between devices |
|
|
|
Add images from the local media-art cache. |
|
Convert any 'artist' or 'album' type playlist items into 'track' items |
|
Show all albums available locally. |
|
Show all artists whose music is available locally. |
|
Show all tracks available locally. |
|
Resolve the 'location' field using Tracker, if possible. |
|
Resolve 'image' property using the local media-art cache. |
|
Search for tracks in the Tracker database matching 'text'. |
|
Query the top artists in a Tracker database |
|
Validate a Calliope playlist stream. |
|
|
|
Query user playlists from Youtube |
Attributes¶
- calliope.cli.DOC_URL = https://calliope-music.readthedocs.io/en/latest¶
- class calliope.cli.App(verbosity=logging.WARNING)¶
- calliope.cli.string_to_datetime(cal, string)¶
- calliope.cli.cli(context, verbosity)¶
Calliope is a set of tools for processing playlists.
- calliope.cli.bandcamp_cli(context, user)¶
- calliope.cli.cmd_bandcamp_collection(context)¶
Show all albums in the collection of the given Bandcamp user.
Uses internal Bandcamp API calls.
- calliope.cli.cmd_bandcamp_export_album(context, album_url)¶
Export tracks on a Bandcamp album as a playlist.
Uses web-scraping to get album ID and internal Bandcamp API calls to get the album info.
- calliope.cli.cmd_bandcamp_export_band(context, band_url, expand_albums)¶
Show albums published by a band or label.
Uses web-scraping to get the data, so results may be unreliable.
- calliope.cli.cmd_bandcamp_wishlist(context)¶
Show all albums in the wishlist of the given Bandcamp user.
Uses internal Bandcamp API calls.
- calliope.cli.beets_cli(context)¶
- calliope.cli.cmd_beets_albums(context, include_tracks, query)¶
Show all albums available locally..
- calliope.cli.cmd_beets_artists(context, query)¶
Show artists stored in Beets database.
- calliope.cli.cmd_beets_tracks(context, query)¶
Show tracks stored in Beets database.
- calliope.cli.cmd_diff(context, scope, playlist1, playlist2)¶
- calliope.cli.EXPORT_FORMATS = ['cue', 'm3u', 'jspf', 'xspf']¶
- calliope.cli.cmd_export(context, format_, title, playlist)¶
Convert to a different playlist format
- calliope.cli.cmd_export_split(context, format_, stream, output_path)¶
Export multiple playlists from a stream based on playlist.title.
- calliope.cli.cmd_import(context, playlist)¶
Import playlists from other formats
Supported formats:
pls: Common INI-based playlist format
xspf: The XML Shareable Playlist Format
jspf: JSON variant of xspf
- calliope.cli.lastfm_cli(context, user)¶
- calliope.cli.lastfm_annotate_tags(context, playlist)¶
Annotate playlist with tags from Last.fm
- calliope.cli.cmd_lastfm_similar_artists(context, count, artist)¶
Return similar artists for a given artist name.
- calliope.cli.cmd_lastfm_similar_tracks(context, count, artist, track)¶
Return similar tracks for a given track.
- calliope.cli.cmd_lastfm_top_artists(context, count, time_range, include)¶
Return user’s top artists.
- calliope.cli.lastfm_history_cli(context, sync, user, server, retry_on_error)¶
- calliope.cli.cmd_lastfm_history_annotate(context, playlist)¶
- calliope.cli.cmd_lastfm_history_artists(context, first_play_before, first_play_since, last_play_before, last_play_since, min_listens, show_listens_since)¶
- calliope.cli.cmd_lastfm_history_histogram(context, bucket)¶
Export a histogram of listens.
- calliope.cli.cmd_lastfm_history_listens(context)¶
- calliope.cli.cmd_lastfm_history_scrobbles(context)¶
- calliope.cli.cmd_lastfm_history_tracks(context, first_play_before, first_play_since, last_play_before, last_play_since, min_listens, show_listens_since)¶
- calliope.cli.listenbrainz_cli(context, user)¶
- calliope.cli.cmd_listenbrainz_export(context, kind)¶
Export playlists from Listenbrainz.
- calliope.cli.listenbrainz_history_cli(context, sync, user)¶
- calliope.cli.cmd_listenbrainz_history_annotate(context, playlist)¶
- calliope.cli.cmd_listenbrainz_history_artists(context, first_play_before, first_play_since, last_play_before, last_play_since, min_listens, show_listens_since)¶
- calliope.cli.cmd_listenbrainz_history_histogram(context, bucket)¶
Export a histogram of listens.
- calliope.cli.cmd_listenbrainz_history_listens(context)¶
Export individual listens as a playlist
- calliope.cli.cmd_listenbrainz_history_tracks(context, first_play_before, first_play_since, last_play_before, last_play_since, min_listens, show_listens_since)¶
- calliope.cli.musicbrainz_cli(context)¶
- calliope.cli.cmd_musicbrainz_annotate(context, playlist, output, include, update, interactive)¶
Annotate playlists with data from Musicbrainz
- calliope.cli.cmd_musicbrainz_list_includes(context)¶
List all possible values for –include option.
- calliope.cli.cmd_musicbrainz_resolve_image(context, playlist, max_size)¶
Resolve the ‘image’ property using the Cover Art API.
- calliope.cli.cmd_play(context, output, playlist)¶
Render a Calliope playlist to an audio file
- calliope.cli.cmd_select(context, constraints_list, playlist)¶
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
- calliope.cli.cmd_shuffle(context, count, playlist)¶
Shuffle a playlist or collection.
- calliope.cli.spotify_cli(context)¶
- calliope.cli.cmd_spotify_export(context, library)¶
Query Spotify authenticated user’s playlists
- calliope.cli.cmd_spotify_import(context, playlist, library)¶
Upload one or more playlists to Spotify as authenticated user
- calliope.cli.cmd_spotify_resolve(context, playlist, output, update, interactive)¶
Add Spotify-specific information to tracks in a playlist.
- calliope.cli.cmd_spotify_top_artists(context, count, time_range)¶
Return authenticated user’s top artists.
- calliope.cli.cmd_stat(context, size, playlist)¶
Information about the contents of a playlist
- calliope.cli.suggest_cli(context)¶
- calliope.cli.cmd_suggest_tracks(context, from_, count, training_input)¶
Suggest tracks from a collection based on the given training inputs.
- calliope.cli.cmd_sync(context, dry_run, target, allow_formats, album_per_dir, number_dirs, number_files, playlist)¶
Copy playlists & collections between devices
- calliope.cli.tracker_cli(context, http_endpoint)¶
- calliope.cli.cmd_tracker_annotate_images(context, playlist)¶
Add images from the local media-art cache.
- calliope.cli.cmd_tracker_expand_tracks(context, playlist)¶
Convert any ‘artist’ or ‘album’ type playlist items into ‘track’ items
- calliope.cli.cmd_tracker_albums(context, artist, include_tracks)¶
Show all albums available locally.
- calliope.cli.cmd_tracker_artists(context)¶
Show all artists whose music is available locally.
- calliope.cli.cmd_tracker_tracks(context)¶
Show all tracks available locally.
- calliope.cli.cmd_tracker_resolve_content(context, playlist)¶
Resolve the ‘location’ field using Tracker, if possible.
- calliope.cli.cmd_tracker_resolve_image(context, playlist)¶
Resolve ‘image’ property using the local media-art cache.
- calliope.cli.cmd_tracker_search(context, text)¶
Search for tracks in the Tracker database matching ‘text’.
Append ‘*’ to enable partial matching of a search term.
- calliope.cli.cmd_tracker_top_artists(context, count)¶
Query the top artists in a Tracker database
- calliope.cli.cmd_validate(context, playlist)¶
Validate a Calliope playlist stream.
- calliope.cli.youtube_cli(context, client_secrets)¶
- calliope.cli.cmd_youtube_export(context, username)¶
Query user playlists from Youtube