This program, maketidy.exe, is a very simple interface for running the Tidy HTML clean up program. I had decided to try Tidy to reformat web pages produced by the WYSIWYG editor NVU
(http://www.nvu.com) - this latter program, which is a development from Mozilla Composer,
shows promise as an easy to use web authoring tool, but currently it has a number of
problems with line wrapping, inserting blank lines in the code, and other reformatting
issues, so I now use Tidy after working on my pages.

Those of you who have looked at Tidy will realise it requires elaborate command line
options to do the very basic of functions, and the documentation, coming from the Open
Source community, seems somewhat buried in gobbledegook - that is not to disparage the
work of the Open Source community, who after all are doing a great job to show the world
there is life after MS.

This program is an easy to use interface to quickly tidy up pages. It sets the options to
defaults which I have found best for my own needs - line wrap at 110 characters, pretty
printing style with indents etc. You can change the settings to your preferences by editing
the config.txt file, but of course you will need to read the manual to do that!

First step is to obtain Tidy from http://tidy.sourceforge.net. You will be looking
for the Windows version (after all, this program is written for BBC Basic for Windows).
There are a couple of versions, best to get the one which includes the installer and manual.
This installer installs the package at C:\Program Files\Tidy - the executable tidy.exe is
for some reason installed in C:\Windows, but I have preferred to move it back to the Tidy
folder - it should work in either though.

maketidy.exe is an executable version of the BBC for Windows source and allows those programs
to be used by anyone without having to have purchased a licence for BBC for Windows. 
maketidy.bbc is the BBC Basic source code, included for those who have BBC Basic for Windows.
BBC Basic for Windows may be obtained from http://www.rtrussell.co.uk/.

Running the program is simple - simply click on maketidy.exe. It will prompt you for
a folder to store a backup of the files you are editing and where Tidy stores its error
files (which will have a name formed from the html file you are tidying so you can
identify them). It then asks for the folder where the html files to work on are and gives
you a directory of that folder. Enter the filename you want to tidy and it will tidy it -
there will be a brief flash of a DOS window when this happens.

This program is quick and very basic - no flashy Windows GUI interface, just does what
I wanted it to do, and it seems to do this well. Certainly nothing special as far as
programming goes and the source is only 29 lines of Basic.

Comments to me at dave@davesergeant.com
Dave Sergeant
16 March 2005
