3 @set TMPEXE=..\..\..\build\cmake\Release\tidy5.exe
4 @if NOT EXIST %TMPEXE% goto NOEXE
5 @set TMPINP=temphtml4.cfg
9 @if ERRORLEVEL 1 goto NOEXE
11 @if EXIST %TMPDIR%\nul goto GOTOUT
12 @echo Will create the folder %TMPDIR% for output...
15 @if ERRORLEVEL 1 goto NOOUT
16 @if NOT EXIST %TMPDIR%\nul goto NODIR
19 @REM This option would be nice, but at present it is FARRRR TOOOOO agressive,
20 @REM dropping <html>, <body>, etc... because they are marked CM_OPT
21 @REM which causes WARNINGS when tidy is run on the tidied file!!!
22 @REM echo omit-optional-tags: yes >> %TMPINP%
24 @if EXIST %TMPINP% goto GOTINP
25 @echo Creating a CONFIG file %TMPINP%
27 @echo wrap: 99 > %TMPINP%
28 @echo tidy-mark: no >> %TMPINP%
29 @echo indent: yes >> %TMPINP%
30 @echo break-before-br: yes >> %TMPINP%
31 @echo indent-attributes: yes >> %TMPINP%
32 @echo vertical-space: yes >> %TMPINP%
33 @echo indent-spaces: 1 >> %TMPINP%
34 @echo indent-cdata: no >> %TMPINP%
35 @echo wrap-asp: no >> %TMPINP%
36 @echo wrap-attributes: no >> %TMPINP%
37 @echo wrap-jste: no >> %TMPINP%
38 @echo wrap-php: no >> %TMPINP%
39 @echo wrap-script-literals: no >> %TMPINP%
40 @echo wrap-sections: no >> %TMPINP%
41 @echo tab-size: 4 >> %TMPINP%
42 @echo show-info: no >> %TMPINP%
43 @echo doctype: html5 >> %TMPINP%
44 @if NOT EXIST %TMPINP% goto NOINP
50 @for %%i in (*4.html) do @(call :CNTIT %%i)
52 @echo Will process %TMPCNT1% files found, using the config file %TMPINP%, which contains a directive doctype: html5,
53 @echo forcing tidy5 to assume they are HTML5 files. All output is to %TMPDIR% folder...
55 @echo *** ALL *** should exit with WARNINGS and/or ERRORS, since they contain tags no longer used in HTML5
57 @echo *** CONTINUE? *** Only Ctlr+C aborts... all other keys continue...
62 @for %%i in (*4.html) do @(call :DOONE %%i)
65 @echo Done %TMPCNT2% files. See message and tidied output in the %TMPDIR% folder...
67 @if "%TMPCNT3%x" == "0x" (
68 @echo ALL exited With WARNINGS and/or ERRORS! This is a *** SUCCESS ***
70 @echo However have %TMPCNT3% with NO WARNINGS or ERRORS! This is a *** FAILURE ***
76 @if "%~1x" == "x" goto :EOF
81 @if "%~1x" == "x" goto :EOF
83 @echo %TMPCNT2% of %TMPCNT1%: %1
84 @set TMPOUT=%TMPDIR%\%~nx1
85 @set TMPMSG=%TMPOUT%.txt
87 @if EXIST %TMPOUT% @del %TMPOUT% > nul
88 @if EXIST %TMPMSG% @del %TMPMSG% > nul
90 @%TMPEXE% -f %TMPMSG% -config %TMPINP% -o %TMPOUT% %1
91 @if ERRORLEVEL 1 goto :EOF
93 @echo The test of %1 FAILED!
100 @echo Error: Unable to create %TMPDIR%!
105 @echo Unable to find/run exe %TMPEXE%! *** FIX ME ***
106 @echo Set the name of the 'tidy' executable to use...
110 @echo Error: Unable to create config file %TMPINP%!