Back to index

plone3  3.1.7
Classes | Functions | Variables
ResourceRegistries.tools.packer Namespace Reference

Classes

class  KeywordMapper
class  JavascriptKeywordMapper
class  Packer
class  JavascriptPacker
class  CSSPacker

Functions

def js_packer_callback
def css_packer_callback

Variables

tuple optparser = OptionParser()
string help = "Write output to FILE"

Function Documentation

def ResourceRegistries.tools.packer.css_packer_callback (   option,
  opt_str,
  value,
  parser,
  args,
  kwargs 
)

Definition at line 390 of file packer.py.

00390 
00391 def css_packer_callback(option, opt_str, value, parser, *args, **kwargs):
00392     if parser.values.javascript:
00393         raise OptionValueError("only one packer can be used at once")
00394     parser.values.css = True
00395 
00396 optparser.add_option("-c", "--css", action="callback",
00397                      dest="css", callback=css_packer_callback,
00398                      help="Force to use css packer")
00399 
00400 optparser.add_option("-l", "--level", dest="level", default="safe",
00401                      help="Declare which level of packing to use (safe, full), default is 'safe'")
00402 
00403 optparser.add_option("-e", "--encode", action="store_true", dest="encode",
00404                      help="Encode keywords (only javascript)")
00405 
00406 
00407 # be aware that the initial indentation gets removed in the following tests,
# the inner indentation is preserved though (see textwrap.dedent)

Here is the call graph for this function:

def ResourceRegistries.tools.packer.js_packer_callback (   option,
  opt_str,
  value,
  parser,
  args,
  kwargs 
)

Definition at line 381 of file packer.py.

00381 
00382 def js_packer_callback(option, opt_str, value, parser, *args, **kwargs):
00383     if parser.values.css:
00384         raise OptionValueError("only one packer can be used at once")
00385     parser.values.javascript = True
00386 
00387 optparser.add_option("-j", "--javascript", action="callback",
00388                      dest="javascript", callback=js_packer_callback,
00389                      help="Force to use javascript packer")


Variable Documentation

string ResourceRegistries.tools.packer.help = "Write output to FILE"

Definition at line 376 of file packer.py.

Definition at line 373 of file packer.py.