示例#1
0
class DownloadFromEmail(BaseSubstitution):
    """ Download from name
    """
    category = _(u'Download')
    description = _(u'Download from email')

    def safe_call(self):
        """ Safe call
        """
        return getattr(self.wrapper, 'from_email', '')
示例#2
0
class DownloadType(BaseSubstitution):
    """ Download from name
    """
    category = _(u'Download')
    description = _(u'Download type')

    def safe_call(self):
        """ Safe call
        """
        return getattr(self.wrapper, 'etype', 'pdf').upper()
示例#3
0
class DownloadTitle(BaseSubstitution):
    """ Download title substitution
    """
    category = _(u'Download')
    description = _(u'Download title')

    def safe_call(self):
        """ Safe call
        """
        return getattr(self.wrapper, 'title', '')
示例#4
0
class DownloadError(BaseSubstitution):
    """ Download error
    """
    category = _(u'Download')
    description = _(u'Download error')

    def safe_call(self):
        """ Safe call
        """
        return getattr(self.wrapper, 'error', '')
示例#5
0
class DownloadCameFromUrl(BaseSubstitution):
    """ Download email substitution
    """
    category = _(u'Download')
    description = _(u'Download came from URL')

    def safe_call(self):
        """ Safe call
        """
        return getattr(self.wrapper, 'url', '')
示例#6
0
class DownloadEmail(BaseSubstitution):
    """ Download email substitution
    """
    category = _(u'Download')
    description = _(u'Download e-mail')

    def safe_call(self):
        """ Safe call
        """
        return getattr(self.wrapper, 'email', '')
示例#7
0
class IAsyncJob(Interface):
    """ Asynchronous job
    """
    toclean = schema.List(
        title=_(u"List of absolute file paths on disk to be cleaned up"),
        value_type=schema.TextLine(title=_(u"Absolute file path on disk")))

    path = schema.TextLine(title=_(u"Output file path on disk"))

    dependencies = schema.List(
        title=_(u"List of jobs to be ran as dependencies to this job"),
        value_type=schema.Object(title=_(u"IAsyncJob job"), schema=Interface))

    def cleanup():
        """ Cleanup temporary files on disk
        """

    def run():
        """ Run job
示例#8
0
 def header(self):
     """ Header
     """
     contents_translate = _(u"Contents")
     return contents_translate
示例#9
0
 def header(self):
     """ Header
     """
     contents_translate = _(u"Contents")
     return contents_translate