def __init__(self):
     TimeConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Time Of Day"),
         description=_("Full Specification of the Time of Day"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='alarm_clock',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-time-timeofday')
     self.plugin_panel = None
     self.timespec['hour'] = 0
     self.timespec['minute'] = 0
     self.summary_description = _("At midnight")
     self.forward_allowed = True
 def __init__(self):
     TimeConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Time Of Day"),
         description=_("Full Specification of the Time of Day"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='alarm_clock',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-time-timeofday')
     self.plugin_panel = None
     self.timespec['hour'] = 0
     self.timespec['minute'] = 0
     self.summary_description = _("At midnight")
     self.forward_allowed = True
    def __init__(self):
        TimeConditionPlugin.__init__(
            self,
            basename=plugin_name(__file__),
            name=_("Template"),
            description=_("Explain here what it does"),
            author="John Smith",
            copyright="Copyright (c) 2016",
            icon='puzzle',
            help_string=HELP,
            version="0.1.0",
        )
        # the icon resource is only needed if the plugin uses a custom icon
        # self.graphics.append('plugin_icon.png')

        # the items below might be not needed and can be deleted if the
        # plugin does not have a configuration panel
        self.resources.append('plugin_template.glade')
        self.builder = self.get_dialog('plugin_template')
        self.plugin_panel = None
        self.forward_allowed = False        # forward not enabled by default

        # define this only if the plugin provides one or more scripts
        # self.scripts.append('needed_script.sh')

        # mandatory or anyway structural variables and object values follow:
        # some of the timespec entries should be removed: if all are defined
        # the event will occur when time matches the whole definition, for
        # example, if a condition has to occur avery time that minute is 15
        # at every hour, the entries for year, month, day, hour and weekday
        # must be commented out or deleted
        self.timespec['year'] = 0
        self.timespec['month'] = 0
        self.timespec['day'] = 0
        self.timespec['hour'] = 0
        self.timespec['minute'] = 0
        self.timespec['weekday'] = 0
        self.summary_description = None     # must be set for all plugins

        # this variable is defined here only for demonstrational purposes
        self.value = None
Example #4
0
    def __init__(self):
        TimeConditionPlugin.__init__(
            self,
            basename=plugin_name(__file__),
            name=_("Template"),
            description=_("Explain here what it does"),
            author="John Smith",
            copyright="Copyright (c) 2016",
            icon='puzzle',
            help_string=HELP,
            version="0.1.0",
        )
        # the icon resource is only needed if the plugin uses a custom icon
        # self.graphics.append('plugin_icon.png')

        # the items below might be not needed and can be deleted if the
        # plugin does not have a configuration panel
        self.resources.append('plugin_template.glade')
        self.builder = self.get_dialog('plugin_template')
        self.plugin_panel = None
        self.forward_allowed = False  # forward not enabled by default

        # define this only if the plugin provides one or more scripts
        # self.scripts.append('needed_script.sh')

        # mandatory or anyway structural variables and object values follow:
        # some of the timespec entries should be removed: if all are defined
        # the event will occur when time matches the whole definition, for
        # example, if a condition has to occur avery time that minute is 15
        # at every hour, the entries for year, month, day, hour and weekday
        # must be commented out or deleted
        self.timespec['year'] = 0
        self.timespec['month'] = 0
        self.timespec['day'] = 0
        self.timespec['hour'] = 0
        self.timespec['minute'] = 0
        self.timespec['weekday'] = 0
        self.summary_description = None  # must be set for all plugins

        # this variable is defined here only for demonstrational purposes
        self.value = None
 def __init__(self):
     TimeConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Weekly"),
         description=_("Time Specification on a Weekly Basis"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='news',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-time-weekly')
     self.plugin_panel = None
     t = time.localtime()
     self.timespec['hour'] = 0
     self.timespec['minute'] = 0
     self.timespec['weekday'] = t.tm_wday
     self.summary_description = _("Today at midnight")
     self.forward_allowed = True
Example #6
0
 def __init__(self):
     TimeConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Weekly"),
         description=_("Time Specification on a Weekly Basis"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='news',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-time-weekly')
     self.plugin_panel = None
     t = time.localtime()
     self.timespec['hour'] = 0
     self.timespec['minute'] = 0
     self.timespec['weekday'] = t.tm_wday
     self.summary_description = _("Today at midnight")
     self.forward_allowed = True
 def __init__(self):
     TimeConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Date and Time"),
         description=_("Full Specification of Date and Time"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='calendar',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-time-full')
     self.plugin_panel = None
     t = time.localtime()
     self.timespec['hour'] = 0
     self.timespec['minute'] = 0
     self.timespec['year'] = t.tm_year
     self.timespec['month'] = t.tm_mon
     self.timespec['day'] = t.tm_mday
     self.summary_description = _("Today at midnight")
     self.forward_allowed = True