Package: rolabesti
MotivationDescriptionRequirementsInstallationConfigurationUsageMotivationThe main motivation is to solve the scenario where some music fan, DJ, bartender, or melomaniac may face: ‘Considering these tons of mp3 files around, what music do I play?’. For instance, ‘what genre would I want to listen?’ and ‘which random songs can fill up the available time that I have?’ are the type of questions thatrolabestianswers.Descriptionrolabestiis a CLI application to manage a music library, performing the following actions on mp3 files: loading to database, parsing, searching, playing, enqueueing, copying, and tagging.RequirementsLinux platform.Python 3.7+. A virtual environment is highly recommended.MongoDB instance.vlc player.Installation$pipinstallrolabestiConfigurationThe default settings can be overriden in~/.config/rolabesti/rolabesti.conf. This configuration file has INI syntax with a unique section named[rolabesti].MUSIC_DIR: path where the mp3 files are located, default is~/Music.MAX_TRACK_LENGTH: maximum track length in minutes, corresponding to theMAXargument, default is10.MIN_TRACK_LENGTH: minimum track length in minutes, corresponding to theMINargument, default is0.MAX_TRACKLIST_LENGTH: maximum tracklist length in minutes, corresponding to theMAX_TRACKLIST_LENGTHargument -0denotes no tracklist length limit, default is60.SORTING: tracklist sorting by trackpath, corresponding to theSORTINGargument -  choices areasc(ascending),desc(descending) andrandom, default israndom.PLAYER: player to play and enqueue tracks, corresponding to thePLAYERargument -  choices areshell(play tracks directly in the shell) andvlc(play tracks in the vlc player, opening it if necessary), default isvlc.OVERLAP_LENGTH: when selectingshellplayer, overlap length in seconds of two consecutive tracks, corresponding to theOVERLAP_LENGTHargument -  minimum is0, maximum is30, default is3. The overlap length determines the period where the last seconds of the previous track and the first seconds of the next track are playing simultaneously.MONGO_HOST: MongoDB host, default islocalhost.MONGO_PORT: MongoDB port, default is27017.MONGO_DBNAME: MongoDB database name, default isrolabesti.MONGO_COLNAME: MongoDB collection name, default istracks.Before running the application, locating the mp3 files inMUSIC_DIRis enough. Besides, the searching results become more accurate when the track path has one of following patterns.MUSIC_DIR/Places/<place>/Genres/<genre>/Albums/<album>/[<side>/]<title>.mp3MUSIC_DIR/Places/<place>/Genres/<genre>/<artist>/<album>/[<side>/]<title>.mp3MUSIC_DIR/Places/<place>/Genres/<genre>/<artist>/<title>.mp3MUSIC_DIR/Places/<place>/Genres/<genre>/`<title>.mp3MUSIC_DIR/Places/<place>/Albums/<album>/[<side>/]<title>.mp3MUSIC_DIR/Places/<place>/<artist>/<album>/[<side>/]<title>.mp3MUSIC_DIR/Places/<place>/<artist>/<title>.mp3MUSIC_DIR/Places/<place>/<title>.mp3MUSIC_DIR/Genres/<genre>/Albums/<album>/[<side>/]<title>.mp3MUSIC_DIR/Genres/<genre>/<artist>/<album>/[<side>/]<title>.mp3MUSIC_DIR/Genres/<genre>/<artist>/<title>.mp3MUSIC_DIR/Genres/<genre>/<title>.mp3MUSIC_DIR/Artists/<artist>/<album>/[<side>/]<title>.mp3MUSIC_DIR/Artists/<artist>/<title>.mp3MUSIC_DIR/Albums/<album>/[<side>/]<title>.mp3MUSIC_DIR/[some/path/]<title>.mp3<place>,<genre>,<artist>,<album>,<side>and<title>are placeholders of any length and character. The square brackets denote optional.The database is loaded with tracks metadata running theloadsubcommand.$rolabestiloadWhen selectingvlcplayer, unique running instance configuration is recommended.Tools/Preferences/Interface/Playlist and InstancesAllow only one instance:checkedEnqueue items into playlist in one instance mode:checkedUsage$rolabesti[-h]SUBCOMMAND[ARGUMENTS]You can check the arguments for each subcommand with:$rolabestiSUBCOMMAND-hLet’s see a couple of examples.To play two hours of rock music, limiting the track length to 10 minutes, with random sorting:$rolabestiplay-grock-l120--max10-srandomTo play an hour of rap music from Iceland, skipping intro and outro tracks (less than 2 minutes length), with ascending sorting:$rolabestiplay-grap-l60-pIceland--min2-sasc