Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

compress and merge static files (css,js) in html files

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

PyCompressor

PyCompressor collect all css and js references in html files, merge and compress then, puting all static files in an specific bucket, filtering all js,css and images references in html to apply your bucket url.

Installation

Installing: pip install compressor

Usage

compressor -c compressor.yaml --color

compressor.yaml

# your files path
path:
  template: template
  css: media/css
  js: media/js

# compressor results path
output:
  template: compressor/template
  css: compressor/media/css
  js: compressor/media/js

# pattern to find tags in html code
pattern:
  css: ../media/css
  js: ../media/js
  img: ../media/img

# filter url tags
filter:
  url: 
    css: http://demo.pycompressor.com/media/css
    js: http://demo.pycompressor.com/media/js
    img: http://demo.pycompressor.com/media/img

Requirements

The following python libraries are required

  • PyYAML

Issues

Please report any issues via github issues

Something went wrong with that request. Please try again.