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

Re: [Clip] Re: Adding a second when there's a tenth or more

Expand Messages
  • Axel Berger
    ... I haven t run any tests so far, only read and tried to understand your code. I don t see why 09:60 isn t caught by your subsequent ^!Find ( d d):60$ RS
    Message 1 of 14 , May 24, 2013
    • 0 Attachment
      "flo.gehrke" wrote:
      > Please test it against...
      > When changing only that single command line as proposed the result is...
      > 09:60 <--- false

      I haven't run any tests so far, only read and tried to understand your
      code. I don't see why 09:60 isn't caught by your subsequent

      ^!Find "(\d\d):60$" RS

      It should be.

      Axel
    • Axel Berger
      ... There was. I have now run your clip of 15:54 h with my modification and lots of ^!Continue when stumped. You forgot the last loop and the d d Find was run
      Message 2 of 14 , May 24, 2013
      • 0 Attachment
        "flo.gehrke" wrote:
        > I think there's another issue. Please test it against...

        There was. I have now run your clip of 15:54 h with my modification and
        lots of ^!Continue when stumped. You forgot the last loop and the \d\d
        Find was run only once. After adding
        ^!Goto Minutes_2
        as a last line it worked fine. Looking at your later posts that error
        seems to persist.

        Axel
      • flo.gehrke
        ... Yes, I came across that too. Another loop is missing: ^!SetHintInfo Working... ^!SetScreenUpdate Off ^!Jump Doc_Start ... ^!Find ( d d) . d$ RS ^!IfError
        Message 3 of 14 , May 24, 2013
        • 0 Attachment
          --- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...> wrote:
          >
          > You forgot the last loop and the \d\d Find was run only once.
          > After adding ^!Goto Minutes_2 as a last line it worked fine.

          Yes, I came across that too. Another loop is missing:

          ^!SetHintInfo Working...
          ^!SetScreenUpdate Off
          ^!Jump Doc_Start
          :Seconds
          ^!Find "(\d\d)\.\d$" RS
          ^!IfError Skip_2
          ^!InsertText "^$Calc(^$GetReSubstrings$+1)$"
          ^!Goto Seconds
          ^!Jump Doc_Start
          :Minutes_1
          ^!Find "([0][1-8]):60$" RS
          ^!IfError Skip_2
          ^!InsertText "0^$Calc(^$GetReSubStrings$+1)$:00"
          ^!Goto Minutes_1
          ^!Jump Doc_Start
          :Minutes_2
          ^!Find "([0][1-9]):60$" RS
          ^!IfError Skip_2
          ^!InsertText "^$Calc(^$GetReSubStrings$+1)$:00"
          ^!Goto Minutes_2
          ^!Jump Doc_Start
          :Minutes_3
          ^!Jump Doc_Start
          ^!Find "(\d\d):60$" RS
          ^!IfError Out
          ^!InsertText "^$Calc(^$GetReSubStrings$+1)$:00"
          ^!Goto Minutes_3
          :Out
          ^!Replace ":\K(?=\d$)" >> "0" WARS

          New test list - before...

          01 xxx 01:58.4
          02 xxx 12:59.7
          03 xxx 03:59.9
          04 xxx 11:44.4
          05 xxx 15:59.5
          06 xxx 09:58
          07 xxx 09:59.7
          08 xxx 10:00.1
          09 xxx 10:09.1
          10 xxx 10:01.3
          11 xxx 12:10.4
          12 xxx 07:03.3

          And after...

          01 xxx 01:59
          02 xxx 13:00
          03 xxx 04:00
          04 xxx 11:45
          05 xxx 16:00
          06 xxx 09:58
          07 xxx 10:00
          08 xxx 10:01
          09 xxx 10:10
          10 xxx 10:02
          11 xxx 12:11
          12 xxx 07:04

          Have we got it now? :-(

          Flo
        • flo.gehrke
          ... Adrian, I just had a look at this detail in your message. If it s about something like this (given only 6 time lines): Before: xxx xxx xxx 01 xxx 01:59 02
          Message 4 of 14 , May 24, 2013
          • 0 Attachment
            --- In ntb-clips@yahoogroups.com, "Adrian Worsfold"<pluralist@...> wrote:

            > ^!Set %Pos%=^$GetTextLineCount$
            > ^!Set %Lines%=^$GetParaRow$
            > ^!Set %Bracket%=^$Calc(^%Pos%-^%Lines%)$
            > :LOOP
            > ^!Inc %Count%
            > ^!Jump LINE_END
            > ^!InsertText "]"
            > ^!MoveCursor -006
            > ^!InsertText "["
            > ^!Jump LINE_START
            > ^!Jump +001
            > ^!IfError END
            > ^!If ^%Count% > ^%Bracket% END
            > ^!GoTo LOOP
            > :END
            >
            > That is the third clip in the sequence.

            Adrian,

            I just had a look at this detail in your message. If it's about something like this (given only 6 time lines):

            Before:

            xxx xxx xxx
            01 xxx 01:59
            02 xxx 13:00
            03 xxx 04:00
            04 xxx 11:45
            05 xxx 16:00
            06 xxx 09:58
            zzz zzz

            Isn't that done with one line:

            ^!Replace "(\d\d:\d\d)$" >> "[$0]" WARS

            After:

            xxx xxx xxx
            01 xxx [01:59]
            02 xxx [13:00]
            03 xxx [04:00]
            04 xxx [11:45]
            05 xxx [16:00]
            06 xxx [09:58]
            zzz zzz

            Possibly no loops, jumps, and cursor movements needed here.

            Flo
          • Adrian Worsfold
            Hello Flo and Axel This ^!Replace ( d d: d d)$ [$0] WARS replaced many of my lines. I don t understand Regex and so I did it the long way with
            Message 5 of 14 , May 24, 2013
            • 0 Attachment
              Hello Flo and Axel

              This ^!Replace "(\d\d:\d\d)$" >> "[$0]" WARS replaced many of my lines. I don't understand Regex and so I did it the long way with head-banging on the route. But thanks for the error solved and this too.

              Late it is now, but here is the usual time I do make up a CD. I'll do it for real and let you know how it goes (I haven't even chosen some of the music yet, but it will be very different from the given list).

              * There is one final potential clip that hardly saves on human viewing, but one may as well push it to the logical end.

              After the number, the presence of HL nnn, SF nnn, LS nn, CC nn, HW nnn, HF nnn, or NB nn indicates a hymn book (or latter no book still with numbers up to 99). Before each hymn book, and after it but not before another hymn book, there is a blank line inserted. This is to tell me to use a second CD made at a higher level of volume which people sing against. Now I am sure this is within my abilities, eventually, the complication being not wanting a blank line in between two hymns indicated by either leading code after the number.

              Thus a final appearance result would be:

              01 Temptations Papa was a Rollin Stone [11:47]
              02 KamakawiwoOleIsrael Somewhere Over the Rainbow [04:55]
              03 SheeranEd A Team [04:22]
              04 PresleyElvis In The Ghetto [02:48]
              05 Clannad I See Red [04:25]

              06 HL 018 Kremser choir [01:27]
              07 HL 070 Hanover [02:51]

              08 KingCarole Youve Got a Friend [05:10]

              09 HL 051 Stuttgart [01:59]

              10 Debussy Claire de Lune Suite extract [02:00]

              11 HL 210 Jerusalem choir [02:47]

              12 CollinsPhil Homeless [04:15]
              13 PineCourtney Closer to Home [03:56]
              14 PineCourtney GreeneSusaye Children of the Ghetto [07:04]
              15 Housemartins I'll be Your Shelter [04:52]
              16 Simply Red Moneys Too Tight to Mention [04:15]

              All of these are HLs but SFs are as common and the rest very occasional but available.

              Automation of the WHOLE process isn't possible because nothing could guide the CD burner print to .PDF after the burn process. That's the human bit during the ^!shellwait after which the first clip works its magic. But this last part does follow regular internal rules.



              Adrian Worsfold

              http://www.pluralist.co.uk
              http://pluralistspeaks.blogspot.com
              pluralist@...
              25-05-2013
              ----- Received the following content -----
              From: flo.gehrke
              Receiver: ntb-clips
              Time: 2013-05-24, 23:03:23
              Subject: [Clip] Re: Adding a second when there's a tenth or more


              [Non-text portions of this message have been removed]
            Your message has been successfully submitted and would be delivered to recipients shortly.