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

RE: [Clip] Optimizing HTML Files With NoteTab +/- 42%

Expand Messages
  • Corl DeLuna
    Hi Axel, I almost missed that, thanks for the heads up. I also removed ^!Replace
    Message 1 of 19 , Mar 10, 2007
    • 0 Attachment
      Hi Axel,

      I almost missed that, thanks for the heads up.

      I also removed
      ^!Replace "> <" >> "><" ACIWS

      Oddly this did change the rendering in IE. The entire body colapsed by about
      5-10px subtly changing the whole look we designed.

      Now Don's clip reads:

      ;following line should remove all comments in html document
      ^!Replace "<!-- .* -->" >> "" ACIWRS
      ;should remove all returns
      ^!Replace "^P" >> " " ACIWS
      ;should remove all tabs
      ^!Replace "^T" >> "" ACIWS
      ;should remove all double spaces
      ^!Replace "\s+" >> " " ACIWRS

      Corl

      ________________________________

      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf
      Of Axel Berger
      Sent: Friday, March 09, 2007 6:37 PM
      To: ntb-clips@yahoogroups.com
      Subject: Re: [Clip] Optimizing HTML Files With NoteTab +/- 42%



      Corl DeLuna wrote:
      > >The second replace should better be:
      > ^!Replace "^P" >> " " ACIWS

      As Mark explained a linefeed is treated exactly like a space in rendering.
      That space will get lost.
    • Axel Berger
      ... Within the limits of my capabilities I was right. After some discussion in the HTML list I needed to make over my old files too, so these hours were not
      Message 2 of 19 , Mar 11, 2007
      • 0 Attachment
        "Don - HtmlFixIt.com" wrote:
        > Extending it to all files in a directory shouldn't be too tough.

        Axel Berger wrote:
        > IMHO this is the bigger part of the task.

        Within the limits of my capabilities I was right. After some discussion
        in the HTML list I needed to make over my old files too, so these hours
        were not spent just for you, Corl. And thanks everyone for giving me the
        idea to use a clip that way in the first place. The following clip works
        for me (correct line breaks as always). N.B: If all files reside in
        subdirectories you may need to add a dummy file fulfilling the spec into
        the directory above them, or the fileselector won't work.

        -------------------------------------------------------------------
        H="Modify Files"
        ; Adapt this part to the task in hand
        ^!Set %varFIL%="C:\DOWNLOAD\ARCOR\Bilder\Is-05\home.html"
        ^!Set %varPAT%="index.html"
        ; End of invidual adaptation


        ^!SetWizardLabel "Please define the files to be converted"
        ;^!SetDebug On
        ^!Set %varFIL%=^?{(T=O;F="Source
        Files|*.html;*.htm;*.?html;*.xml;*asp;*.css;*.php;*.php3;*.php4")Sample
        file=^%varFIL%}; %varSDR%=^?{(T=L)Include Subdirectories?==_Yes|No};
        %varPAT%=^?{Search Pattern=^%varPAT%}
        ^!Set %varPTH%=^$GetPath(^%varFIL%)$
        ^!If "^%varSDR%"="Yes" yessub ELSE nosub
        :yessub
        ^!Set %varFIL%=^$GetFileFirst("+^%varPTH%";"^%varPAT%")$
        ^!Goto loop
        :nosub
        ^!Set %varFIL%=^$GetFileFirst("^%varPTH%";"^%varPAT%")$
        :loop
        ^!IfTrue ^$IsEmpty(^%varFIL%)$ finished
        ^!Continue ^%varFIL%
        ^!Open "^%varFIL%"

        ; Adapt this part to the task in hand
        ;^!Replace "" >> "" WAS

        ^!Replace "" >> "" WAS
        ^!Replace "" >> "" WAS
        ^!Replace "" >> "" WAS

        ; End of invidual adaptation

        ^!Close ALL,SAVE
        ^!Set %varFIL%=^$GetFileNext$
        ^!Goto loop
        :finished
        ^!CloseFileFind

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

        Axel
      Your message has been successfully submitted and would be delivered to recipients shortly.