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

20979Re: [Clip] Re: concatenating html files

Expand Messages
  • Mike Breiding - Morgantown WV
    Aug 23 8:25 AM
    • 0 Attachment
      diodeom wrote:
      > Mike Breiding - Morgantown WV <mike@...> wrote:
      > >
      > > For some reason the clip is not concatenating the files in order.
      > > The folders are named d1 through d23
      > >
      > > In the output file the first text is from D1, the next is D10, then D12,
      > > etc.
      > > It seems since the folders do not have leading zeros it is not grabbing
      > > them in numbered sequence.
      > >
      > > Does this make sense? > Any solutions?
      > >
      > > It would also be handy to have a line in the clip to strip the HTML
      > > although this can be done quickly enough by using the Strip HTML button
      > > on the tool bar. Thanks,-Mike


      > You could try this approach:


      Hot dog! Beautiful!

      One question.
      Does this line:
      ^!InsertText **** Day ^%i% ****^p^%txt%^p^p
      Insert the Page Title text?
      The reason I ask is the title text is duplicated and I cannot see why.
      Here is what I am getting for each page:

      **** Day 1 ****
      <?php include("../title_mich_ca_index.php"); ?> DAY 1: Morgantown to
      Fort Wayne - slow and scenic
      Morgantown to Fort Wayne - slow and scenic

      **** Day 2 ****
      <?php include("../title_mich_ca_index.php"); ?> Day 2: Fort Wayne to
      Harrison Michigan: Wandering all over the place!
      Day 2: Fort Wayne to Harrison Michigan: Wandering all over the place!

      Wait - I think I just answered my own question!
      The Page Title and header have the same text beginning with "Day" so
      maybe that is why it shows up twice?
      It also showed me I omitted the "Day 1" in the header and I have looked
      at that page dozens of times and missed that!

      Thanks,
      -Mike

      >
      > ^!Menu File/New
      > ;Specify folder containing d1 - d?? subfolders
      > ^!Set %folder%="^?{(T=D)Directory==^%folder%}"
      > ^!Set %i%=0
      > :Loop
      > ^!Inc %i%
      > ^!Set %txt%=^$GetFileText(^%folder%d^%i%\index.php)$
      > ^!IfEmpty ^%txt% Done
      > ^!Set %txt%=^$StrStripHTML("^%txt%";0)$
      > ^!InsertText **** Day ^%i% ****^p^%txt%^p^p
      > ^!Goto Loop
      > :Done
      > ^!ClearVariable %folder%
      > ^!ClearVariable %i%
      > ^!ClearVariable %txt%
      >
      >
    • Show all 16 messages in this topic