docs: move definition listing to lisp.md.

This commit is contained in:
redxef 2024-12-17 23:33:36 +01:00
parent f7cbebdd9c
commit 3bba58d4ac
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921
2 changed files with 15 additions and 13 deletions

View file

@ -121,19 +121,6 @@ the items by name you could use the following program:
items) items)
``` ```
#### Available definitions
- **lower**: lowercases a string (`(eq (lower "SomeString") "somestring")`)
- **is-genre**: check if the item is of this genre, partial matches
allowed, the example filter would match the genre "Nu-Metal" (`(is-genre "metal" (genre-list))`)
- **is-genre-exact**: the same as `is-genre`, but does not match paritally
- **is-favorite**: matches a favorite item (`(is-favorite)`)
- **is-type**: matches the type of item look at
[BaseItemKind.cs](https://github.com/jellyfin/jellyfin/blob/master/Jellyfin.Data/Enums/BaseItemKind.cs)
for a list of items. The plugin has enabled support for `Audio, MusicAlbum, Playlist` (`(is-type "Audio")`)
- **log[diwe]**: write to the logger with the respective levels (`debug`, `information`, `warning`, `error`).
Takes the same arguments as `Logger.LogInformation(...)`.
### Filename ### Filename
The path to this file, only used internally and updated by the program. The path to this file, only used internally and updated by the program.

15
lisp.md
View file

@ -112,3 +112,18 @@ between `0` (inclusive) and `n` (exclusive). If two arguments are given
it gives a integer between `a` (inclusive) and `b` (exclusive). it gives a integer between `a` (inclusive) and `b` (exclusive).
**shuf**: same as **shuffle**. **shuf**: same as **shuffle**.
## Pre-defined convenience functions
- **lower**: lowercases a string (`(eq (lower "SomeString") "somestring")`)
- **is-genre**: check if the item is of this genre, partial matches
allowed, the example filter would match the genre "Nu-Metal" (`(is-genre "metal" (genre-list))`)
- **is-genre-exact**: the same as `is-genre`, but does not match paritally
- **is-favorite**: matches a favorite item (`(is-favorite)`)
- **is-type**: matches the type of item look at
[BaseItemKind.cs](https://github.com/jellyfin/jellyfin/blob/master/Jellyfin.Data/Enums/BaseItemKind.cs)
for a list of items. The plugin has enabled support for `Audio, MusicAlbum, Playlist` (`(is-type "Audio")`)
- **logd**, **logi**, **logw**, **loge**: write to the logger with the respective levels (`debug`, `information`, `warning`, `error`).
Takes the same arguments as `Logger.LogInformation(...)`.
And many more.