예제 #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