def _toggle_info(self): recd = self._active_recd if not recd: return if self._showing_info: self._show_recd(recd, play=False) return self._showing_info = True still_modes = (constants.MODE_PHOTO, constants.MODE_AUDIO) if self.model.get_mode() in still_modes: func = self._media_view.show_info_photo else: func = self._media_view.show_info_video self._play_button.hide() self._progress.hide() self._playback_scale.hide() self._title_entry.set_text(recd.title) self._title_entry.show() self._title_label.show() self.set_title_visible(True) func(recd.recorderName, recd.colorStroke, recd.colorFill, utils.getDateString(recd.time), recd.tags)
def getMNLegBillsCurrent(n=10): #http://openstates.org/api/v1/bills/?per_page=5&page=1&updated_since=2013-1-15&state=mn&search_window=session&apikey=4a26c19c3cae4f6c843c3e7816475fae d = getDateString() url = base_url + 'bills/?per_page=' + str( n ) + '&page=1&updated_since=' + d + '&state=mn&search_window=session&apikey=4a26c19c3cae4f6c843c3e7816475fae' return sendGetRequest(url)
def _get_tags(self, type): tl = gst.TagList() tl[gst.TAG_ARTIST] = self.model.get_nickname() tl[gst.TAG_COMMENT] = "olpc" #this is unfortunately, unreliable #record.Record.log.debug("self.ca.metadata['title']->" + str(self.ca.metadata['title']) ) tl[gst.TAG_ALBUM] = "olpc" #self.ca.metadata['title'] tl[gst.TAG_DATE] = utils.getDateString(int(time.time())) stringType = constants.MEDIA_INFO[type]['istr'] # Translators: photo by photographer, e.g. "Photo by Mary" tl[gst.TAG_TITLE] = _('%(type)s by %(name)s') % {'type': stringType, 'name': self.model.get_nickname()} return tl
def _toggle_info(self): recd = self._active_recd if not recd: return if self._showing_info: self._show_recd(recd, play=False) return self._showing_info = True if self.model.get_mode() in (constants.MODE_PHOTO, constants.MODE_AUDIO): func = self._media_view.show_info_photo else: func = self._media_view.show_info_video self._play_button.hide() self._progress.hide() self._playback_scale.hide() self._title_entry.set_text(recd.title) self._title_entry.show() self._title_label.show() self._record_container.set_title_visible(True) func(recd.recorderName, recd.colorStroke, recd.colorFill, utils.getDateString(recd.time), recd.tags)
# to-do - clean up naming conventions as little bit confusing maybe? build_config.loadConfig() # before doing anything - rename js and css folders in source to same as output (makes life easier) if not os.path.exists(build_config.inputfolder + "/" + build_config.cssOutputFolder): os.rename(build_config.inputfolder + "/" + build_config.inputCssFolder, build_config.inputfolder + "/" + build_config.cssOutputFolder) if not os.path.exists(build_config.inputfolder + "/" + build_config.jsOutputFolder): os.rename(build_config.inputfolder + "/" + build_config.inputJsFolder, build_config.inputfolder + "/" + build_config.jsOutputFolder) # 2 - Create the output subfolders in a dated folder, containing: # - Unminified standalone folder, containing concatenated js and css files but also js and css files that won't be contained in the final release # - Minified standalone folder, minified concatenated js and css files from above version # - Unminified release folder. Remove any js/css files that will not be included in release # - Minified release folder. Minified concatenated js/css files from unminified folder. This is the folder that will be zipped as the release date = utils.getDateString() build_config.standaloneFolder = fileUtil.createFolder(date, build_config.standaloneFolder) build_config.standaloneFolderMin = fileUtil.createFolder(date, build_config.standaloneFolderMin) build_config.unminFolder = fileUtil.createFolder(date, build_config.unminFolder) build_config.minFolder = fileUtil.createFolder(date, build_config.minFolder) # 3 - Copy assets across from source folder to the newly created output folders (will copy images/videos etc but not the js/css files) # to-do - add in image optimisation in a step now/before fileUtil.copySourceAssets(build_config.inputfolder, build_config.unminFolder) fileUtil.copySourceAssets(build_config.inputfolder, build_config.minFolder) fileUtil.copySourceAssets(build_config.inputfolder, build_config.standaloneFolder) fileUtil.copySourceAssets(build_config.inputfolder, build_config.standaloneFolderMin) # 4 - read the contents of the main index.html file into standaloneHtml and releaseHtml vars standaloneHtml = open(build_config.inputfile, "r").read() releaseHtml = open(build_config.inputfile, "r").read()
def getMNLegBillsCurrent(n=10): #http://openstates.org/api/v1/bills/?per_page=5&page=1&updated_since=2013-1-15&state=mn&search_window=session&apikey=4a26c19c3cae4f6c843c3e7816475fae d=getDateString() url=base_url+'bills/?per_page='+str(n)+'&page=1&updated_since='+d+'&state=mn&search_window=session&apikey=4a26c19c3cae4f6c843c3e7816475fae' return sendGetRequest(url)