def get_ui(self): ui = self.app.inflate('firstrun:main') step = self.app.inflate('firstrun:step%i'%self._step) ui.append('content', step) if self._step == 2: self._mgr = RepositoryManager(self.app.config) self._mgr.update_list() lst = self._mgr.available for k in sorted(lst, key=lambda x:x.name): row = self.app.inflate('firstrun:item') row.find('name').set('text', k.name) row.find('desc').set('text', k.description) row.find('icon').set('file', k.icon) row.find('version').set('text', k.version) row.find('author').set('text', k.author) row.find('author').set('url', k.homepage) req = k.str_req() row.find('check').set('name', 'install-'+k.id) if req != '': row.append('reqs', UI.HelpIcon(text=req)) ui.append('list', row) return ui
def run(self): rm = RepositoryManager(self.app.config) while True: try: rm.update_list() self.feed = json.loads(download(FEED_URL))['results'] except: pass time.sleep(60*60*12) # each 12 hrs
def on_session_start(self): self._mgr = RepositoryManager(self.app.config)