tidy.zip — tidy.exe release win32 2012-08-08
w3c tidy-html5 experimental, license
XHTML 1.0 Transitional Batch Files
HTML 4.01 Transitional Batch Files
HTML Tidy documentation explains the settings in the files below. Two settings require mention. First, the batch files assume the input files use UTF-8 character encoding. Second, the newline option is set to save files in the Unix / Linux format.
Batch files for individual files can be run on files that also contain script, PHP, ASP, etc. However, the batch files for groups of files assume an HTML file extension.
tx.bat - When run, "tx filename," runs Tidy on the file.
@echo .
@echo .
@tidy --doctype html5 --output-xhtml yes --char-encoding utf8 --newline lf --clean yes --indent auto --tidy-mark no --wrap 0 --write-back yes %1
txall.bat - When run, "txall," runs Tidy on all HTML files in the active directory and its subdirectories.
for /f "tokens=*" %%a in ('dir /b /s *.html') do tidy --doctype html5 --output-xhtml yes --char-encoding utf8 --newline lf --clean yes --indent auto --tidy-mark no --wrap 0 --write-back yes "%%a" | echo file: %%a
@echo .
@echo .
@dir *.html /o:d
th.bat - When run, "th filename," runs Tidy on the file.
@echo .
@echo .
@tidy --doctype html5 --output-html yes --char-encoding utf8 --newline lf --clean yes --indent auto --tidy-mark no --wrap 0 --write-back yes %1
thall.bat - When run, "thall," runs Tidy on all HTML files in the active directory and its subdirectories.
for /f "tokens=*" %%a in ('dir /b /s *.html') do tidy --doctype html5 --output-html yes --char-encoding utf8 --newline lf --clean yes --indent auto --tidy-mark no --wrap 0 --write-back yes "%%a" | echo file: %%a
@echo .
@echo .
@dir *.html /o:d
ts.bat - When run, "ts filename," runs Tidy on the file.
@echo .
@echo .
@tidy --doctype strict --output-xhtml yes --char-encoding utf8 --newline lf --clean yes --indent auto --tidy-mark no --wrap 0 --write-back yes %1
tsall.bat - When run, "tsall," runs Tidy on all HTML files in the active directory and its subdirectories.
for /f "tokens=*" %%a in ('dir /b /s *.html') do tidy --doctype strict --output-xhtml yes --char-encoding utf8 --newline lf --clean yes --indent auto --tidy-mark no --wrap 0 --write-back yes "%%a" | echo file: %%a
@echo .
@echo .
@dir *.html /o:d
tt.bat - When run, "tt filename," runs Tidy on the file.
@echo .
@echo .
@tidy --doctype loose --output-xhtml yes --char-encoding utf8 --newline lf --clean yes --indent auto --tidy-mark no --wrap 0 --write-back yes %1
ttall.bat - When run, "ttall," runs Tidy on all HTML files in the active directory and its subdirectories.
for /f "tokens=*" %%a in ('dir /b /s *.html') do tidy --doctype loose --output-xhtml yes --char-encoding utf8 --newline lf --clean yes --indent auto --tidy-mark no --wrap 0 --write-back yes "%%a" | echo file: %%a
@echo .
@echo .
@dir *.html /o:d
t4.bat - When run, "t4 filename," runs Tidy on the file.
@echo .
@echo .
@tidy --doctype loose --output-html yes --char-encoding utf8 --newline lf --clean yes --indent auto --tidy-mark no --wrap 0 --write-back yes %1
t4all.bat - When run, "t4all," runs Tidy on all HTML files in the active directory and its subdirectories.
for /f "tokens=*" %%a in ('dir /b /s *.html') do tidy --doctype loose --output-html yes --char-encoding utf8 --newline lf --clean yes --indent auto --tidy-mark no --wrap 0 --write-back yes "%%a" | echo file: %%a
@echo .
@echo .
@dir *.html /o:d