Home | Scripts | Demo | About | Links

script: htmloptim (download)
purpose: optimize html file by reducing its size
requires: standard GNU commands, file
version: 1.2
usage: htmloptim [-vhlrdospbtm] [-c <n>] <file> [file...]
options:
 
     -r, replace the input file, default output is stdo
     -d, convert DOS to Unix endline (remove CR)
     -t, remove empty space between > and < (end and begin tag indicators)
     -o, put all html content on one line (remove LF)
     -s, remove leading spaces and tabs
     -p, remove trailing spaces and tabs
     -b, remove blank lines and lines containing only spaces or tabs
     -c <n>, compact text, fold text at line <n> width
     -v, verbose
     -m, manual
     -h, usage and options (help)
     -l, see this script"
manual:
 

DESCRIPTION

    htmloptim reduces the size of html file by optimizing its content. This is 
    done by removing unnecessary characters like spaces, tabs, line feeds or
    blank lines. 

    If the -r option is used, the optimized version will replace the original
    only if it is smaller. 

    Files with <pre> <listing> <plaintext> and <xmp> tags are skipped.
    To unoptimize a file, or to make it easily readable, use the tidy tool:
    tidy.sourgeforge.net