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

14302Re: [Clip] Batch HTML Tidy

Expand Messages
  • Jeffery Scism
    Oct 6, 2005
    • 0 Attachment
      I had asked this question last year and have several clips (that I never
      got to work) that were sent to me.

      Here is the one I saved, but never got back to:


      ^!Continue Opens all files in a folder, Tidies HTML coding. Continue?

      ^!ClearVariables
      ^!Set %Folder%=^?{(T=D)&Browse: full path, end in
      backslash=^$GetValue(DirStuff:Browse)$}; %Drop%=^?{&Drop down: full
      path, end in backslash=_If used, Browse is ignored, may enter path
      manually^=1|^$GetValue(DirStuff:Path1)$|^$GetValue(DirStuff:Path2)$|^$GetValue(DirStuff:Path3)$|^$GetValue(DirStuff:Path4)$|^$GetValue(DirStuff:Path5)$|^$GetValue(DirStuff:Path6)$|^$GetValue(DirStuff:Path7)$|^$GetValue(DirStuff:Path8)$|^$GetValue(DirStuff:Path9)$};
      %Subs%=^?{Do su&bfolders=Yes^=+|_No^=}; %Type%=^?{(H=10)File &Types,
      wildcards OK: *.txt or *.*htm*;*.txt=All Files^=*.*|_Html
      Only^=*.*htm*|Text Only^=*.txt|Html &
      Text^=*.*htm*;*.txt|Outline^=*.otl|Clipbook Library^=*.clb|Ini^=*.ini};
      %Atrb%=^?{&Attributes, A: Archive, H: Hidden, R: Read-only, S:
      System=_All^=All|AHRS}; %Sort%=^?{&Sort
      order=Date|_Name|Size|Type|UnSorted}; %Rev%=^?{&Reverse sort
      order=Yes^=Rev|_No^=}; %FileCnt%=^?{Get &number of files only=Yes|_No}

      ^!SetHintInfo Opening Files...

      ; Checks to see if Browse or Drop was used
      ^!IfTrue ^%Drop% Skip
      ^!Set %Folder%=^%Drop%

      ^!SetListDelimiter ^p
      ^!SetArray
      %OpenList%=^$GetFiles("^%Subs%^%Folder%";^%Type%;^%Atrb%;^%Rev%^%Sort%)$
      ^!Set %Count%=^%OpenList0%
      ^!Set %Index%=0
      ^!Set %FileCount%=0

      :Loop
      ^!SetScreenUpdate Off
      ^!Inc %Index%
      ^!If ^%Index% > ^%Count% Stats
      ^!IfTrue ^%FileCnt% Skip
      ^!Open ^%OpenList^%Index%%

      ^!KEYBOARD Shift+Ctrl+H
      ^!Menu Tools/Tidy HTML Code 1000
      ^!CLOSE SAVE


      ^!Inc %FileCount%
      ^!Set %FileSize%=^$GetFileSize("^%OpenList^%Index%%")$
      ^!IfTrue ^%FirstPass% Skip_3
      ^!Set %TotalSize%=^$Calc((^%FileSize%+0)/1024)$
      ^!Set %FirstPass%=1
      ^!Goto Skip
      ^!Set %TotalSize%=^$Calc((^%FileSize%/1024+^%TotalSize%))$
      ^!Goto Loop

      :Stats
      ^!IfSame "^%Subs%" "+" Skip_2
      ^!Set %Subs%=No
      ^!Goto Skip
      ^!Set %Subs%=Yes
      ^!If ^%TotalSize% > 1023 Next else Skip_3
      ^!SetWizardTitle ~^$StrFill(" ";33)$http://www.notetab.net^$StrFill("
      ";33)$~
      ^!Info [L]Directory: ^%Folder%^pOpened subfolder(s): ^%Subs%^pFile
      Type(s): ^%Type%^pFile(s) opened: ^%FileCount%^pSorted by:
      ^%Sort%^%Rev%^pAttribute(s) set: ^%Atrb%^pTotal size:
      ^$Calc((^%TotalSize%0)/1024)$Mb^p
      ^!Goto End

      ^!SetWizardTitle ~^$StrFill(" ";33)$http://www.notetab.net^$StrFill("
      ";33)$~
      ^!Info [L]Directory: ^%Folder%^pOpened subfolder(s): ^%Subs%^pFile
      Type(s): ^%Type%^pFile(s) opened: ^%FileCount%^pSorted by:
      ^%Sort%^%Rev%^pAttribute(s) set: ^%Atrb%^pTotal size: ^%TotalSize%Kb^p


      ~~

      Jeffery G. Scism, IBSSG
      Local Coordinator Representative,
      NE/NC Region, USGenWeb Project

      http://usgenweb.org/





      xtx222003 wrote:

      >Hi-- Is there a way to run Tidy HTML on a folder of HTML files in
      >NoteTab? This way I could tidy an entire project, without having to
      >tidy each file individually? I read a post that suggested their was
      >one, and to ask here.
      >
      >
      >Thanks,
      >Corl
      >
      >
      >
      >
      >
      >
      >
      >
      >Fookes Software: http://www.fookes.us, http://www.fookes.com
      >Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
      >
      >Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
    • Show all 3 messages in this topic