diff --git a/man/lektor.template b/man/lektor.template index 6047c1815a897967bd5499cef7c96f2ad946c569..511fda3a77590c1e2996a20dbe70719b6eef0e14 100644 --- a/man/lektor.template +++ b/man/lektor.template @@ -1,6 +1,8 @@ .TH "LEKTOR" "1" "___DATE___" "LEKTOR MK 7" .SH "NAME" + lektor \- the lektor karaoke player + .SH "OVERVIEW" Lektor is a collection of pragram, a daemon a client and an administrator used to play karaoker from the bakabase. @@ -11,10 +13,9 @@ You may be interested in other related programs like: .TP \fIlektord\fP The lektor daemon .TP -\fIlktadm\fP Administration of lektor from a separate executable -.TP \fIlkt\fP A standard client for lektord .PD + .SH "DESCRIPTION" lektor is a replacement of old bash scripts present on \fISakura\fP (now \fIShinSakura\fP). It allows interaction from the network with a \fIMPD\fP @@ -42,12 +43,13 @@ You may install lektor from source like this: \fB % git clone https://git.iiens.net/martin2018/lektor && cd lektor % sudo mkdir /home/kara && sudo chown USER:USER /home/kara -% meson build -% ninja -C build && sudo ninja -C build install -% sudo chown USER:USER /home/kara/kara.db +% mkdir build && cd build && ../configure --enable-static-modules +% make && make install +% lkt adm conf > ~/.config/lektor/lektor.ini .fi \fR .P .RE + .SH "SUPPORTED URIS" When searching the database, the following URIs are supported by lektor. Those URIs are hidden, you should not use them, but here is some documentation about @@ -99,22 +101,32 @@ The supported categories in lektor are: \fBvo\fP, \fBva\fP, \fBcdg\fP, \fBamv\fP, \fBvocaloid\fP and \fBautres\fP. .SH "MODULES AN CLIENT API" -To create a module, the only real thing to do is to define a function with the -following prototype: \fBint(*)(void *arg, struct lkt_state *srv, -void *dl_handle)\fP. On the creation, the \fBvoid *\fP pointer is a piece of -data given by \fIlektord\fP and depends on the context. The modules are -created in the mail thread, if they need to, they should create a new thread -and do their job here. For a module to be loadable, they should need only -two settings in the \fIini\fP file: the \fIpath\fP to the generated \fI.so\fP -file that should be linked against the \fIlektor\fP library and the -\fIload_function\fP function of the prototype given before (a given module -file can have multiple init functions and thus can be used in different modules -of different types). +Modules are \fB.so\fP files (i.e. dynamic libraries) loaded by lektors using a +function named \fBmodule_set_function\fP which takes a \fBvoid *\fP and a +\fBstruct lkt_option *\fP in argument and must return an \fBint\fP (may return +an \fBuint16_t\fP in the future). This function must initialize correctly the +module. The name of this function can be defined in the \fBlektor.ini\fP file. -Here, the \fBsrv\fP should not be modified. The module can freely call -functions on the \fBsqlite3\fP database, and should modify the srv only -by calling functions from the \fBlektor/commands.h\fP file. Modules can read -any piece of information of the server. +The functions of a modules are stored in a \fBregister\fP. This register can be +registered in the lektor's global \fBregister\fP or exported inside \fB.so\fP file. +Only one `register` can be exported by \fB.so\fP file. The macros are here to help +you do so. + +Some functions are mendatory for a module: + +- The \fBnew(void **)\fP function creates the module +- The \fBfree(void **)\fP release the module, it \fIcan't\fP be used after +- The \fBclose(void **)\fP close the module, it \fIcan\fP be used after + +All exported functions must take a \fBva_list\fP. The first argument of the +\fBva_list\fP is a \fBvoid **\fP, which point to the pointer used to access the +module's defined structure. The rest is up to you, no checks will be done. All +functions must return an \fBint\fP in a POSIX way: \fB0\fP if everything is ok, +an other value if something went wrong. + +.SH "MPD - Music Player Daemon" +Lektor is almost MPD compatible, at least it uses the same protocol, which can +be gotten here: \fBhttps://www.musicpd.org/doc/html/protocol.html#\fP. .SH "AUTHOR AND AVAILABILITY" Lektor is a karaoke player for POSIX compliant systems (i.e. not MS-Windows) @@ -136,4 +148,6 @@ about lektor. \fBhttps://kurisu.iiens.net\fP The depo site for the karaoke base .TP \fBhttps://manga.iiens.net\fP The home website for the Bakaclub +.TP +\fBirc.iiens.net:7000/#manga\fP The irc channel .PD diff --git a/man/lektord.template b/man/lektord.template index c9239f672198b261345e95bb9ab45ca61397b584..920fb09e66d05a5895ad380c9b0d03df21247057 100644 --- a/man/lektord.template +++ b/man/lektord.template @@ -1,6 +1,8 @@ .TH "LEKTORD" "1" "___DATE___" "LEKTOR MK 7" .SH "NAME" + lektord \- the lektor daemon + .SH "OVERVIEW" The lektord is only the lektor's daemon. It may need other scripts and/or external programs to work correctly. @@ -9,10 +11,9 @@ You may be interested in other related programs like: .PP .PD 0 .TP -\fIlktadm\fP Administration of lektor from a separate executable -.TP \fIlkt\fP A standard client for lektord .PD + .SH "DESCRIPTION" .PP Lektor allows one to interactivelly and remotly interact with the player. The diff --git a/man/lkt.template b/man/lkt.template index 99990f76fe8797f1e7a506f6c4f397947c89cd05..20d33de3eb62f0a5b669659685ac4c1b6c353e55 100644 --- a/man/lkt.template +++ b/man/lkt.template @@ -1,5 +1,6 @@ .TH "LKT" "1" "___DATE___" "LEKTOR MK 7" .SH "NAME" + lkt \- the lektor command line client .SH "OVERVIEW" @@ -17,7 +18,6 @@ You may be interested in other related programs like: .TP \fIlektord\fP The lektor daemon .TP -\fIlktadm\fP Administration of lektor from a separate executable .PD .SH "COMMANDS" @@ -158,20 +158,20 @@ Create a sticker that can be used to tag \fIkara\fP and \fIplt\fP objects .TP \fBsticker get\fP <type> <uri> [ <name> [ <op> <value> ] ] List the stickers of an object \fIuri\fP. The object \fItype\fP can be -\fIkara\fP or \fIplt\fP. +\fIkara\fP or \fIplt\fP A condition can be defined on the value of the sticker with an operator \fIop\fP and an integer value \fIvalue\fP. Supported operators are \fIl\fP for 'less than', \fIe\fP for 'equal to' and \fIg\fP for 'greater than'. -Operations are not strict. +Operations are not strict .TP \fBsticker set\fP <type> <uri> <name> <value> Set the value of a sticker \fIname\fP to \fIvalue\fP for the object with the id \fIuri\fP .TP \fBsticker delete\fP <type> <uri> [name] -Delete all the stickers or only one (specified by \fIname\fP) of the object with -the id \fIuri\fP +Delete all the stickers or only one (specified by \fIname\fP) of the object +with the id \fIuri\fP .PP \fIADMIN-COMMANDS\fP @@ -236,8 +236,7 @@ Valid types for a query are the following: \fIid\fP, \fIlang\fP, \fItype\fP, \fIcategory\fP, \fIauthor\fP, \fIquery\fP and \fIplaylist\fP. .PP 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. +\fIED\fP, \fIIS\fP, \fIAMV\fP, \fIVOCA\fP, \fIMV\fP, \fIPV\fP and \fILIVE\fP. .PP 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