lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mac OS X 10.4 spotlight indexing of .ly files?


From: Ed Baskerville
Subject: Re: Mac OS X 10.4 spotlight indexing of .ly files?
Date: Wed, 11 May 2005 13:39:32 -0700

If you haven't heard about it on this list, I suspect nobody has done one yet. I'll take it under advisement that there's a desire for this.

One temporary solution: the easiest way to tell OS X that your .ly files are text files is to set their HFS metadata type attribute like so (assuming all your files are in ~/Documents):

find ~/Documents .name '*.ly' -type f -exec /Developer/Tools/SetFile - t 'TEXT' {} \;

(stolen from a thread on importing log files at:
http://episteme.arstechnica.com/eve/ubb.x/a/tpc/f/8300945231/m/ 307008223731
)

Then they'll be searchable, to the extent that these files are searchable as plain text, by Spotlight. (I ran this with a Spotlight search window open, and it highlighted the power of that technology-- LilyPond files showed up instantaneously in the existing search results after I ran the command. Cool.)

Of course, you have to re-run this every time you write out a .ly file, unless you're using an editor that sets this attribute for you.

Short-term, doing one that simply passes things on to the default text importer is apparently like 4 lines of code; I'd just have to research what those lines are.

Long-term, of course, a real metadata importer that understands LilyPond syntax would be great. Which would be very easy for me to do if I get around to syntax coloring with this Lily editor I'm writing.

--Ed

On May 11, 2005, at 11:25 AM, Arjan Bos wrote:


Hi there all you Mac OS X Tiger users.
Does anyone of you know of a metadata importer for lilypond files? Because currently they are not indexed. The documents from Apple tell how to do it, but since my c classes are 12 years ago, I'm very rusty in this area. So if someone has already done an importer I'd be very happy with a copy.

The areas that imho need to be indexed are all commands (those that start with \command-name), all scheme definitions and all header information and all lyrics (without the timing and melismata preferably).

Regards,
Arjan

---
It was funny how people were people everywhere you went, even if the people concerned weren't the people the people who made up the phrase "people are people everywhere" had traditionally thought of as people. And even if you weren't virtuous, as you had been brought up to understand the term, you did like to see virtue in other people, provided it didn't cost you anything.

-- (Terry Pratchett, The Fifth Elephant)



_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user








reply via email to

[Prev in Thread] Current Thread [Next in Thread]