"Fossies" - the Fresh Open Source Software Archive

Member "sitecrunch_1.0/README.txt" (26 Sep 2010, 3552 Bytes) of package /linux/www/sitecrunch_1.0.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 ###   Site Crunch   ###
    2 
    3 # Copyright 2010 CIRT, Inc.
    4 # Author: Chris Sullo / sullo@cirt.net
    5 # http://cirt.net/SiteCrunch
    6 
    7 # License: http://www.opensource.org/licenses/rpl1.5.txt
    8 # All software distributed under the RPL is provided strictly on an "AS
    9 # IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND
   10 # LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
   11 # LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
   12 # PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RPL for specific
   13 # language governing rights and limitations under the RPL.
   14 
   15 * What is Site Crunch?
   16 A while ago I had a discussion with Billy Hoffman of Zoompf! about optimizing web site files in an automated manner on unix systems. I wrote a quick script to wrap some intelligence around a few common programs, and Site Crunch was born. Since then, it's gotten a bit more polished and easier to use, but the fundamental program hasn't changed.
   17 
   18 * How does it work?
   19 Site Crunch uses freely available software to compress or optimize a site's content. It does this by calling these programs on files it can handle (JPG, PNG, CSS, HTML and JavaScript) and outputting them in a more optimized form.
   20 
   21 * Is it safe?
   22 Mostly. It is highly recommended that you run Site Crunch in a development or test environment. It is also recommended that you output to a new directory and not replace your source files. See the end of this document for known bugs or problems before running. That's pretty important, so I'm going to repeat: it is highly recommended that you run Site Crunch in a development or test environment.
   23 
   24 * How much smaller will files be?
   25 This depends on a lot of factors, and certainly there are many ways not covered here. In testing, the average compression seems to be around 10% without any noticable difference in image appearance or site operation.
   26 
   27 * Usage
   28         -checksetup     Check for required components
   29         -dir+*          directory to start in
   30         -htmltidy       run Tidy against HTML files
   31         -logfile+       flog file
   32         -mirror+        mirror start directory to here (*all* files copied)
   33         -skipregex+     don't process files/dirs that match this regex
   34         -type+          type of file to process (or csv list) (jpg/png/css/htm/js or all)
   35 
   36         + requires value
   37         * required option
   38         
   39 *Requirements
   40 	* Runs on unix only
   41 	* pngout
   42 	* jpegtran
   43 	* Perl
   44 	* Perl module: JavaScript::Minifier
   45 	* Perl module: CSS::Minifier
   46 	* Perl module: HTML::Clean
   47 	* Perl module: File::Find
   48 	* Perl module: File::Copy::Recursive
   49 
   50 * Customization
   51 For PNG and JPG, custom options can be specified inside the site_crunch.pl program, on these lines:
   52 	$PROG{'png'}->{'options'} = "";
   53 	$PROG{'jpg'}->{'options'} = "-copy none -progressive -outfile *INFILE*";
   54 	Note: *INFILE* will be replaced as appropriate.
   55 
   56 If you wish to change the options to HTML::Tidy, JavaScript::Minifier, CSS:Minifier or HTML::Clean, 
   57 they are specified elsewhere in the program.
   58 
   59 If you make options changes which result in smaller files, please email the author!
   60 
   61 * Bugs/Problems/Limitations
   62 	* HTML Tidy may actually create larger files because it also attempts to fix validation errors.
   63 	* HTML Tidy may not handle UTF8 encoded files properly--this appears to be a module bug.
   64 	* JavaScript::Minifier sometimes dies on certain .js files, often in a Wordpress install (unfixed)
   65 	* There is no GIF support. Convert GIFs to PNG.
   66 
   67 * License
   68 This code is licensed under the Reciprocal Public License (RPL) 1.5.