commit 767191f03127b4015067134b9b3074f3e8d28761
parent bb8d6330c84e9863c286eab715ac19773cf7076d
Author: Jacob R. Edwards <n/a>
Date: Sun, 11 Dec 2022 18:27:54 -0600
Rewrite the README
Diffstat:
M | README | | | 46 | ++++++++++++++++++++++++++++++++++------------ |
1 file changed, 34 insertions(+), 12 deletions(-)
diff --git a/README b/README
@@ -1,15 +1,37 @@
-ap -- audio player
+Audio Player (ap)
-The ap project consists of a server which manages a list and program.
-In other words, it manage an audio queue and audio player. The
-goal is to be simple to use and have a simple and concise implementation.
-Currently it's only simple to use.
+The backbone of the project is aps; the server. Despite it's name,
+aps does not play audio. It manages a list, a process, and, of
+course, it's clients. It's works like this: If there is no player
+process, execute the player program with the next list item as it's
+final argument. Here is an example of a conversation between a
+client (C>) and the server (S>) with comments after '#' explaining
+things:
-It being a server allows for using external utilities to find music,
-load playlists, or bind keys to various commands and the protocol
-is delimiter based, so humans can easily write directly to the
-server.
+ C> status # Send the status command.
+ S> running # The content of the response,
+ S> ok # then the status.
+ C> volume 100 # Another command.
+ S> error: Command not found # No body; an error status
-Since the name is 'audio player' you might think it plays audio,
-but no, as stated above it manages a list and program and therefor,
-once compiled, it only depends on your audio player of choice.
+The client is very powerful despite not knowing anything about the
+server besides how to communicate with it. This is partly because
+the server does so much heavy lifting, and partly because the client
+works well in conjunction with itself and other programs. Here are
+some examples of what it can do and how it's used:
+
+Add files from 'playlist' to the queue:
+
+ $ apc add ^ < playlist
+
+Keep only items which end in ogg or flac:
+
+ $ apc remove '/(ogg|flac)$/!'
+
+Change the player to ogg123(1):
+
+ $ apc player ogg123 -q
+
+Sort the queue:
+
+ $ apc list | sort | apc truncate ^