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

Re: [Clip] Changing numbers to hyperlinks in 1647 HTML pages

Expand Messages
  • Jeff Scism
    ^!set %prev%=^$strcopyright( 000^$calc(^$getname(^##)$-1)$ ;3)$.htm ^!insert nnn This would insert the following to file 007.htm
    Message 1 of 12 , Aug 1, 2004
    • 0 Attachment
      ^!set %prev%=^$strcopyright("000^$calc(^$getname(^##)$-1)$";3)$.htm
      ^!insert <a href="^%prev%">nnn</a>

      This would insert the following to file 007.htm
      <a href="006.htm">nnn</a>

      Nice clip, but in this case the "Parent" is REALLY the Parent, of the
      individual, and the page referenced may not be the previous page in order.

      Thanks, THIS one does look useful.
      --
      ~~

      Jeffery G. Scism. IBSSG

      "Just the facts, maam."
      Sgt. Joe Friday,
      LAPD Badge #714
    • Ben B
      On Sunday, Aug 01, 2004 Jeff Scism wrote regarding Changing numbers to hyperlinks in 1647 HTML pages ; ... Hi Jeff, The following regexp works on your example
      Message 2 of 12 , Aug 1, 2004
      • 0 Attachment
        On Sunday, Aug 01, 2004
        Jeff Scism wrote regarding "Changing numbers to hyperlinks in 1647 HTML pages";

        > The line I need to change is formatted as follows:
        >
        > (Son of No. 1) through (Son of No. 1646)
        >
        > [...]
        >
        > How do I get the program to find the "No. " in each document and select
        > the word AFTER it for the Insert conversion to a link?
        >
        > [...]
        >
        > Select directory (this I can do)
        > Find in all Documents "No. " (this I can do)
        > SELECT the word AFTER "No. " to the clipboard
        > ^!INSERT <A HREF="^&.htm">^&</A> (this I can do)
        > Close and save silently
        > loop to Next document in the directory (this I can do)

        Hi Jeff,

        The following regexp works on your example text. It assumes a single
        space between "No." and "<one or more digits>". The "^!Jump SELECT_END"
        may not be necessary if there is only a single instance to be changed in
        each document.

        ^!Find "No\.\s\d+" R
        ^!Find "\d+" RH
        ^!INSERT <A HREF="^&.htm">^&</A>
        ^!Jump SELECT_END

        HTH
        Ben
      • Jeff Scism
        John, Thank You. I will give it a shot. I will copy about ten to a back up directory and run it there, leaving my current source docs untouched. I appreciate
        Message 3 of 12 , Aug 1, 2004
        • 0 Attachment
          John,

          Thank You.

          I will give it a shot.

          I will copy about ten to a back up directory and run it there, leaving
          my current source docs untouched.

          I appreciate it greatly.
          --
          ~~

          Jeffery G. Scism. IBSSG

          "Just the facts, maam."
          Sgt. Joe Friday,
          LAPD Badge #714
        • Jody
          Hi Jeff, I think I made what you want. Look in the latest (uploaded) DirStuff for: Update History ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ 08-01-2004 Added No. word to
          Message 4 of 12 , Aug 1, 2004
          • 0 Attachment
            Hi Jeff,

            I think I made what you want. Look in the latest (uploaded) DirStuff for:

            Update History
            ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
            08-01-2004 Added "No. word" to link..." Special HTML link formatter

            It's under the --- Format Links --- section. If you get "Out of Memory"
            errors, you'll need to do it on smaller amounts of files at a time and
            possibly restart NoteTab each set. Definitely make backups!

            >Each of 1647 HTML pages needs to link to the proper "parent" document.
            >
            >The pages are in the SAME directory, and are numbered 01-1647.htm with a
            >few of them suffixed with the lower case a,b,c, etc.
            >
            >The line I need to change is formatted as follows:
            >
            >(Son of No. 1) through (Son of No. 1646)
            >
            >The goal is to via directory replacement clip, to change each NUMBER
            >that follows "No. " into a hyperlink
            >This clip works for that:
            >^!INSERT <A HREF="^&.htm">^&</A>
            >
            >
            >How do I get the program to find the "No. " in each document and select
            >the word AFTER it for the Insert conversion to a link?
            >
            >I am already using the DIRSTUFF clips to do the sequential changes on
            >some other portions of webpages, but I am looking for the process of
            >selecting the next word (which is a sequentially numbered reference),
            >for the Looped Clip running.
            >
            >FLOW CHART:
            >
            >Select directory (this I can do)
            >Find in all Documents "No. " (this I can do)
            >SELECT the word AFTER "No. " to the clipboard
            >^!INSERT <A HREF="^&.htm">^&</A> (this I can do)
            >Close and save silently
            >loop to Next document in the directory (this I can do)


            Happy Clip'n!
            Jody

            www.clean-funnies.com, http://www.fookes.us/maillist.htm

            Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
            UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
            Options: http://groups.yahoo.com/group/ntb-clips
          • Jody
            Hi Jeff, Sorry, forgot the link, although you already have it in the Library. ;) There s some options as well in the Clip... NoteTabbers Assistant Library Page
            Message 5 of 12 , Aug 1, 2004
            • 0 Attachment
              Hi Jeff,

              Sorry, forgot the link, although you already have it in the Library. ;)
              There's some options as well in the Clip...

              NoteTabbers Assistant Library Page
              http://www.notetab.net/html/library.htm
              Direct download for DirStuff
              http://www.notetab.net/zip/dirstuff.zip

              I think I made what you want. Look in the latest (uploaded) DirStuff for:

              Update History
              ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
              08-01-2004 Added "No. word" to link..." Special HTML link formatter

              It's under the --- Format Links --- section. If you get "Out of Memory"
              errors, you'll need to do it on smaller amounts of files at a time and
              possibly restart NoteTab each set. Definitely make backups!



              >Each of 1647 HTML pages needs to link to the proper "parent" document.
              >
              >The pages are in the SAME directory, and are numbered 01-1647.htm with a
              >few of them suffixed with the lower case a,b,c, etc.
              >
              >The line I need to change is formatted as follows:
              >
              >(Son of No. 1) through (Son of No. 1646)
              >
              >The goal is to via directory replacement clip, to change each NUMBER
              >that follows "No. " into a hyperlink
              >This clip works for that:
              >^!INSERT <A HREF="^&.htm">^&</A>
              >
              >
              >How do I get the program to find the "No. " in each document and select
              >the word AFTER it for the Insert conversion to a link?
              >
              >I am already using the DIRSTUFF clips to do the sequential changes on
              >some other portions of webpages, but I am looking for the process of
              >selecting the next word (which is a sequentially numbered reference),
              >for the Looped Clip running.
              >
              >FLOW CHART:
              >
              >Select directory (this I can do)
              >Find in all Documents "No. " (this I can do)
              >SELECT the word AFTER "No. " to the clipboard
              >^!INSERT <A HREF="^&.htm">^&</A> (this I can do)
              >Close and save silently
              >loop to Next document in the directory (this I can do)


              Happy Clip'n!
              Jody

              www.clean-funnies.com, http://www.fookes.us/maillist.htm

              Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
              UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
              Options: http://groups.yahoo.com/group/ntb-clips
            • Jeff Scism
              OK Ben s solution worked within the DIRSTUFF code pakage, except on single digit page Numbers (1-9) which I did manually in the TEST files. (Now I have to
              Message 6 of 12 , Aug 1, 2004
              • 0 Attachment
                OK Ben's solution worked within the DIRSTUFF code pakage, except on
                single digit page Numbers (1-9) which I did manually in the TEST files.

                (Now I have to chamge the extensions from *.bak back to *.htm...
                --
                ~~

                Jeffery G. Scism. IBSSG

                "Just the facts, maam."
                Sgt. Joe Friday,
                LAPD Badge #714
              Your message has been successfully submitted and would be delivered to recipients shortly.