After looking over a bunch of (mostly private) messages dealing with
just what my Tune Finder returns, I've made a minor change that I
can't test on all possible systems, and I'd be interested in hearing
of problems on non-unix systems.
What it does now is, if you use the TXT or ABC links to get one tune,
the tune is returned with all trailing white space, including CR and
NL chars, reduced to just a single NL. There is also an F header line
inserted just before the K line giving the URL and time that the tune
was extracted.
I've experimented with a couple ways to return this URL, and the main
problem was in trying to determine how to end the line. There's no
way to know what the client prefers, of course, since clients don't
tell you such things. In the past, I'd had my code try to preserve
the line endings of the source. But this falls afoul of the way that
web servers (or CGI programs) like to generate output with different
kinds of line endings on different lines.
There have been a lot of problems reported from users on Mac and
Windows systems whose software doesn't like mixed line endings. It
might be noted that this is a general problem with things downloaded
from web servers, not just ABC. Most web servers run on unix systems,
where people tend to sorta shrug when asked about the CRLF problem.
Most unix software now doesn't care, the editors have runtime
settings saying which style to produce, and so on. ("It's only one
line of code; what's the big deal?") And of course the servers just
return whatever they find sitting on the disk, which is likely to
come from a mixture of different OS types. ("Hey, this is unix. We
can handle any file format; what's the big deal?") The Tune Finder is
an extreme case of this, since it's fetching files from other systems
in whatever format they happen to be, and sending a subset onward.
It's all too easy to end up with text that has a mixture of styles.
This scheme at least sends the text out with all the line endings the
same. I'd hope that software that's downloading text files from the
Net would be prepared to translate "foreign" line endings into the
native style.
So I'd like to hear of any problems with the Tune Finder's TXT and
ABC links. I do like the idea of including the URL and time, so that
we can track an isolated tune back to its source.
(So far I've resisted the temptation to run the ABC through a filter
to canonicalize it to the 1.6 standard. ;-)
To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html