Package: scrobble
ScrobbleA little very unofficial Python CLI tool to scrobble music to Last.fm.NoteSuper early, under active development, and so forth.BackgroundIt started as a tool to scrobble CD tracklists using barcodes, and that's what it does today, but there are plans for it to do more.Inspired byCodeScrobbleandOpen Scrobbler.FeaturesScrobble a CD's tracklist using its barcode.Supports multi disc releases.Uses MusicBrainz as the source of CD and track metadata.Accepts an optionalPLAYBACKENDargument in natural language if you want to scrobble a CD you listened to a while ago. e.g.,scrobble 016861828257 '2 hours ago'.A--dryrunoption if you just want to see a tracklist without sending anything to your last.fm account.A--notifyoption if you want to get a Pushover.net notification. Requires a Pushover app API token and a user key.If the barcode matches more than one release, the tool will ask you to choose. This matters because sometimes the tracklist is different (how releases that different end up with the same barcode is... pfff I don't know). If you want to yolo it, you can pass--no-choiceand have the tool pick the first match.A--track-choiceoption that lets you choose a subset of tracks to scrobble. Requirescharmbracelet/gumfor now.Installationpip3installscrobbleorgitclonehttps://github.com/sheriferson/scrobblecdscrobble
pip3install.If you want to use the--track-choiceoption, you'll also needgum. Seeherefor details and Installation instructions. If you have Homebrew it's a simple:brew install gumConfigurationOkay you need to do some configuration before this will do anything useful for you. Some configurations are required (last.fm) and others are optional (Pushover).You need toget a last.fm API account. It's easy and immediate. Once you have a key and a secret, put them in~/.config/scrobble.toml:Below is the mininum required configuration for this tool to work.[lastfmapi]api_key='<your-api-key>'api_secret='<your-api-secret>'username='<optional-username-for-url-in-pushover-notification>'The first time you try to scrobble something, the app will ask you to give it permission to connect to your last.fm account, so you will need access to the machine's screen/browser. Once this is done, it will save a session key in~/.lastfm_session_key, and shouldn't need to ask for permission again.If you want this tool to run on a remote/headless server, you can run the tool once on your local machine, then copy~/.config/.lastfm_session_keyover your remote host.If you plan on using--notifyto get notifications when scrobbling is complete, you need to provide a Pushover API token and user key as well:[pushoverapi]token='<your-pushover-app-token>'user='<your-user-key>'Usagescrobble--helpUsage:scrobble[OPTIONS]COMMAND[ARGS]...

╭─Options────────────────────────────────────────────────────────────────────────────╮
│--install-completionInstallcompletionforthecurrentshell.│
│--show-completionShowcompletionforthecurrentshell,tocopyitor│
│customizetheinstallation.│
│--helpShowthismessageandexit.│
╰──────────────────────────────────────────────────────────────────────────────────────╯
╭─Commands───────────────────────────────────────────────────────────────────────────╮
│cd│
│discogs│
│musicbrainz│
╰──────────────────────────────────────────────────────────────────────────────────────╯scrobblecd--helpUsage:scrobblecd[OPTIONS]BARCODE[PLAYBACKEND]╭─Arguments───────────────────────────────────────────────────────────────────────────╮
│*barcodeTEXTBarcode(asanumber)oftheCDyouwantto│
│scrobble,orapathtoanimageofabarcode.│
│Doublealbumreleasesaresupported.│
│[default:None]│
│[required]│
│playback_end[PLAYBACK_END]Whendidyoufinishlistening?e.g.,'now'or│
│'1 hour ago'.│
│[default:now]│
╰───────────────────────────────────────────────────────────────────────────────────────╯
╭─Options─────────────────────────────────────────────────────────────────────────────╮
│--dryrun--no-dryrun--dryrunwillprintalistoftracks│
│withoutscrobblingtoLast.fm│
│[default:no-dryrun]│
│--verbose--no-verbose--verbosewillprintabunchofstuffto│
│yourterminal.│
│[default:no-verbose]│
│--notify--no-notify--notifywillsendapushnotification│
│viaPushoverwithCDinformation.│
│[default:no-notify]│
│--release-choice--no-release-choice--release-choicewillgiveyoualistof│
│optionsofmorethanoneCDismatched.│
│Otherwise,theappwillgowiththe│
│firstmatch.│
│[default:release-choice]│
│--track-choice--no-track-choice--track-choicewillgiveyoualistof│
│tracksinthereleasetochooseto│
│scrobbleinsteadofscrobblingthe│
│entirerelease.│
│[default:no-track-choice]│
│--helpShowthismessageandexit.│
╰───────────────────────────────────────────────────────────────────────────────────────╯Examples# list album info and tracks from Rammstein's Herzeleid without actually scrobbling$scrobblecd--dryrun--verbose031452916021💿Rammstein-Herzeleid(1996)🎵1WolltihrdasBettinFlammensehen?
🎵2DerMeister
🎵3WeißesFleisch
🎵4AschezuAsche
🎵5Seemann
🎵6Duriechstsogut
🎵7DasalteLeid
🎵8Heiratemich
🎵9Herzeleid
🎵10Laichzeit
🎵11Rammstein
⚠️Dryrun-notrackswerescrobbled.# provide a path to a an image with a barcode instead of the barcode value itselfscrobblecd--dryrun--verbose--no-release-choice'tests/resources/CD1-600.jpeg'💿MFDOOM-MM..FOOD(2017)🎵1BeefRapp
🎵2HoeCakes
🎵3Potholderz
🎵4OneBeer
🎵5DeepFriedFrenz
🎵6Poo‐PuttPlatter
🎵7Fillet‐O‐Rapper
🎵8Gumbo
🎵9FigLeafBi‐Carbonate
🎵10KonKarne
🎵11Guinesses
🎵12KonQueso
🎵13RappSnitchKnishes
🎵14Vomitspit
🎵15Kookies
🎵1MM..FOODDriveTour
⚠️Dryrun-notrackswerescrobbled.# scrobble Nymphetamine by Cradle of Filth which you finished# listening to two hours ago$scrobblecd016861828257'2 hours ago'# scrobble Comalies by Lacuna Coil# the barcode matches multiple releases, so you're offered options$scrobblecd727701816029Morethanonereleasematchesbarcode727701816029.1.Comalies,1disc,13tracks,releasedin2002.2.Comalies,2discs,22tracks,releasedin2004.3.Comalies,1disc,13tracks,releasedin2002.

Whichreleasedoyouwanttoscrobble?[1/2/3](1):
...# as you can see, sometimes there are duplicates# differentiation between them isn't handled very well right now# scrobble Fight Club: Original Motion Picture Score# barcode matches multiple releases, but  don't ask me to choose a release,# just pick the first one and send a notification using# pushover.net (requires extra configuration)$scrobblecd--no-choice--notify018777371520MissingDocs.Other features.More tests.