[haiku] Sniff Rules?

  • From: Pete Goodeve <pete.goodeve@xxxxxxxxxxxx>
  • To: Haiku <haiku@xxxxxxxxxxxxx>
  • Date: Sat, 2 Mar 2013 16:37:08 -0800

I'm trying to add a sniff rule for a particular file type that I'm using,
but whatever I try, it just comes up "text/plain"!  What might I be
doing wrong?

The file is a control file for Csound.  It's in XML form, bounded by
"<CsoundSynthesizer>"...."</CsoundSynthesizer>", and normally
has the extension ".csd".

So in FileTypes, I add the ".csd" as an extension, turn on the
"Show recognition rule" option, and add a rule like:

0.25  ([0:100]"<CsoundSythesizer")

which is the sort of thing that seems to work for tagging an HTML
file.  I'm deducing the format, but I assume the first values (0.25)
determine a priority, and the [0:100] is a position range.

But it doesn't work!  If I create a new csd file without attributes,
and use "Identify", it just gets tagged text/plain again...

(I've checked that the attributes in beos_mime got updated suitably.)


        -- Pete --

Other related posts: