Skip to content

Latest commit

 

History

History
39 lines (33 loc) · 1.31 KB

README.md

File metadata and controls

39 lines (33 loc) · 1.31 KB

Tool for Compressing Magento Sample Data

Why

Its kind of ridiculous having a sample data package that is 317MB in size, and since I couldn't find a good alternative source, I decided to hack together a little script to compress the hell out of the images and the MP3 files in the sample data archive.
My intention is that it can be downloaded faster and used more easily for quicker development.

How

This is accomplished with image quality setting of 40% and by removing all .mp3 files. The compression script in the src/ directory is intended to run on linux. Feel free to use and modify it, but be aware that you are doing so at your own risk!

Usage

Move a tarball of Magento sample data into the src directory of the repository. The first parameter of the script is either a url or filename.

./compress-sample-data.sh 1.14.2.1.tar.gz

Dependencies

ImageMagick
sudo apt-get install imagemagick
ImageOptim
sudo gem install image_optim image_optim_pack
ImageOptim Dependencies:
sudo apt-get install -y advancecomp gifsicle jhead jpegoptim libjpeg-progs optipng pngcrush pngquant
npm install -g svgo
PNG Out

Visit http://www.jonof.id.au/kenutils to download binary

Lame for compressing mp3s (if desired)

sudo apt-get install lame libmp3lame0