Skip to content

Commit

Permalink
Update documentation of command-line interface
Browse files Browse the repository at this point in the history
  • Loading branch information
airtower-luna committed Oct 29, 2022
1 parent 7c680d7 commit cbd8c4f
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,26 @@ client implementation of the low level protocol based on Python
asyncio. It is fully asynchronous, including using the async command
feature of the mpv interface, so commands can be interleaved.

Enjoy! :notes:

## Command-line interface

[`mpvasync.py`](mpvasync.py) can be used as a command line tool to:

* Toggle pause status
* Load files to play
* Show the playlist
* Get and set *any* mpv property by name (set only for writable
properties)
* Monitor mpv events

See `mpvasync.py -h` for details. You can install the package from
source using `pip install .`, which will give you the `mpvasync`
command.

## Python API

The Python API is very limited for now, you pass in command strings
(as defined in the mpv IPC documentation) and possibly arguments, and
get back the data structure returned by mpv, already parsed from
JSON. `mpvasync.MpvError` is raised if a command returns an error.

[`mpvasync.py`](mpvasync.py) can be used as a command line tool that
can toggle the pause status, and change or show the playlist. See
`mpvasync.py -h` for details.

Enjoy! :notes:

0 comments on commit cbd8c4f

Please sign in to comment.