~ubuntu-branches/ubuntu/karmic/calibre/karmic

« back to all changes in this revision

Viewing changes to src/calibre/ebooks/oeb/transforms/manglecase.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-30 12:49:41 UTC
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20090730124941-kviipg9ypwgppulc
Tags: upstream-0.6.3+dfsg
ImportĀ upstreamĀ versionĀ 0.6.3+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
TEXT_TRANSFORMS = set(['capitalize', 'uppercase', 'lowercase'])
23
23
 
24
24
class CaseMangler(object):
25
 
    def transform(self, oeb, context):
 
25
    @classmethod
 
26
    def config(cls, cfg):
 
27
        return cfg
 
28
 
 
29
    @classmethod
 
30
    def generate(cls, opts):
 
31
        return cls()
 
32
    
 
33
    def __call__(self, oeb, context):
26
34
        oeb.logger.info('Applying case-transforming CSS...')
27
35
        self.oeb = oeb
28
36
        self.profile = context.source