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

Re: [Clip] Re: concatenating html files

Expand Messages
  • Mike Breiding - Morgantown WV
    ... Ah, yes - good old hindsight! Thanks, Axel. -Mike
    Message 1 of 16 , Aug 23 8:26 AM
    • 0 Attachment
      Axel Berger wrote:
      > Mike Breiding - Morgantown WV wrote:
      > > But, if I do that then every link which refers to the folder
      > > name will break.
      >
      > That's what advance planning is for. Luckily you have NoteTab and a mass
      > replace through hundreds of files with links is made easy, BUT you'll
      > then have to accomodate all your guest with bookmarks and external
      > links. See:
      >
      > http://www.w3.org/Provider/Style/URI
      > http://www.useit.com/alertbox/981129.html
      > http://www.w3.org/QA/Tips/uri-choose
      > http://www.w3.org/QA/Tips/uri-manage
      > http://www.w3.org/QA/Tips/reback.html
      >
      > and most importantly:
      > http://httpd.apache.org/docs/2.1/en/mod/mod_alias.html#redirect
      >
      > How do I know all this? Well I too know afterwards, what I should better
      > have done before, don't I?

      Ah, yes - good old hindsight!
      Thanks, Axel.
      -Mike
      >
      > Axel
    • Mike Breiding - Morgantown WV
      ... Ooops! How could that be? Day 1 is in the page title and there is no Day 1 in the header. So, that cannot be the reason for the duplication. -Mike
      Message 2 of 16 , Aug 23 8:33 AM
      • 0 Attachment
        Mike Breiding - Morgantown WV wrote:

        > 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


        Ooops!
        How could that be?
        "Day 1" is in the page title and there is no "Day 1" in the header.
        So, that cannot be the reason for the duplication.
        -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%
        >>
        >>
        >
        >
        > ------------------------------------
        >
        > Fookes Software: http://www.fookes.com/
        > NoteTab website: http://www.notetab.com/
        > NoteTab Discussion Lists: http://www.notetab.com/groups.php
        >
        > ***
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
      • diodeom
        ... I added the title **** Day ^%i% ****^p just to emphasize the separations between the concatenated text. This fragment has little to do with what s in
        Message 3 of 16 , Aug 23 8:57 AM
        • 0 Attachment
          Mike Breiding - Morgantown WV <mike@...> wrote:
          >
          > Ooops!
          > How could that be?
          > "Day 1" is in the page title and there is no "Day 1" in the header.
          > So, that cannot be the reason for the duplication.
          > -Mike
          >

          I added the title "**** Day ^%i% ****^p" just to emphasize the separations between the concatenated text. This fragment has little to do with what's in your index.php files. It reflects the number of the subfolder containing index.php from which the subsequent proper ^%txt% is being slurped. The variable %i% simply counts from 1 to hoverer many subfolders you have in the target folder, provided that they are indeed named D1, D2, D3, etc.

          It looks like all you want instead in the clip line in question is:

          ^!InsertText ^%txt%^p^p
        • Mike Breiding - Morgantown WV
          ... Thanks for clearing that up for me. After looking over the line in combo with you explanation I think I see what is happening. I see now the duplicate text
          Message 4 of 16 , Aug 23 10:04 AM
          • 0 Attachment
            diodeom wrote:
            > Mike Breiding - Morgantown WV <mike@...> wrote:
            > >
            > > Ooops! How could that be?
            > > "Day 1" is in the page title and there is no "Day 1" in the header.
            > > So, that cannot be the reason for the duplication. -Mike
            > >
            >
            > I added the title "**** Day ^%i% ****^p" just to emphasize the
            > separations between the concatenated text. This fragment has little to
            > do with what's in your index.php files. It reflects the number of the
            > subfolder containing index.php from which the subsequent proper ^%txt%
            > is being slurped. The variable %i% simply counts from 1 to hoverer many
            > subfolders you have in the target folder, provided that they are indeed
            > named D1, D2, D3, etc.
            >
            > It looks like all you want instead in the clip line in question is:
            >
            > ^!InsertText ^%txt%^p^p

            Thanks for clearing that up for me. After looking over the line in combo
            with you explanation I think I see what is happening.

            I see now the duplicate text if from the Title and then the header
            paragraph which is not part of the PHP include.

            Why is <?php include("../title_mich_ca_index.php"); ?> being grabbed but
            not <?php include("../header_mich_ca_index.php"); ?>
            One is in the Document and HEAD and the other in the BODY. Is that why?

            This is getting off-topic so I will stop now.

            Thanks again. This will help me a lot when I do a final proof reading.

            -Mike
          • diodeom
            ... It could make sense to paste the whole shebang unaltered at first for easy and useful tag manipulations (cleaning or extracting for reuse, depending on
            Message 5 of 16 , Aug 23 10:52 AM
            • 0 Attachment
              Mike Breiding - Morgantown WV <mike@...> wrote:
              >
              > I see now the duplicate text if from the Title and then the header
              > paragraph which is not part of the PHP include.
              >
              > Why is <?php include("../title_mich_ca_index.php"); ?> being grabbed but (...)
              >


              It could make sense to paste the whole shebang unaltered at first for easy and useful tag manipulations (cleaning or extracting for reuse, depending on your objectives) and strip them later at once. Should you decide to try it, just kill ^!Set %txt%=^$StrStripHTML("^%txt%";0)$. Afterward Shift+Ctrl+T (issued either manually or from the clip) should address the php remnants as well.
            • Mike Breiding - Morgantown WV
              ... Cool. Sounds like a good way to go for final clean-up. Thanks, -Mike
              Message 6 of 16 , Aug 23 11:01 AM
              • 0 Attachment
                diodeom wrote:

                > Mike Breiding - Morgantown WV <mike@...> wrote:
                > >
                > > I see now the duplicate text if from the Title and then the header
                > > paragraph which is not part of the PHP include.
                > >
                > > Why is <?php include("../title_mich_ca_index.php"); ?> being grabbed
                > but (...)
                > >
                >
                > It could make sense to paste the whole shebang unaltered at first for
                > easy and useful tag manipulations (cleaning or extracting for reuse,
                > depending on your objectives) and strip them later at once. Should you
                > decide to try it, just kill ^!Set %txt%=^$StrStripHTML("^%txt%";0)$.
                > Afterward Shift+Ctrl+T (issued either manually or from the clip) should
                > address the php remnants as well.

                Cool. Sounds like a good way to go for final clean-up.

                Thanks,
                -Mike
              • Mike Breiding - Morgantown WV
                ... Tried that. Still left the PHP include in the headers. No big deal. S&R took care of it quick. -mb
                Message 7 of 16 , Aug 23 1:06 PM
                • 0 Attachment
                  diodeom wrote:
                  > Mike Breiding - Morgantown WV <mike@...> wrote:
                  > >
                  > > I see now the duplicate text if from the Title and then the header
                  > > paragraph which is not part of the PHP include.
                  > >
                  > > Why is <?php include("../title_mich_ca_index.php"); ?> being grabbed
                  > but (...)
                  > >
                  >
                  > It could make sense to paste the whole shebang unaltered at first for
                  > easy and useful tag manipulations (cleaning or extracting for reuse,
                  > depending on your objectives) and strip them later at once. Should you
                  > decide to try it, just kill ^!Set %txt%=^$StrStripHTML("^%txt%";0)$.
                  > Afterward Shift+Ctrl+T (issued either manually or from the clip) should
                  > address the php remnants as well.

                  Tried that. Still left the PHP include in the headers.
                  No big deal. S&R took care of it quick.
                  -mb
                Your message has been successfully submitted and would be delivered to recipients shortly.