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

Re: Need help converting a list of files to links

Expand Messages
  • ebbtidalflats
    ... In the above code you need to make BOTH wizards IDENTICAL, (add the omitted ^=^& in the second wizard): ^?[URL=^&] A single
    Message 1 of 9 , Feb 5, 2008
    View Source
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "Pat Drummond" <pat@...> wrote:
      >
      > line by line (using clip: <a href="^?[URL=^&]">^?[URL]</a>)

      In the above code you need to make BOTH wizards IDENTICAL,
      (add the omitted "^=^&" in the second wizard):

      <a href="^?[URL=^&]">^?[URL=^&]</a>

      A single wizard will pop-up, but BOTH wizards receive the same
      data, as will any other wizards, using the identical syntax,
      "^?[URL=^&]", anywhere in the same clip.



      Cheers,


      Eb
    • Pat Drummond
      ... Yes, exactly what I need. Thank you! With some courage I edited the clip further so it simply converts a list of filenames to links without prompts. Feel
      Message 2 of 9 , Feb 5, 2008
      View Source
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:
        >
        > --- In ntb-clips@yahoogroups.com, "Pat Drummond" <pat@> wrote:
        > >
        > > I've had to convert a long list of files into links several times,
        > > line by line (using clip: <a href="^?[URL=^&]">^?[URL]</a>) ...
        >
        > Is it that you wanted this?
        > <a href="xxx.html">xxx.html</a>
        >
        > If so you could add these lines to Jody's clip just after the line
        > containing: ^?{Enter link name}
        >
        > ^!IfFalse ^%Prompt% Next else Skip_2
        > ^!MoveCursor -4
        > ^%GetSelect%
        >
        > Regards,
        > Sheri

        Yes, exactly what I need. Thank you! With some courage I edited the
        clip further so it simply converts a list of filenames to links
        without prompts. Feel free to edit and add it to a library for others
        to use. Jody lives and Sheri rocks!

        Format List to links
        ; "Format Bare link" Last updated by Jody 11-27-2000
        ; Last updated by Sheri, Pat D. 02-05-2008
        ^!Jump 1
        ^!SetHintInfo Wrapping links...
        ^!SetScreenUpdate Off
        ^!SetWordWrap Off
        ^!Jump Doc_End

        :Loop1
        ^!IfFalse ^$IsEmpty(^$GetLine$)$ Skip_2
        ^!Replace "^p" >> "" SB
        ^!Goto Loop1
        ^!InsertText ^p
        ^!Jump 1

        :Loop2
        ^!Select Eol
        ^!Set %GetSelect%=^$GetSelection$
        ; put ^& in link name if you want the link there
        <a href="^&"></a>
        ^!MoveCursor -4
        ^%GetSelect%
        ^!Jump +1
        ^!If ^$GetRow$ = ^$GetLineCount$ Skip
        ^!Goto Loop2
        ^!Jump 1
        ^!SetWordWrap On
      • buralex@gmail.com
        ... Hi Pat: Could you give an example of (say) 5 file specs and following that what you want them transformed to? If I ve understood what you are attempting,
        Message 3 of 9 , Feb 5, 2008
        View Source
        • 0 Attachment
          "Pat Drummond" <pat@...> said on Feb 05, 2008 17:23 -0500 (in part):
          > Yes, exactly what I need. Thank you! With some courage I edited the
          > clip further so it simply converts a list of filenames to links
          > without prompts.
          Hi Pat:
          Could you give an example of (say) 5 file specs and following that what
          you want them transformed to?
          If I've understood what you are attempting, the transformation can
          *probably* be done with a fairly simple one line regexp - ie. without
          looping.

          Regards ... Alec -- buralex-gmail
          --



          [Non-text portions of this message have been removed]
        • buralex@gmail.com
          ... Followup - having tested your clip, this should be all you need to get equivalent results in a buffer that contains *just* the file specs. ^!replace
          Message 4 of 9 , Feb 5, 2008
          View Source
          • 0 Attachment
            buralex@... said on Feb 05, 2008 19:14 -0500 (in part):
            > "Pat Drummond" <pat@...> said on Feb 05, 2008 17:23 -0500 (in part):
            >> Yes, exactly what I need. Thank you! With some courage I edited the
            >> clip further so it simply converts a list of filenames to links
            >> without prompts.
            > Hi Pat:
            > Could you give an example of (say) 5 file specs and following that
            > what you want them transformed to?
            > If I've understood what you are attempting, the transformation can
            > *probably* be done with a fairly simple one line regexp - ie. without
            > looping.
            >
            > Regards ... Alec -- buralex-gmail
            Followup - having tested your clip, this should be all you need to get
            equivalent results in a buffer that contains *just* the file specs.

            ^!replace "^(.*)$" >> "<a href="$1">$1</a>" rwais

            Regards ... Alec -- buralex-gmail
            --



            [Non-text portions of this message have been removed]
          • Sheri
            Hi Pat, I m glad that worked ok and I know Jody is smiling :) I do think maybe we could improve it a little. These three lines: ^!MoveCursor
            Message 5 of 9 , Feb 5, 2008
            View Source
            • 0 Attachment
              Hi Pat,

              I'm glad that worked ok and I know Jody is smiling :)

              I do think maybe we could improve it a little.

              These three lines:
              <a href="^&"></a>
              ^!MoveCursor -4
              ^%GetSelect%

              try changing it to
              <a href="^&">^&</a>

              and comment out or remove the two lines that follow it
              ;^!MoveCursor -4
              ;^%GetSelect%

              Alec's regex solution would also do the job if you're not using an old
              version of NoteTab.

              Best Regards,
              Sheri
            Your message has been successfully submitted and would be delivered to recipients shortly.