dsc#
dsc [OPTIONS] COMMAND [ARGS]...
Options
- -v, --verbose#
increases output verbosity / shows what DiscoDOS is doing under the hood (-v is INFO level, -vv is DEBUG level).
- -o, --offline#
Enabling this flag prevents DiscoDOS to check for connectivity to online services (Discogs, MusicBrainz) and forces offline mode. A lot of DiscoDOS’ functionality works well in on- and offline mode but might behave differently, depending on connection state.
- -t, --tui, -x, --no-tui#
Use a TUI (Textual framework) version if available. Currently only affects “dsc ls” command. Overrides “enable_tui” config option.
- --db <db_file>#
Override configured DiscoBASE file.
clean#
Clean up orphaned DiscoBASE entries.
dsc clean [OPTIONS] COMMAND [ARGS]...
releases#
Clean up the DiscoBASE release table.
Deletes entries in the release table if not used by any mix, sales listing or collection item anymore.
dsc clean releases [OPTIONS]
Options
- -r, --resume <OFFSET>#
Resumes at the given offset position (expects a number).
sales#
Clean up the DiscoBASE sales inventory.
Remove entries from the DiscoBASE sales inventory when they have been removed from the online Discogs Marketplace inventory.
dsc clean sales [OPTIONS]
Options
- -r, --resume <OFFSET>#
Resumes at the given offset position (expects a number).
import#
Imports a Discogs collection or adds further data to it.
All import commands can be re-run any time; the data will be updated. A typical workflow involves running them in this order:
For single item imports use:
For single item removals use:
To remove data in bulk refer to the “clean” command group.
dsc import [OPTIONS] COMMAND [ARGS]...
basic#
Initially imports Discogs release and user collection data.
A basic subset of the details of all releases in the user’s Discogs collection is imported into the DiscoBASE. Currently this includes artist, release title, catalog number, and the time of import.
Information about collection items is also stored. This includes folders, notes, added date and rating (not all is made use of in DiscoDOS yet).
Collection folder names are imported as a first step during an import run.
The basic import can be re-run any time. Existing releases data is updated. Note that releases are not deleted on re-runs because they might still be used by the sales or mixes features of DiscoDOS. If “orphaned” collection item’s are found, they are marked as such and won’t show up in views anymore (e.g dsc ls). Orphaned in that context means: Not in the user’s (online) collection anymore (e.g removed via the Discogs webinterface).
To manually remove releases from the DiscoBASE anyway, use dsc import release -d <release_id>. This is able to remove them from the offline collection, the (online) Discogs collection and purge any release data from the DiscoBASE.
dsc import basic [OPTIONS]
brainz#
Tries to match collection with MusicBrainz and add additional details.
Details are MusicBrainz album and recording ID’s and if available key and BPM from AcousticBrainz. Note that AcousticBrainz fetching might still work but is considered deprecated since the project has shutdown in 2022, and might be unavailable any time soon.
Usually this action takes a long time unless -q is passed, which tries to find a match quickly but with a smaller chance of success.
Only tracks already present in the DiscoBASE (using any of the import possibilites, eg. dsc mix -u, dsc import tracks, dsc search -u) will be updated.
To really update _all_ tracks in the collection a full run of “dsc import tracks” is required prior to using this command.
“dsc search all -z” is synonym to this option.
dsc import brainz [OPTIONS]
Options
- -q, --quick#
- -r, --resume, --offset <OFFSET>#
resumes the brainz matching process at the given offset position (expects a number). By default, tracks containing key and BPM already will be skipped. On a re-run using this option, the total number might be different already since the count of tracks without key and BPM might have changed.
- -f, --force-brainz#
on MusicBrainz updates (-z, -zz), also tracks containing key and BPM information in the DiscoBASE already, will tried to be matched and updated.
- -s, --skip-unmatched#
this option is useful on re-runs of MusicBrainz updates (-z, -zz) to speed up things a little. Only tracks that previosuly where matched with MusicBrainz successfully (have a MusicBrainz Recording ID already saved in the DiscoBASE), are tried to be matched and updated.
folders#
Imports collection folder names.
Note that folders names are updated implicitely during import basic and import tracks runs.
dsc import folders [OPTIONS]
listing#
Imports a single Marketplace listing or removes and deletes it.
dsc import listing [OPTIONS] LISTING_ID
Options
- -d, --delete#
Removes listing from Discogs Marketplace and deletes from DiscoBASE.
Arguments
- LISTING_ID#
Required argument
release#
Imports a single release.
Optionally imports tracks on the release or deletes a release entry entirely
Usually the release must be in the Discogs collection already but an alternative way for adding newly gained releases is using the -a option. The flag enables releases being added to the Discogs collection and additionally added to the local DiscoBASE.
dsc import release [OPTIONS] RELEASE_ID
Options
- -a, --add-to-collection#
The fastest way of adding newly gained releases to your collection. The given release ID is added to your Discogs collection (equal to clicking “Add to collection” on the Discogs webinterface) as well as added to the local DiscoBASE.
For performance’s sake though, we don’t do a time-consuming check whether or not the release is in the (online) collection via the Discogs API, we just do a quick check for the presence of the ID in the (local) DiscoBASE. This safes us a lot of time and is a good enough solution to prevent duplicates.
- -d, --delete#
Removes all instances of a release from the Discogs collection and deletes them from the DiscoBASE.
- -u, --tracks#
extends the Discogs import (also tracks will be imported). This is the same as “dsc search RELEASE_ID -u”.
Arguments
- RELEASE_ID#
Required argument
sales#
Imports the Marketplace inventory.
dsc import sales [OPTIONS]
Options
- -l, --light#
Light import is for subsequent quick updates: Only fetches sales status (For Sale, Expired, Sold, Pending)
tracks#
Imports tracks and if not yet available releases from Discogs collection
Is synonym to “dsc search all -u”
Takes a significant amount of time but is the basis for DiscoDOS’ features around “mixes management” and “brainz matching”.
dsc import tracks [OPTIONS]
Options
- -r, --resume, --offset <OFFSET>#
resumes the import at the given offset position (expects a number).
links#
Prints a list of releases and their corresponding links to online services.
Hyperlinks include Discogs release URL, MusicBrainz release URL and Discogs Marketplace listing ID (when listed for sale).
Supports key=value search terms.
dsc links [OPTIONS] SEARCH_TERMS
Options
- -o, --order-by <order_by>#
order by DiscoBASE field
Arguments
- SEARCH_TERMS#
Optional argument(s)
ls#
Searches and lists collection items.
Supports key=value search. Available keys can be either full DiscoBASE field names or abbreviations of those: id, cat, artist, title, collection, sold, listing, status, location, price, instance, folder, notes, mtime;
Standalone keywords are applied to fields artist, title and cat. A combination of key=value and standalone keywords is not supported.”
dsc ls [OPTIONS] SEARCH_TERMS
Options
- -o, --order-by <order_by>#
order by DiscoBASE field
- -r, --reverse#
reverse order
- -l, --limit <limit>#
limit results
- -a, -e, --all, --extra#
By default sales and collection items are displayed in a ‘combined’ view. That is, listing ID if applicable, is added to collection item’s respective column) with the caveat that non-collection items can’t be viewed that way. Enabling this option displays a separate entry for each sales listing/collection item, allowing to include sold items that were removed from the collection.
Arguments
- SEARCH_TERMS#
Optional argument(s)
mix#
Manages mixes.
Mixes essentially are ordered collections of tracks from a user’s collection. This subcommand creates, deletes, fills and alters them.
MIX_NAME is the name or the ID of the mix that should be handled. If left out, the list of existing mixes is displayed and all other arguments are ignored.
dsc mix [OPTIONS] MIX_NAME
Options
- -v, --verbose#
increases mix tracklist view detail. -v adds tracknames, artists, transition rating/notes and general track notes. -vv shows when and how MusicBrainz matching was done and also direct weblinks to Discogs releases, MusicBrainz releases/recordings and AccousticBrainz recordings.
- -f, --format <FORMAT>#
overrides the default output format for rendered tables. FORMAT is passed through to the underlying library (tabulate). Choose from: plain, simple, github, grid, fancy_grid, pipe, orgtbl, jira, presto, pretty psql, rst, mediawiki, moinmoin, youtrack, html, unsafehtml, latex, latex_raw latex_booktabs, latex_longtable, textile, tsv.
- -c, --create-mix#
creates new mix (named as given in mix_name argument).
- -D, --delete-mix#
deletes the mix MIX_NAME and all its contained tracks!
- -e, --edit <POSITION>#
edits/adds details of a track in a mix (editable fields: key, BPM, track number, position in mix, key notes, transition rating, transition notes, general track notes, custom MusicBrainz recording ID).
- -E, --edit-mix#
edits/adds general info about a mix (name, played date, venue).
- -b, --bulk-edit <FIELDS>#
bulk-edits specific fields of each track in mix. Syntax of FIELDS argument: <field1>,<field2>,… available fields: key,bpm,track_no,track_pos,key_notes,trans_rating, trans_notes,notes,m_rec_id_override.
- -a, --add-to-mix <SEARCH_TERMS>#
searches for release/track in collection and adds it to the mix, This option is actually a shortcut to “disco search -m mix_name search_term” and behaves identically. If SEARCH_TERMS is a number, it is assumed being a Discogs release ID. A quick database check is done and if non-existent yet, the release is 1) added to the Discogs collection and 2) imported to DiscoBASE. This is a convenience function eg when trying to quickly add a release to the mix that’s not in the DiscoBASE yet (possibly an only recently gained record?).
- -r, --reorder-tracks <POSITION>#
reorders tracks in current mix, starting at POSITION. Note that this is a troubleshooting function and usually shouldn’t be necessary to use.
- -d, --delete-track <POSITION>#
removes the track at the given position from the mix.
- --copy#
copies the mix given in mix_name argument. Asks for new name!
- -u, --discogs-update#
updates tracks in current mix with additional info from Discogs. Can be combined with -p when mix ID provided or with –resume when mix ID not provided (all tracks in mixes update).
- -z, --brainz-update#
updates tracks in current mix with additional info from MusicBrainz and AcousticBrainz. Leave out mix ID to update every track contained in any mix. -z quick match, -zz detailed match (takes longer, but more results). Can be combined with -p when mix ID provided or with –resume when mix ID not provided (all tracks in mixes *Brainz matching).
- -p, --pos <POSITION>#
in combination with -a this option adds the found release/track at the given position in the mix (rather than at the end). In combination with -u, -z or -zz the update process is started at the given position in the mix.
- --resume <OFFSET>#
resumes long-running processes at the given offset position (expects a number). You can combine this option currently with “all tracks in mixes Discogs update” (disco mix -u) or with “all tracks in mixes *Brainz matching” (disco mix -z, disco mix -zz).
- -s, --sort <COLUMN>#
sort tracklist by specified column. add “asc” or “desc” to specify ascending or descending sort order. “track_pos asc” is the default. Experimental feature: currently expects sql column names.
Arguments
- MIX_NAME#
Optional argument
search#
Searches collection and launches actions on found items.
Searches for releases and tracks in the Discogs collection. Several actions can be executed on the found items, eg. adding to a mix, updating track info from Discogs or fetching additional information from MusicBrainz/AcousticBrainz. View this subcommand’s help: disco search -h.
The collection is searched for SEARCH_TERMS. When offline, it searches through all releases’ artists/titles only (eg tracknames not considered). When online, the Discogs API search engine is used and also tracknames, artists, labels and catalog numbers are looked through. If your search term consists of multiple words, put them inside double quotes (eg. “foo bar term”). If you instead put a number as your search term, it is assumed you want to view exactly the Discogs release with the given ID. If search term is the special keyword “all”, a list of all releases in the DiscoBASE is shown (including weblinks to Discogs/MusicBrainz release pages). In combination with -u, -z or -zz respectively, all tracks are updated. Note that this is exactely the same as “disco import” in combination with those options.
dsc search [OPTIONS] SEARCH_TERMS
Options
- -t, --track <TRACK_NUMBER>#
In combination with -m this option adds the given track number (eg. A1, AA, B2, …) to the mix passed via -m; in combination with -z, -zz or -u the given track is the one being updated with *Brainz or Discogs details; in combination with -e the given track is the one being edited. The special keyword “all” can be used to process all tracks on the found release.
- -p, --pos <POS_IN_MIX>#
In combination with -m this option states that we’d like to insert the track at the given position (eg. 1, 14, …), rather than at the end of the mix; in combination with -z, -zz, -u or -e this option is ignored.
- --resume <OFFSET>#
Resumes long-running processes at the given offset position (expects a number). You can combine this option currently with *Brainz matching operations only (-z, -zz)
- -m, --mix <MIX_NAME>#
Adds a track of the found release to the given mix ID (asks which track to add in case -t is missing).
- -u, --discogs-update#
Updates found release/track with Discogs track/artist details (asks which track to update in case -t is missing).
- -z, --brainz-update#
Updates found release/track with additional info from MusicBrainz and AcousticBrainz. (asks which track to update in case -t is missing) -z quick match, -zz detailed match (takes longer, but more results).
- -e, --edit#
Edits/adds details to a found release/track. Editable fields: key, BPM, key notes, general track notes, custom MusicBrainz recording ID. (asks which track to edit in case -t is missing).
Arguments
- SEARCH_TERMS#
Required argument
sell#
List a record for sale on Discogs.
Lists the specified record for sale with details such as condition, price, status, and so on. Leave price empty to fetch a suggestion for the given record condition.
To specify a record, there are two ways: 1. Pass search terms, eg dsc sell my
search terms or 2. pass a release id, eg. dsc sell -i 123456
Some options have built-in defaults that apply when not given! To override them pass them explicitely. For example, use this to override the defaults draft, VG+, no offers allowed:
dsc sell -a forsale -c NM -o search terms
For some options, if omitted, you will be asked for interactively. Eg. the
-s/--sleeve-condition option.
dsc sell [OPTIONS] [QUERY]...
Options
- -e, --edit <listing_id>#
Edit an existing sales listing.
- -i, --id, --url <release_id>#
Omit search by passing a release ID or release URL with this option.
- -a, --status <status>#
Initial status of the listing.
- Default:
'draft'- Options:
draft | forsale | expired
- -c, --condition <condition>#
Condition of the record.
- Default:
'VG+'- Options:
M | NM | VG+ | VG | G+ | G | F | P
- -s, --sleeve-condition <sleeve_condition>#
Condition of the sleeve.
- Options:
M | NM | VG+ | VG | G+ | G | F | P | generic | notgraded | nocover
- -p, --price <price>#
Listing price for the record. Leave blank for suggested price.
- -l, --location <location>#
Location of the record in storage (e.g., shelf or bin label).
- -o, --allow-offers#
Allow buyers to make offers on this listing.
- Default:
False
- -m, --comments <comments>#
Public comments about the listing.
- -n, --private-comments <private_comments>#
Private comments about the listing.
Arguments
- QUERY#
Optional argument(s)
setup#
Sets up the DiscoBASE and handles database schema upgrades.
dsc setup [OPTIONS]
Options
- --force#
Force-upgrade the database schema - use with caution!
stats#
Displays statistics about the collection.
Besides showing stats like the size of the collection (on Discogs vs. in the DiscoBASE) also counts on existing mixes, how many tracks they contain and which additional metadata is present, are availalbe.
dsc stats [OPTIONS]
suggest#
Suggests tracks based on what you’ve played before,
fitting within a BPM range or sharing a musical key.
dsc suggest [OPTIONS] SEARCH_TERMS
Options
- -b, --bpm <BPM>#
suggests tracks based on BPM value, within a pitch-range of +/-6 percent.
- -k, --key <KEY>#
suggests tracks based on musical key.
- -p, --pitch-range <PITCH_RANGE>#
Pitch range in percent for BPM suggestions (default: 6).
Arguments
- SEARCH_TERMS#
Optional argument