From b24ce9cc3fe802ff4ab6bfbf1170acf1a6221b5f Mon Sep 17 00:00:00 2001 From: Kubat <mael.martin31@gmail.com> Date: Mon, 28 Dec 2020 17:54:51 +0100 Subject: [PATCH] DOC: Update the new manpage for the new lkt command with implicit types in queries --- man/lkt.template | 75 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 22 deletions(-) diff --git a/man/lkt.template b/man/lkt.template index 3ae343ed..78cd7427 100644 --- a/man/lkt.template +++ b/man/lkt.template @@ -1,8 +1,11 @@ +.\" vim: ft=groff .TH "LKT" "1" "___DATE___" "LEKTOR MK 7" .SH "NAME" + lkt \- the lektor command line client + .SH "OVERVIEW" \fBlkt\fP is the \fBlektord\fP client, much like \fBmpc\fP but with more functionnalities like \fIplaylists\fP and \fIstickers\fP management. @@ -12,17 +15,10 @@ distinguished from others commands. Thus, it is possible to use the string \fIadm\fP as an alias for \fIadmin\fP. This is like cisco switch command line interface. .PP -You may be interested in other related programs like: -.PP -.PD 0 -.TP -\fIlektord\fP The lektor daemon -.TP -.PD + .SH "COMMANDS" Here are the \fBlkt\fP commands: - .PP \fIBASE-COMMANDS\fP .PP @@ -204,6 +200,7 @@ the filesystem Prints to \fIstdout\fP the default configuration file .PP + .SH "OPTIONS" Options can be passed to \fBlkt\fP before specifying the command in a \fIoption=value\fP format. This is done this way to allow one to make @@ -226,37 +223,71 @@ The password to use for commands that require authentification. This is the case of most of the \fIadmin\fP commands .PP + .SH "QUERIES" -Queries are a way of listing karas in the database. They are composed of a -type and the next of the line is the SQL regex that the kara must verify. -In SQL regexes, the wildcard is the "%" character and the jocker the -character "_". Queries are case insensitive. -.PP +Queries are a way of listing karas in the database. They are composed of an +optional type (see when it is not optional) and the next of the line is the SQL +regex that the kara must verify. In SQL regexes, the wildcard is the "%" +character and the jocker the character "_". Queries are case insensitive (in +most cases). + +.IP \[bu] 2 Valid types for a query are the following: \fIid\fP, \fIlang\fP, \fItype\fP, \fIcategory\fP, \fIauthor\fP, \fIquery\fP and \fIplaylist\fP. -.PP +.IP \[bu] For the type \fItype\fP, the valid values are the following: \fIOP\fP, -\fIED\fP, \fIIS\fP, \fIAMV\fP, \fIVOCA\fP, \fIMV\fP, \fIPV\fP and \fILIVE\fP. -.PP +\fIED\fP, \fIIS\fP, \fIAMV\fP, \fIMV\fP, \fIPV\fP and \fILIVE\fP. +.IP \[bu] For the type \fIlang\fP, the valid values are the following: \fIjp\fP, -\fIfr\fP, \fIsp\fP, \fIen\fP, \fIlatin\fP, \fIit\fP, \fIru\fP, \fImulti\fP -and \fIundefined\fP. +\fIfr\fP, \fIsp\fP, \fIen\fP, \fIlatin\fP, \fIit\fP, \fIru\fP, \fImulti\fP and +\fIundefined\fP. +.IP \[bu] +For the \fIcategory\fP type, the valid values are the following: \fIvo\fP, +\fIva\fP, \fIcdg\fP, \fIamv\fP, \fIvocaloid\fP and \fIautres\fP. + .PP -For the \fIcategory\fP type, the valid values are the following: -\fIvo\fP, \fIva\fP, \fIcdg\fP, \fIamv\fP, \fIvocaloid\fP and \fIautres\fP. +For the following types of queries, the type part is optional: \fIid\fP, +\fItype\fP, \fIlang\fP, \fIcategory\fP. The other optional type is the +\fIquery\fP type, be carefull with that type of query! The optional type of +queries are recognise as such when reding the regex part: + +.IP \[bu] 2 +\fI'type'\fP: If the regex is all in upper case, it will be treated as a +\fItype\fP of kara, if the \fItype\fP is invalid \fBlkt\fP will return an +error. This means that you can't do any other queries with only upper case +characters. +.IP \[bu] +\fI'id'\fP: If the regex is a number, it will be treated as an \fIid\fP. This +means that you can't search the database with a unique number as a \fIquery\fP +but it should not be a problem. +.IP \[bu] +\fI'lang'\fP and \fI'category'\fP: If the regex is in lower case and matches a +\fIlang\fP or a \fIcategory\fP, the type will be infered. +.IP \[bu] +\fI'query'\fP: If no other type is infered and no type is recognised (the query +does not begin by \fIauthor\fP, \fIplaylist\fP), then all the regex is +considered to be a \fIquery\fP. + .PP Here are some examples of queries: .PP .PD 0 .TP .PD -\fBtype OP\fP +\fBtype OP\fP / \fBOP\fP Select karas that are openings .TP +\fB6000\fP +Select the kara with the id 6000 +.TP \fBauthor kubat\fP -Select karas where the author is "kubat" +Select karas where the author is "kubat" or "Kubat" or etc +.TP +\fBtonari%no%totoro\fP +Select karas that match the query "%tonari%no%totoro%" .PP + .SH "EXAMPLES" Valid invocations of the \fBlkt\fP command are the following: .PP -- GitLab