Skip to main content

A Python library to control the MOC (music on console) audio player

Project description

Install

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

Optional Installs

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]"

Usage

In [1]: import moc

In [2]: moc.find_and_play('~/music-dir/blah*')

In [3]: moc.go('12:15')         # jump to particular point in current track

In [4]: moc.go('1h23m12s')      # jump to particular point in current track

In [5]: moc.go(500)             # jump to particular point in current track

In [6]: moc.info_string()
Out[6]: '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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mocp-0.4.9-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file mocp-0.4.9-py3-none-any.whl.

File metadata

  • Download URL: mocp-0.4.9-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for mocp-0.4.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e2eb2fcf72277b28d570163de912444e61e630b7fc1fd7da8f6d195f081417a6
MD5 df10d3732ec12554bf2efbd8de956c9c
BLAKE2b-256 1330c7e85ceed2390b4adf82e27458d83db6420c93661cdde9e4cb70a7025bc2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page