A Python library to control the MOC (music on console) audio player
Install the actual MOC player/server
% sudo apt-get install -y moc or % brew install moc
Then install this package with pip
% pip3 install mocp
redis-helper and yt-helper
If redis-helper and yt-helper are installed, the FILES collection will be updated with the basename of the the current playing file whenever moc.info_string() is called
Install with pip
% pip3 install "yt-helper[redis-helper]" or % pip3 install "mocp[extras]"
In : import moc In : moc.find_and_play('~/music-dir/blah*') In : moc.go('12:15') # jump to particular point in current track In : moc.go('1h23m12s') # jump to particular point in current track In : moc.go(500) # jump to particular point in current track In : moc.info_string() Out: '08:21 (501) of 95:35 into /home/user/music-dir/blah-thing/file.mp3'
Getting the C source
MOC is written is written in C and hosted in an SVN repo (not Git). See man git-svn
$ git svn clone svn://svn.daper.net/moc/trunk moc
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.