def __init__(self, enable=True, show_date=False): #print '----------- praytime TextPlug.__init__' #print 'From plugin: core.VERSION=%s'%api.get('core', 'VERSION') #print 'From plugin: core.aaa=%s'%api.get('core', 'aaa') BasePlugin.__init__( self, path=_mypath, mode='gregorian', desc=_('Islamic Pray Times'), enable=enable, show_date=show_date, last_day_merge=False, ) self.external = True self.name = _('Islamic Pray Times') self.about = _('Islamic Pray Times') ## FIXME self.has_config = True ############## ## here load config ## FIXME locName = 'Tehran' lat = 35.705 lng = 51.4216 method = 'Tehran' imsak = 10 ## minutes before Fajr (Morning Azan) #asrMode=ASR_STANDARD #highLats='NightMiddle' #timeFormat='24h' shownTimeNames = ('fajr', 'sunrise', 'dhuhr', 'maghrib', 'midnight') sep = ' ' #### if isfile(confPath): exec(open(confPath).read()) ####### self.locName = locName self.imsak = imsak self.ptObj = PrayTimes(lat, lng, methodName=method, imsak='%d min'%imsak) self.shownTimeNames = shownTimeNames self.sep = sep ####### #PrayTimeEventRule.plug = self ####### self.makeWidget()## FIXME
def __init__(self, enable=True, show_date=False): #print('----------- praytime TextPlug.__init__') #print('From plugin: core.VERSION=%s'%api.get('core', 'VERSION')) #print('From plugin: core.aaa=%s'%api.get('core', 'aaa')) BasePlugin.__init__( self, path=_mypath, mode='gregorian', desc=_('Islamic Pray Times'), enable=enable, show_date=show_date, last_day_merge=False, ) self.external = True self.name = _('Islamic Pray Times') self.about = _('Islamic Pray Times') ## FIXME self.has_config = True self.cityData = readLocationData() ############## confNeedsSave = False ###### locName, lat, lng = '', 0, 0 method = '' ####### imsak = 10 ## minutes before Fajr (Morning Azan) #asrMode=ASR_STANDARD #highLats='NightMiddle' #timeFormat='24h' shownTimeNames = ('fajr', 'sunrise', 'dhuhr', 'maghrib', 'midnight') ## FIXME rename shownTimeNames to activeTimeNames ## or add another list azanSoundTimeNames sep = ' ' ## azanEnable = False azanFile = None ## preAzanEnable = False preAzanFile = None preAzanMinutes = 2.0 #### if isfile(confPath): exec(open(confPath).read()) else: confNeedsSave = True #### if not locName: confNeedsSave = True locName, lat, lng = guessLocation(self.cityData) method = 'Tehran' ## guess method from location FIXME ####### self.locName = locName self.imsak = imsak self.backend = PrayTimes(lat, lng, methodName=method, imsak='%d min'%imsak) self.shownTimeNames = shownTimeNames self.sep = sep #### self.azanEnable = azanEnable self.azanFile = azanFile ## self.preAzanEnable = preAzanEnable self.preAzanFile = preAzanFile self.preAzanMinutes = preAzanMinutes ## self.preAzanMinutes = preAzanMinutes ####### #PrayTimeEventRule.plug = self ####### if confNeedsSave: self.saveConfig() ####### self.makeWidget()## FIXME self.onCurrentDateChange(localtime()[:3])
def __init__(self, enable=True, show_date=False): #print('----------- praytime TextPlug.__init__') #print('From plugin: core.VERSION=%s'%api.get('core', 'VERSION')) #print('From plugin: core.aaa=%s'%api.get('core', 'aaa')) BasePlugin.__init__( self, path=_mypath, mode='gregorian', desc=_('Islamic Pray Times'), enable=enable, show_date=show_date, last_day_merge=False, ) self.external = True self.name = _('Islamic Pray Times') self.about = _('Islamic Pray Times') ## FIXME self.has_config = True self.cityData = readLocationData() ############## confNeedsSave = False ###### locName, lat, lng = '', 0, 0 method = '' ####### imsak = 10 ## minutes before Fajr (Morning Azan) #asrMode=ASR_STANDARD #highLats='NightMiddle' #timeFormat='24h' shownTimeNames = ('fajr', 'sunrise', 'dhuhr', 'maghrib', 'midnight') ## FIXME rename shownTimeNames to activeTimeNames ## or add another list azanSoundTimeNames sep = ' ' ## azanEnable = False azanFile = None ## preAzanEnable = False preAzanFile = None preAzanMinutes = 2.0 #### if isfile(confPath): exec(open(confPath).read()) else: confNeedsSave = True #### if not locName: confNeedsSave = True locName, lat, lng = guessLocation(self.cityData) method = 'Tehran' ## guess method from location FIXME ####### self.locName = locName self.imsak = imsak self.backend = PrayTimes(lat, lng, methodName=method, imsak='%d min' % imsak) self.shownTimeNames = shownTimeNames self.sep = sep #### self.azanEnable = azanEnable self.azanFile = azanFile ## self.preAzanEnable = preAzanEnable self.preAzanFile = preAzanFile self.preAzanMinutes = preAzanMinutes ## self.preAzanMinutes = preAzanMinutes ####### #PrayTimeEventRule.plug = self ####### if confNeedsSave: self.saveConfig() ####### self.makeWidget() ## FIXME self.onCurrentDateChange(localtime()[:3])