[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Point and click for Lilypond in KDE (was: Re: patch for
From: Wilbert Berendsen <wbsoft () xs4all ! nl>
Date: 2008-01-30 14:49:35
Message-ID: 200801301549.35905.wbsoft () xs4all ! nl
[Download RAW message or body]
Because of the differences in Kate line numbering between KDE 3 and 4 I think
it's better to handle the invocation of the editor inside KDE, bypassing
lilypond-invoke-editor. So the patch I sent to lily-devel is not necessary.
I created two very small files that do the job. Both are attached, with a
README. Hopefully this will once become a simple LilyPond/KDE package, with a
nice helper plugin for Kate I'm trying to create.
with best regards,
Wilbert Berendsen
--
http://www.wilbertberendsen.nl/
"You must be the change you wish to see in the world."
-- Mahatma Gandi
["ktexteditservice" (application/x-shellscript)]
#!/bin/sh
uri=$1
col=${uri##*:} uri=${uri%:*}
char=${uri##*:} uri=${uri%:*}
line=${uri##*:} uri=${uri%:*}
proto=${uri%%:*}
file="file:${uri#*:}"
# for KDE 3.x:
let line=--line
# for KDE 4.x:
#let col=++col
exec kate --use --line $line --column $col "$file"
["textedit.protocol" (text/plain)]
[Protocol]
exec=ktexteditservice %u
protocol=textedit
input=none
output=none
helper=true
listing=
reading=false
writing=false
makedir=false
deleting=false
Icon=txt
Class=:local
["README.txt" (text/plain)]
Lilypond Point and Click for KDE (3.x and 4.x)
==============================================
Nederlandse uitleg (English see below):
1. Plaats textedit.protocol in de KDE-services map, bijvoorbeeld
~/.kde/share/services/ of /usr/share/services/.
2. Plaats ktexteditservice ergens in het systeempad, bijvoorbeeld
~/bin/ of /usr/local/bin/ en maakt het uitvoerbaar:
chmod +x ktexteditservice
Maak nu een Lilypond-bestand aan in Kate. Laat Lilypond een PDF
aanmaken, open deze in KPDF en klik in de PDF op een muzieknoot. Voilá!
English:
1. Put textedit.protocol somewhere in the KDE services directory, for
example in ~/.kde/share/services/ or /usr/share/services/.
2. Put ktexteditservice somewhere in the system PATH, for example in
~/bin/ of /usr/local/bin/ and make it executable:
chmod +x ktexteditservice
Now create a .ly file with Kate. Run Lilypond and open the resulting
PDF with KPDF. Click on music notes and see the cursor jump to the
correct location!
Note: Kate from KDE3 uses a different line numbering scheme than Kate
from KDE4. Please (un)comment the corresponding lines in ktexteditservice.
Contact: Wilbert Berendsen <info@wilbertberendsen.nl>
http://www.wilbertberendsen.nl/
Wed Jan 30 15:35:23 CET 2008
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic