Newer
Older
Rolas
=====
Rolas is a simple database for music. It can mine a music folder for the
database, and it can also show and play the tracks and do queries on them.
Compiling and running it
------------------------
To compile `rolas` you need [`meson`](https://mesonbuild.com/) and
[`ninja`](https://ninja-build.org/) installed.
```
git clone https://aztlan.fciencias.unam.mx/gitlab/canek/rolas.git
cd rolas/
meson build/
ninja -C build/
```
The executable will be in `buid/rolas`, and you should be able to run it from
anywhere.
```
./bin/rolas
```
To run the tests you need to be in the project directory.
```
ninja -C build/ test
```
Grammar
-------
The grammar for the query language is shown here in
[Backus–Naur form](https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form):
```
<expr> ::= <match> | (<expr>) | <unaryop><expr> | <expr><binaryop><expr>
<field> ::= "title" | "titl" | "tit" | "ti" | "t" |
"artist" | "artis" | "arti" | "art" | "ar" | "a" |
<string> ::= [:alpha:]+ | "\""[^\"]+"\""
<unaryop> ::= "!"
<binaryop> ::= "&" | "|"
```
To avoid ambiguity, the binary operators associate to the left; in other words:
```
t:love & a:john | l:hits
```
is interpreted as:
```
(t:love & a:john) | l:hits