forked from SimonTeixidor/davis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MANUAL.txt
154 lines (117 loc) · 3.99 KB
/
MANUAL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
davis(1)
# NAME
davis - a command line interface for MPD.
# SYNOPSIS
*davis* [--verbose] [--host <host>] <command> [<args>]
# DESCRIPTION
Davis is a command line interface for MPD.
# OPTIONS
\--help
Prints help information.
\-v, --verbose
Enable verbose output.
\-h, --host <host>
The MPD server to connect to, can be specified using IP/hostname, or a
label defined in the config file.
\-p, --plain
Disable decorations in output, useful for scripting.
# ENVIRONMENT VARIABLES
MPD_HOST
The MPD server to connect to. Can also be set with *--host*.
# DAVIS COMMANDS:
add <path>
Add items in path to queue.
albumart -o <output> [path]
Download album art from MPD to file specified by <output>. Davis will
fetch the album art for the track at [path] if specified, and the currently
playing track otherwise. If dash ('-') is specified as output, davis will
write the album art to stdout. MPD requires the cover file to be named
cover.jpg, cover.png, cover.tiff, or cover.bmp at the time of writing, this
is documented in the MPD protocol documentation:
https://mpd.readthedocs.io/en/latest/protocol.html#the-music-database
clear
Clear the current queue.
current
Display metadata about the currently playing song.
del <index>
Remove song at index from queue.
help
Prints a brief help text.
list <tag> [query]
List all values for tag, for songs matching query. See *QUERY*
for details on the query format.
load <path>
Load playlist at path to queue
ls [path]
List items in path, or the root if omitted.
mv <from> <to>
Move song in queue by index.
next
Skip to next song in queue.
pause
Pause playback.
play
Continue playback from current state.
play [index]
Start playback from index in queue.
prev
Go back to previous song in queue.
queue
Display the current queue.
read-comments <file>
Read raw metadata for file. The format will depend on the format of the
file.
search <query>
Search the MPD database for files matching query. See *QUERY* for details on
the format.
seek <position>
Seek to position. The position is expressed in [+-][[hh:]:mm]:ss format. If
+ or - is used, the seek is done relative to the current position.
status
Display MPD status.
stop
Stop playback.
toggle
Toggle between play/pause.
update
Update the MPD database.
# Plugins
Davis can be extended with external sub-commands. An external sub-command is
created by placing an executable file named `davis-$name` in one of the
following locations:
- `/etc/davis/bin/`
- `~/.config/davis/bin/`
- A directory in `$PATH`
An external command `davis-foo` is executed by calling `davis foo [args]`. Davis
will find the external sub command, and pass along any arguments. External sub
commands can read the `$MPD_HOST` environment variable to know which MPD server
davis is expected to speak to.
# QUERY
A query can either be a single argument in the MPD filter syntax, such as:
davis search '((artist == "Miles Davis") AND (album == "Kind Of Blue"))'
Or a list of arguments-pairs, each pair corresponding to a filter, such as:
davis search artist 'Miles Davis' album 'Kind Of Blue'
More information on the MPD filter syntax is available at:
https://mpd.readthedocs.io/en/latest/protocol.html#filters
# CONFIGURATION
Davis will read a configuration file from one of these locations:
- ~/.config/davis/davis.conf
- /etc/davis/davis.conf
The configuration file has two sections, tags and hosts. The tags section
configures which tags davis should display when running the "current" command.
The host section defines a list of MPD hosts for davis to connect to. Example
file:
```
[tags]
# The list of enabled tags
enabled=Composer,Work,Conductor,Ensemble,Performer,Label,Opus,RecordingDate,Rating,Genre,Location
# Change the label of "RecordingDate" to "Recording Date"
RecordingDate=Recording Date
\[hosts]
# Connect to localhost by default
default=127.0.0.1
# Connect to another host using label rpi with the --host option.
rpi=192.168.0.16
```
# AUTHORS
Simon Persson <[email protected]>