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
f8e13481
Vérifiée
Valider
f8e13481
rédigé
Il y a 5 ans
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Script to get lektor information on current song modified and the
database scheme for the view on kara also
parent
0abf1b47
Branches
Branches contenant la validation
Étiquettes
Étiquettes contenant la validation
1 requête de fusion
!25
Search functions
Modifications
2
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
database/init.sql
+1
-1
1 ajout, 1 suppression
database/init.sql
scripts/lektor_info.csh
+10
-4
10 ajouts, 4 suppressions
scripts/lektor_info.csh
avec
11 ajouts
et
5 suppressions
database/init.sql
+
1
−
1
Voir le fichier @
f8e13481
...
@@ -111,7 +111,7 @@ INSERT INTO misc (id) VALUES (42);
...
@@ -111,7 +111,7 @@ INSERT INTO misc (id) VALUES (42);
CREATE
VIEW
IF
NOT
EXISTS
view_kara
AS
CREATE
VIEW
IF
NOT
EXISTS
view_kara
AS
SELECT
SELECT
id
,
id
,
(
category
||
'/'
||
source_name
||
' - '
||
song_type
||
' - '
||
song_name
)
AS
string
,
(
song_type
||
'/'
||
source_name
||
' - '
||
category
||
song_number
||
' - '
||
song_name
)
AS
string
,
file_path
file_path
FROM
kara
FROM
kara
;
;
Ce diff est replié.
Cliquez pour l'agrandir.
scripts/lektor_info.csh
+
10
−
4
Voir le fichier @
f8e13481
...
@@ -5,7 +5,8 @@ alias _set_if 'if ( \!:1 == $last ) set \!:2 = "$line"'
...
@@ -5,7 +5,8 @@ alias _set_if 'if ( \!:1 == $last ) set \!:2 = "$line"'
## Get the status of lektor
## Get the status of lektor
set last = ""
set last = ""
set reply = ` printf "status\nclose\n" | nc localhost 6600 `
set host = ` cat ~/.local/etc/lektor_host `
set reply = ` printf "status\nclose\n" | nc $host 6600 `
if ( $? != 0 ) exit 0
if ( $? != 0 ) exit 0
...
@@ -15,11 +16,11 @@ foreach line ( $reply )
...
@@ -15,11 +16,11 @@ foreach line ( $reply )
set last = $line
set last = $line
end
end
if ( $state == "stop
ped
" || $last != "OK" ) exit
1
if ( $state == "stop" || $last != "OK" ) exit
0
## Get the current song, let's do some magic
## Get the current song, let's do some magic
set last = ""
set last = ""
set reply = ` printf "currentsong\nclose\n" | nc
local
host 6600 | sed -e 's/ / /g' `
set reply = ` printf "currentsong\nclose\n" | nc
$
host 6600 | sed -e 's/ / /g' `
if ( $? != 0 ) exit 0
if ( $? != 0 ) exit 0
...
@@ -36,5 +37,10 @@ foreach line ( $reply )
...
@@ -36,5 +37,10 @@ foreach line ( $reply )
end
end
if ( $last != "OK" ) exit 0
if ( $last != "OK" ) exit 0
if ( $host == "localhost" || $host == "127.0.0.1" || $host == "127.0.1.1" ) then
set host = ""
else
set host = "($host)"
endif
echo "$category / $source - $type - $title [ $author ]"
echo "$category / $source - $type - $title [ $author ]
$host
"
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