Package cssutils :: Module script
[hide private]
[frames] | no frames]

Module script

source code

classes and functions used by cssutils scripts

Version: $Id: parse.py 1323 2008-07-06 18:13:57Z cthedot $

Classes [hide private]
  CSSCaptureHTMLParser
CSSCapture helper: Parse given data for link and style elements
  CSSCapture
Retrieve all CSS stylesheets including embedded for a given URL.
Functions [hide private]
 
csscombine(proxypath, sourceencoding=None, targetencoding='utf-8', minify=True)
Combine sheets referred to by @import rules in given CSS proxy sheet into a single new sheet.
source code
Variables [hide private]
  LINK = 0
  STYLE = 1
A (readonly) code defining the type of the value as defined above.

Imports: codecs, errno, HTMLParser, logging, os, sys, urllib2, urlparse, cssutils, encutils


Function Details [hide private]

csscombine(proxypath, sourceencoding=None, targetencoding='utf-8', minify=True)

source code 

Combine sheets referred to by @import rules in given CSS proxy sheet into a single new sheet.

Parameters:
  • proxypath - url or path to a CSSStyleSheet which imports other sheets which are then combined into one sheet
  • sourceencoding - encoding of the source sheets including the proxy sheet
  • targetencoding - encoding of the combined stylesheet, default 'utf-8'
  • minify - defines if the combined sheet should be minified, default True
Returns:
combined cssText, normal or minified