Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
lektor
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Kubat
lektor
Validations
4c69f734
Vérifiée
Valider
4c69f734
rédigé
Il y a 5 ans
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Update README
parent
bf9235be
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion
!105
Refactor and more
Modifications
1
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
README.md
+36
-24
36 ajouts, 24 suppressions
README.md
avec
36 ajouts
et
24 suppressions
README.md
+
36
−
24
Voir le fichier @
4c69f734
...
...
@@ -8,6 +8,8 @@ They will enable one to have a database and make requests over the network.
Prerequisites:
-
[
meson
](
https://mesonbuild.com/
)
-
[
autotools
](
https://www.gnu.org/software/autoconf/
)
only if you change the
configuration (if you only edit existing files you won't need it)
-
a C compiler with C18 support (e.g.
`gcc>8.1`
,
`clang>7.0`
)
-
the
[
sqlite3
](
https://www.sqlite.org/
)
development library, version 3.31.0 or
newer for
[
generated columns
](
https://www.sqlite.org/gencol.html
)
support
...
...
@@ -34,15 +36,24 @@ configuration file:
The manual way of installing and setting up lektor:
```
sh
# Setup files
sudo mkdir
/home/kara
&&
sudo chown
USER:USER /home/kara
# Install
meson build
ninja
-C
build
&&
sudo
ninja
-C
build
install
sudo chown
USER:USER /home/kara/kara.db
ninja
-C
build
cd
build
&&
sudo
meson
install
# Config and run
lkt adm conf
>
~/.config/lektor/lektor.ini
lektord
```
You may need to put the
`lib_window_x11.so`
in the right directory to have the
lektor player actually playing something (see the ini file). This path can be
setted manually in the INI file.
The sqlite database will be created automatically if needed (i.e. on the first
time you run lektord).
If you are using special modules or are compiling lektor without static modules,
you may set their
**absolute path**
inside the lektor's config file.
On archlinux, you need only to install the package:
...
...
@@ -52,17 +63,14 @@ makepkg -si
## Preparing a kara for lektor
A karamaker needs
at least python3, with
`mkvpropedit`
(often installed with the
`mkvtoolnix-gui`
package in distributions). The
`sqlite3`
program is also needed.
The path to these programs must be setted in the
lektor.ini config file.
A karamaker needs
`mkvpropedit`
(often installed with the
`mkvtoolnix-gui`
package in distributions). The
path to these programs must be setted in the
lektor.ini config file.
As a karamaker, you need to add necessary information to your kara so that
lektor can store it in its database. This information is to be directly
written in the
`.mkv`
file.
For that purpose, run the
`karadata`
from the command-line, with your kara as an
argument. For that, karas must be placed in a folder hierarchy like the following:
```
/some/directory/$CAT/$LANG/$AUTH/$SOURCE - $TYPE$NUM - $TITLE.mkv
```
...
...
@@ -81,8 +89,6 @@ card with optimus (in almose every laptop), please use `optirun` or `primusrun`:
optirun ./lektord
```
The
`x11`
module may have some issues with
`optirun`
and
`primusrun`
.
## How to use lektor
Lektor is compatible with mpd, which means that you can use any client (only mpc is
...
...
@@ -108,11 +114,10 @@ Lektor searches for the configuration file in that order:
The first one to be found is picked up by lektor. Note that if the environment
variable
`XDG_CONFIG_HOME`
is not defined, it is replaced by
`HOME/.config`
.
To get the default config file, you can use the
`lktadm`
command. To see what
are the settings used by lektor, you can also use the
`lktadm`
command.
To get the default config file, you can use the
`lkt adm conf`
command.
Be aware that if the home directory or the
`XDG_CONFIG_HOME`
are too long
they will be ignored.
they will be ignored
and truncated
.
## Modules
...
...
@@ -122,15 +127,22 @@ function named `module_set_function` which takes a `void *` and a
`uint16_t`
in the future). This function must initialize correctly the module.
The name of this function can be defined in the INI file.
Module can be configured with the ini configuration file in a section named
`module_${name}`
, this a convention but it can be anything as long as it
don't make collision with sections used by lektor (may be fine, but don't to
this!).
The functions of a modules are stored in a
`register`
. This register can be
registered in the lektor's global
`register`
or exported inside
`.so`
file.
Only one
`register`
can be exported by
`.so`
file. The macros are here to help
you do so.
Some functions are mendatory for a module:
-
The
`new(void **)`
function creates the module
-
The
`free(void **)`
release the module, it
*can't*
be used after
-
The
`close(void **)`
close the module, it
*can*
be used after
Like in the
*player*
, modules are loaded into slots and
**must be**
refered by
their section name. The function used to load the
`.so`
file will be determied
by the
`load_function`
property. The path to the
`.so`
file is determined by
the
`path`
property.
All exported functions must take a
`va_list`
. The first argument of the
`va_list`
is a
`void **`
, 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
`int`
in a POSIX way:
`0`
if everything is ok, an other value if something
went wrong.
## MPD
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter