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

Re: [Clip] Re: Need help converting a list of files to links

Expand Messages
  • Jeff Scism
    Which of Jody s clips does this apply to? Sounds useful. ... -- Jeffery G. Scism, IBSSG ~~ Proponents of each side are vying with determination to prove their
    Message 1 of 9 , Feb 5, 2008
      Which of Jody's clips does this apply to? Sounds useful.

      Sheri wrote:
      >
      > --- In ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.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>) and was
      > > hoping someone else had more expertise than I at creating a loop to
      > > automate the conversion of a list with a filename on each line.
      > >
      > > I found a clip that created links but the link "text" for each was
      > > blank unless I typed the name one by one:
      > > e.g. xxx.html to <a href="xxx.html"></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
      >
      >


      --


      Jeffery G. Scism, IBSSG
      ~~

      "Proponents of each side are vying with determination to prove their ignorance is greater than the other."

      President Andrew Jackson, discussing a bill going through the US Congress.



      Visit http://ibssg.org/
      For The Blacksheep website, Montgomery County, Putnam County, and Fountain County USGenWeb sites. MORE...

      Putnam County Indiana Biographies and Obituaries
      http://ibssg.org/putnam/bios/

      Montgomery County Indiana Biographies and Obituaries
      http://ibssg.org/montgomery/bios/

      Fountain County Indiana Biographies and Obituaries
      http://ibssg.org/fountain/vitals/bios/
    • Sheri
      ... It is given in full in the message that was being answered: http://tech.groups.yahoo.com/group/ntb-clips/message/17398 Regards, Sheri
      Message 2 of 9 , Feb 5, 2008
        Jeff Scism wrote:
        > Which of Jody's clips does this apply to? Sounds useful.
        >
        >
        It is given in full in the message that was being answered:

        http://tech.groups.yahoo.com/group/ntb-clips/message/17398

        Regards,
        Sheri
      • ebbtidalflats
        ... In the above code you need to make BOTH wizards IDENTICAL, (add the omitted ^=^& in the second wizard): ^?[URL=^&] A single
        Message 3 of 9 , Feb 5, 2008
          --- 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 4 of 9 , Feb 5, 2008
            --- 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 5 of 9 , Feb 5, 2008
              "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 6 of 9 , Feb 5, 2008
                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 7 of 9 , Feb 5, 2008
                  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.