Loading ...
Sorry, an error occurred while loading the content.

23403Re: [Clip] Extracting text from a music .XML file.

Expand Messages
  • flo.gehrke
    Nov 16, 2012
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "Adrian Worsfold"<pluralist@...> wrote:
      >
      > The clip is brilliant except that it loses the essential main
      > credit, the HL number and tune name, and is saving the file by
      > the subtitle, the hymn title as subtitle (words)...

      Hi Adrian,

      Your clip outputs the 'credit' block as...

      Tomorrow is a Highway
      Tomorrow is a Highway
      Pete Seeger
      from Lee Hays
      Harmony Music Ltd.

      So I thought we've got duplicate lines here and suppressed line #1. I think the easiest solution is to replace command line #4 in the clip with...

      ^!Find "(?s)^\x20*<credit page="1">.+</credit>" WRS

      Now you should get both the title and the subtitle. The file will be saved automatically with the first line as file name.

      Please take my clip as a proposal only. It wasn't meant to be perfect. Probably, this will be impossible because a clip won't be able to take all irregularities in the data into account.

      Regarding the rest of your latest messages, I beg your pardon that, for the time being, I'm a bit exhausted from this topic in the moment.

      Just two more tips:

      1. You have published your clip at...

      https://dl.dropbox.com/u/28120070/pluralist/spiritual/hymnsextract.html

      By copying the clip from your website, the code might be damaged in a way the users are not familiar with. I would recommend to provide the code for download as a TXT file or even better as a clip library (*.CLB).

      2. It's explained in your clip but it might be helpful to make it even clearer: The source file must be opened in NT as XML! Some users may try to copy the code from the XML into NT. In this case, they will possibly encounter some unknown problems with UTF-8 encoding, and the clip could fail.

      Regards,
      Flo
    • Show all 47 messages in this topic