tags:

views:

152

answers:

2

Does anyone here know of good batch file code indenters or beautifiers?

Specifically for PHP, JS and SGML-languages.

Preferably with options as to style.

+1  A: 

The following page has code on it to tidy Javascript (written in javascript as well):

http://www.howtocreate.co.uk/tutorials/jsexamples/JSTidy.html

There are various ways to tidy SGML based files (i.e. XML) - HTMLTidy will often do the trick, and there are various 'pretty print' implementations in various languages out there.

And finally a link to a web site with PHP code for pretty printing PHP: http://tobyinkster.co.uk/blog/2007/07/17/php-pretty-printer/

samjudson
+1  A: 

For HTML/XML HTML Tidy is the best option:

http://tidy.sourceforge.net/

Julio César