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

666[Clip] Re: Neoplanet Channels to HTML

Expand Messages
  • Jody
    Jun 28, 1999
    • 0 Attachment
      Hi Terry,

      > I've been using NetTab Pro for about a year and I love it. Now
      > it's about time I got down to making use of the power of the
      > Clipbook!

      Better late than never - what took you so long. <bg>

      > I often want to run a macro (a Clip in this case) on a text
      > file to extract certain details from it or to rearrange it.

      This is one of many ways to do it. It requires you make a copy of
      your original manually, because it formats the document itself. I
      started to put it in a bunch of variables and appending, but saw
      that it was more work than what it was worth.

      Because of text being added to the file it is hard to determine
      if you are at the end of the document. The script will end when
      it does not find anymore "~PU:"'s. (OK, so the method stinks,
      but it should work. <g>) I only had what you gave to work with
      and assumed the rest of it would look the same with perhaps a
      different amount of links in them.

      You will need to edit the clip for the html format you want. You
      can certainly add the code for the bare page, save it, and go
      right into a launch. Later, once you get everything the way you
      like it you can just click the clip and go to lunch while it is
      formatted, saved and uploads using a Ws_Ftp commandline, closes
      the file and Ws_Ftp which ran in the background. :)

      You might want to put a ^%nl% in front of <H2>^%Line%</H2><BR>^%nl%
      in the first loop.

      H=NeoPlanet
      ^!SetHintInfo Formatting...
      ^!SetScreenUpdate Off
      ^!Jump 1

      :Loop1
      ^!Find "~CH:" S
      ^!IfError Loop2a
      ^!Toolbar Cut
      ^!Set %Line%=^$GetLine$
      ^!DeleteLine
      <H2>^%Line%</H2><BR>^%nl%
      ^!Goto Loop1

      :Loop2a
      ^!Jump 1
      :Loop2b
      ^!Find "~FO:" S
      ^!IfError Loop3a
      ^!ToolBar Cut
      ^!Set %Line%=^$GetLine$
      ^!DeleteLine
      <H3>^%Line%</H3><P>^%nl%^%nl%
      ^!Goto Loop2b

      :Loop3a
      ^!Jump 1
      :Loop3b
      ^!Find "~PN:" S
      ^!ToolBar Cut
      ^!Set %Description%=^$GetLine$
      ^!DeleteLine

      ^!Find "~PU:" S
      ^!IfError Jump1
      ^!ToolBar Cut
      ^!Set %Link%=^$GetLine$
      ^!DeleteLine
      <A HREF="^%Link%">^%Description%</A><BR>^%nl%
      ^!Goto Loop3b

      :Jump1
      ^!Jump 1


      >~CH:New York Resources
      >~FO:Guides
      >~PN:NY Sidewalk
      >~PU:http://newyork.sidewalk.com/
      >~PN:CitySearch NYC
      >~PU:http://newyork.citysearch.com/
      >~PN:Papermag
      >~PU:http://www.papermag.com/guide/guide.html
      >~PN:Yahoo NY
      >~PU:http://ny.yahoo.com/

      This was the output with two of the above pasted in a new doc,
      hence the duplicate:

      <H2>New York Resources</H2><BR>
      <H3>Guides</H3><P>

      <A HREF="http://newyork.sidewalk.com/">NY Sidewalk</A><BR>
      <A HREF="http://newyork.citysearch.com/">CitySearch NYC</A><BR>
      <A HREF="http://www.papermag.com/guide/guide.html">Papermag</A><BR>
      <A HREF="http://ny.yahoo.com/">Yahoo NY</A><BR>


      <H2>New York Resources</H2><BR>
      <H3>Guides</H3><P>

      <A HREF="http://newyork.sidewalk.com/">NY Sidewalk</A><BR>
      <A HREF="http://newyork.citysearch.com/">CitySearch NYC</A><BR>
      <A HREF="http://www.papermag.com/guide/guide.html">Papermag</A><BR>
      <A HREF="http://ny.yahoo.com/">Yahoo NY</A><BR>

      Happy NoteTabbin',
      Jody Adair

      The NoteTabbers Assistant Page
      http://www.sureword.com/notetab
      NoteTab Home Page - Go Pro.....
      http://www.notetab.com

      ------------------------------------------------------------------------

      eGroups.com home: http://www.egroups.com/group/ntb-clips
      http://www.egroups.com - Simplifying group communications
    • Show all 4 messages in this topic