Amper

Amper
  
            License: Freeware $0.00
            OS: Java,Linux,Mac OS X,Unix,Win2000,Win7 x32,Win7 x64,WinServer,WinVista,WinVista x
            Requirements: java 1.5+
            Publisher: Canadian Mind Products
            Homepage: http://mindprod.com
          

in the following, pretend ! is an ampersand. pad files don’t let me give literal examples. amper converts ! to !amp; in html files and back, but does not convert it when the ! is already in an entity e.g. !lt; !thetasym; !eacute;

the main use for this is to pass htmlvalidator verification of your html, which is very picky about !, especially inside urls.

as a side effect, it also ensures all your comment delimiters balance.

it does not change ! inside comments, though it will c-hange it inside href= and image= urls, or anywhere else e.g. java applet parameters, which is correct according to the htmlvalidator. it does _not_ change ” to !quot; or e’ to !eacute; it just fixes !, the most troublesome character.

to convert a single file, type:

java -jar c:\com\mindprod\amper\amper.jar myfile.html

the results replace the old file, so you had better make a backup just in case this is not what you want.

you can also list several files on the command line:

java -jar c:\com\mindprod\amper\amper.jar myfile.html c:\mydir\another.html

to use convert the current directory of html files:

java -jar c:\com\mindprod\amper\amper.jar .

sorry no wildcards, just . , and ..

don’t use wildcards unless you deeply understand how they work. windows expands them, not amper, and feeds them to amper (or any other program) as a giant list of all the directories and files in the
current directory. amper will thus tend process all the files in your directories, when you just meant to process the files in the current directory.

the -s switch makes all subsequent directories searched recursively to include all their subdirectories.

e.g.

java -jar c:\com\mindprod\amper\amper.jar -s e:\mindprod

will fix all *.html files in the mindprod directory tree, ignoring other types of files.

if you have the jar extension set up as executable, you can abbreviate:

c:\com\mindprod\amper\amper.jar .


Share this post