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

[NH] Reformat Table Cells

Expand Messages
  • Jody
    Hi All, Here is a short Clip I made for somebody that you may be able to use. The table was 3 cells wide and very many deep. It goes like this:
    Message 1 of 4 , Feb 12, 2000
    • 0 Attachment
      Hi All,

      Here is a short Clip I made for somebody that you may be able
      to use. The table was 3 cells wide and very many deep. It
      goes like this:

      <TR>
      <TD ALIGN="left">Cell 1</TD>
      <TD ALIGN="left">Cell 2</TD>
      <TD ALIGN="center">Cell 3</TD>
      </TR>

      What the Clip does is swap the data in Cell 1 with Cell 2. What
      Martha, who has posted here before and has the geology site, did,
      or will do with it is make a second page with the swamped version.
      This particular page was marriage records. So, she wanted to have
      the woman's name in the first cell instead of the man's for a
      primitive way of sorting so to speak.

      <--- Copy below this line --->
      H=ReFormat Table (2cell)
      ; Last Updated 02/12/2000, Sojourner@..., jody
      ^!SetHintInfo Reformatting...
      ^!SetScreenUpdate Off
      ^!Jump 1

      :Loop
      ^!Find " <TD ALIGN="left">" S
      ^!IfError End
      ^!Jump Select_End
      ^!Set %Start1%=^$GetRow$:^$GetCol$
      ^!Find "</TD>" S
      ^!Jump Select_Start
      ^!SelectTo ^%Start1%
      ^!Toolbar Cut
      ^!Set %1stTag%=^$GetClipboard$
      ^!Find " <TD ALIGN="left">" S
      ^!Jump Select_End
      ^!Set %Start2%=^$GetRow$:^$GetCol$
      ^!Find "</TD>" S
      ^!Jump Select_Start
      ^!SelectTo ^%Start2%
      ^!Set %2ndTag%=^$GetSelection$
      ^!InsertText ^%1stTag%
      ^!SetCursor ^%Start1%
      ^!InsertText ^%2ndTag%
      ^!Jump +3
      ^!Goto Loop

      <--- Copy above this line, right --->
      <--- click over the Clipbook and --->
      <--- choose "Add from Clipboard" --->

      nite all...

      Happy HTML'n!
      Jody

      http://www.sureword.com/notetab

      The NoteTab and Html List...
      mailto:Ntb-html-Subscribe@...
      mailto:Ntb-html-UnSubscribe@...
    • Wayne VanWeerthuizen
      ... I don t like writing clips for very specialized tasks, unless the clips are very short, and I know the task will be repeated many times. For tasks I
      Message 2 of 4 , Feb 13, 2000
      • 0 Attachment
        Jody <KJB1611@...> wrote:

        >Here is a short Clip I made for somebody that you may be able
        >to use. The table was 3 cells wide and very many deep. It
        >goes like this:
        >
        ><TR>
        > <TD ALIGN="left">Cell 1</TD>
        > <TD ALIGN="left">Cell 2</TD>
        > <TD ALIGN="center">Cell 3</TD>
        ></TR>
        >
        >What the Clip does is swap the data in Cell 1 with Cell 2. What
        >Martha, who has posted here before and has the geology site, did,
        >or will do with it is make a second page with the swamped version.
        >This particular page was marriage records. So, she wanted to have
        >the woman's name in the first cell instead of the man's for a
        >primitive way of sorting so to speak.

        I don't like writing clips for very specialized tasks, unless the
        clips are very short, and I know the task will be repeated many
        times. For tasks I believe I will only need to perform once or
        twice, I prefer a more general tool, which provides the power to
        do what I need, although it may require several steps.

        Just to make sure everyone knows, my clipbook NoteAwk is capable
        of helping with tasks like Jody describes above. Although the
        process would take several steps, using NoteAwk should be much
        faster and easier than writing and debugging a clip.

        For the above task, the basic strategy would be to combine
        everything between each <TR> and </TR> pair into one line,
        insert tabs after > and before <, use NoteAwk's "Rearrange Fields"
        clip to change the order of the tab separated fields. Then reverse
        the previous steps to remove the tabs and resplit the lines.

        (I'll give more specific step-by-step instructions if anyone
        requests it.)

        While this is not as simple as I'd like, I still believe it
        is the best option for many people. Someone of average intelligence,
        who is familiar with NoteTab's basic features and who has taken
        the time to learn and experiment with NoteAwk's features, should be
        able to perform tasks like the above in just a few minutes. (You
        do not have to be familiar with gawk, Perl, or clip programming to
        use NoteAwk. It is all controlled by wizards. And although, NoteAwk
        is more powerful if you understand and use regular expressions with
        it, knowledge of regular expressions is not actually required.)

        NoteAwk is available from:

        http://landru.myhome.net/wayne/notetab.html

        A new version is planned, but will not be ready for awhile.
        Also, I am always looking for advice on how to make NoteAwk
        easier to understand and use. (But I don't want to sacrifice
        it's power.) If anyone has any suggestions for improvements,
        I'd be very happy to consider them.


        --
        Wayne M. VanWeerthuizen
        Homepage: http://landru.myhome.net/wayne
      • Martha Hambrick Harrell
        Wayne, Sounds very promising for what I want to do. I have used the varied versions of the clip Jody was talking about several times already but if there s a
        Message 3 of 4 , Feb 14, 2000
        • 0 Attachment
          Wayne,

          Sounds very promising for what I want to do. I have used the varied
          versions of the clip Jody was talking about several times already but if
          there's a faster way to do it, I'd certainly be open to it. However, am
          just baaarely on the HTML bandwagon, not knowing one thing about it until
          about three or four months ago.

          I've seen references on the NoteTab site as well as some of these lists to
          your NoteAwk but do not even know what that is yet... figured I'd best try
          to learn one thing at a time. If you'd like to view the site that I've
          "adopted" it is: www.rootsweb.com/~arprairi/

          Maybe you could you explain a little more about what NoteAwk might be able
          to do to help me. Feel free to make any suggestions. Right now I'm just
          trying to get the data out there; I know the actual pages themselves all
          need a makeover.

          The next projects I have are: a complete index of a 300-page cemetery book,
          a index of county death certificates, recorded marriages, and a Confederate
          Patriots index. All of these will be lengthy projects. The death
          certificates, marriages & Confederates index will all have notes. Any ideas
          will be appreciated.

          And, Jody, if you're reading this too, I think these would all definitely be
          a good place for that pop-up window. It took my computer 30 minutes to load
          all the files in the census but I didn't know any other way to do it at the
          time. Maybe I can re-do it a little farther down the road.

          Martha


          Wayne VanWeerthuizen wrote:

          > Jody <KJB1611@...> wrote:
          >
          > >Here is a short Clip I made for somebody that you may be able
          > >to use. The table was 3 cells wide and very many deep. It
          > >goes like this:
          > >
          > ><TR>
          > > <TD ALIGN="left">Cell 1</TD>
          > > <TD ALIGN="left">Cell 2</TD>
          > > <TD ALIGN="center">Cell 3</TD>
          > ></TR>
          > >
          > >What the Clip does is swap the data in Cell 1 with Cell 2. What
          > >Martha, who has posted here before and has the geology site, did,
          > >or will do with it is make a second page with the swamped version.
          > >This particular page was marriage records. So, she wanted to have
          > >the woman's name in the first cell instead of the man's for a
          > >primitive way of sorting so to speak.
          >
          > I don't like writing clips for very specialized tasks, unless the
          > clips are very short, and I know the task will be repeated many
          > times. For tasks I believe I will only need to perform once or
          > twice, I prefer a more general tool, which provides the power to
          > do what I need, although it may require several steps.
          >
          > Just to make sure everyone knows, my clipbook NoteAwk is capable
          > of helping with tasks like Jody describes above. Although the
          > process would take several steps, using NoteAwk should be much
          > faster and easier than writing and debugging a clip.
          >
          > For the above task, the basic strategy would be to combine
          > everything between each <TR> and </TR> pair into one line,
          > insert tabs after > and before <, use NoteAwk's "Rearrange Fields"
          > clip to change the order of the tab separated fields. Then reverse
          > the previous steps to remove the tabs and resplit the lines.
          >
          > (I'll give more specific step-by-step instructions if anyone
          > requests it.)
          >
          > While this is not as simple as I'd like, I still believe it
          > is the best option for many people. Someone of average intelligence,
          > who is familiar with NoteTab's basic features and who has taken
          > the time to learn and experiment with NoteAwk's features, should be
          > able to perform tasks like the above in just a few minutes. (You
          > do not have to be familiar with gawk, Perl, or clip programming to
          > use NoteAwk. It is all controlled by wizards. And although, NoteAwk
          > is more powerful if you understand and use regular expressions with
          > it, knowledge of regular expressions is not actually required.)
          >
          > NoteAwk is available from:
          >
          > http://landru.myhome.net/wayne/notetab.html
          >
          > A new version is planned, but will not be ready for awhile.
          > Also, I am always looking for advice on how to make NoteAwk
          > easier to understand and use. (But I don't want to sacrifice
          > it's power.) If anyone has any suggestions for improvements,
          > I'd be very happy to consider them.
          >
          > --
          > Wayne M. VanWeerthuizen
          > Homepage: http://landru.myhome.net/wayne
          >
          > ------------------------------------------------------------------------
          > Which First Lady would have made the best President? Share your opinion
          > with other eGroups members by voting now. Simply go to
          > http://click.egroups.com/1/1475/4/_/2799/_/950514662/
          >
          > -- Check out your group's private Chat room
          > -- http://www.egroups.com/ChatPage?listName=ntb-html&m=1
        • Jody
          Hi Martha, ... Faster? It did your whole very long table in a couple seconds here. Is that too slow for you? :-) I think you are referring to the time it
          Message 4 of 4 , Feb 14, 2000
          • 0 Attachment
            Hi Martha,

            >Sounds very promising for what I want to do. I have used the varied
            >versions of the clip Jody was talking about several times already but if
            >there's a faster way to do it,

            Faster? It did your whole very long table in a couple seconds here. Is that too slow for you? :-) I think you are referring to the time it takes to write the script though. Things like that one takes me about a minute with my Clip writing tools. It is just a matter of clicking a few buttons and filling in a few blanks.

            I don't know a lot about GAWK, too much of a learning curve for me to take the time to learn it, but it is quite powerful and Wayne has a good Library to use with it.

            I'm just a NoteTab junkie and if I can do it in NoteTab, that is where I'll do it. Maybe someday I'll have time for GAWK or PERL, but I don't see it in the near future.

            I'll get to your other post as soon as I can - it is one of your long winded ones. :-)

            Happy HTML'n!
            Jody

            http://www.sureword.com/notetab

            The NoteTab and Html List...
            mailto:Ntb-html-Subscribe@...
            mailto:Ntb-html-UnSubscribe@...
          Your message has been successfully submitted and would be delivered to recipients shortly.