Changeset 3666:01bc15821456 in livinglogic.python.xist

Show
Ignore:
Timestamp:
12/30/08 15:36:33 (11 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Remove XPIT (and its make support). Fix make.UL4RenderAction.

Files:
2 removed
4 modified

Legend:

Unmodified
Added
Removed
  • NEWS.rst

    r3665 r3666  
    2222*   Support for color objects has been added to UL4. 
    2323 
     24*   The XPIT templating language and :class:`ll.make.XPITAction`` have been 
     25    removed. 
     26 
    2427*   Fixed a bug in :meth:`ll.make.CacheAction.get`: The action must return real 
    2528    data when called with ``bigbang`` as the timestamp. 
     29 
     30*   :class:`ll.make.UL4RenderAction`` has been fixed. 
    2631 
    2732 
  • README.rst

    r3614 r3666  
    3333*   :mod:`ll.url` provides classes for parsing and constructing RFC 2396 
    3434    compliant URLs. 
    35  
    36 *   :mod:`ll.xpit` is a module that makes it possible to embed Python 
    37     expressions in text (as XML style processing instructions). 
    3835 
    3936*   :mod:`ll.ul4c` is compiler for a templating language with similar capabilities 
  • setup.py

    r3665 r3666  
    4545*   :mod:`ll.url` provides classes for parsing and constructing RFC 2396 
    4646    compliant URLs. 
    47  
    48 *   :mod:`ll.xpit` is a module that makes it possible to embed Python 
    49     expressions in text (as XML style processing instructions). 
    5047 
    5148*   :mod:`ll.ul4c` is compiler for a templating language with similar capabilities 
     
    9188Topic :: Internet :: WWW/HTTP :: Dynamic Content 
    9289Topic :: Text Processing :: General 
    93  
    94 # xpit 
    95 Topic :: Text Processing :: Filters 
    9690 
    9791# xml_codec 
     
    156150ssh 
    157151py.execnet 
    158  
    159 # xpit 
    160 text 
    161 template 
    162 processing instruction 
    163152 
    164153# xml_codec 
  • src/ll/make.py

    r3655 r3666  
    14191419 
    14201420 
    1421 class XPITAction(PipeAction): 
    1422     """ 
    1423     This action transform an input string via :mod:`ll.xpit`. 
    1424     """ 
    1425  
    1426     def __init__(self, input=None, nsinput=None): 
    1427         PipeAction.__init__(self, input) 
    1428         self.nsinput = nsinput 
    1429  
    1430     def addnsinput(self, input): 
    1431         """ 
    1432         Register :var:`input` as the namespace action. This action must return 
    1433         a namespace to be used in evaluating the input string from the normal 
    1434         input action. 
    1435         """ 
    1436         self.nsinput = input 
    1437         return self 
    1438  
    1439     def __iter__(self): 
    1440         for input in PipeAction.__iter__(self): 
    1441             yield input 
    1442         yield self.nsinput 
    1443  
    1444     def getkwargs(self): 
    1445         return dict(ns=self.nsinput, data=self.input) 
    1446  
    1447     def execute(self, project, ns, data): 
    1448         from ll import xpit 
    1449         globals = dict(makeaction=self, makeproject=project) 
    1450         project.writestep(self, "Converting XPIT input") 
    1451         return xpit.convert(data, globals, ns) 
    1452  
    1453  
    14541421class UL4CompileAction(PipeAction): 
    14551422    """ 
     
    14671434    This action renders a UL4 template to a string. 
    14681435    """ 
    1469     def __init__(self, input=None, templates={}, **vars): 
     1436    def __init__(self, input=None, **vars): 
    14701437        PipeAction.__init__(self, input) 
    1471         self.templates = templates 
    14721438        self.vars = vars 
    14731439 
     
    14751441        for input in PipeAction.__iter__(self): 
    14761442            yield input 
    1477         for input in self.templates.itervalues(): 
    1478             yield input 
    14791443        for input in self.vars.itervalues(): 
    14801444            yield input 
    14811445 
    14821446    def getargs(self): 
    1483         return (self.input, self.templates) 
     1447        return (self.input,) 
    14841448 
    14851449    def getkwargs(self): 
    14861450        return self.vars 
    14871451 
    1488     def execute(self, project, data, templates, **vars): 
     1452    def execute(self, project, data, **vars): 
    14891453        project.writestep(self, "Rendering UL4 template with ", len(self.opcodes), " opcodes") 
    1490         return data.renders(templates, **vars) 
     1454        return data.renders(**vars) 
    14911455 
    14921456