--------

Phil Taylor writes:
| John Chambers wrote:
| >Possible, but it would require a bit of a change to current  parsers.
| >Like  most ABC programs, my code tries hard to ignore everything that
| >isn't part of an ABC "tune".  And it's real hard to write  code  that
| >matches  English-language  warnings  or  restrictions.  If they're in
| >other languages, it's even harder.
|
| I was thinking of more formal instructions which could be placed in
| a field in the abc, e.g.
|
| I:RobotsDontIndex
|
| or
|
| I:RobotsWholeFileOnly
|
| and which (ideally) might become part of the abc standard.

Putting such instructions inside  the  ABC  "tunes"  would  certainly
help.  But I'd question whether this would have the desired result.

In the case of my search bot, it does read the entire file.  Its job,
after  all,  is to build an index of the ABC tunes that it finds.  It
pretty much has to read the entire  file.   So  the  second  I  field
wouldn't change its behavior at all.  The first would, but would just
mean that the file wouldn't be indexed.  You can  do  this  with  the
robots.txt  file,  but this I field would be better for ABC if that's
what you want.

The extraction of single tunes is done by other programs, CGI scripts
in  my  Tune  Finder's case.  And even they still download the entire
file, because again that's all they can do.  There's no way to ask  a
web  server for a portion of a file; you just have to read through it
from the beginning.  You can disconnect after you've found  what  you
want,  but you can't avoid reading everything before that.  (And it's
likely that if you disconnect, the server will have sent  the  entire
file  by  the  time it realizes that you're gone, since file transfer
times are comparable to the two round trips that it takes for TCP  to
terminate a connection.)

The "extraction" part comes about because of a web front  end  to  my
tune  index  files that know how to do this.  In at least one case, I
can again say that there's no choice.  One of the formats returned is
MIDI. This is done by feeding the selected tune to abc2midi, which is
the only program that I know of that can run on unix as a  subprocess
to a CGI script, read ABC, and produce MIDI. One of its properties is
that it only translates the first tune in its input.  So if you  want
to  hear  the 17th tune in the file, you must precede abc2midi with a
filter that cuts out everything before the X:17 line.

It's not obvious to me how the above I lines would apply to this. The
first  would just mean that the tune wouldn't be in the index at all.
The second would mean that all MIDI  requests  would  get  the  first
tune,  in  which case you might as well not bother (unless that's the
tune that the user asked for).

To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html

Reply via email to