def _generatePageSummary(self, obj, **args): """Returns an array of strings (and possibly voice and audio specifications) that summarize the objects found on the page containing obj. """ result = [] acss = self.voice(speech_generator.DEFAULT) headings, forms, tables, vlinks, uvlinks, percent = \ self._script.getPageSummary(obj) if headings: result.append(messages.headingCount(headings)) if forms: result.append(messages.formCount(forms)) if tables: result.append(messages.tableCount(tables)) if vlinks: result.append(messages.visitedLinkCount(vlinks)) if uvlinks: result.append(messages.unvisitedLinkCount(uvlinks)) if percent is not None: result.append(messages.percentRead(percent)) if result: result.extend(acss) return result
def _generatePageSummary(self, obj, **args): if not self._script.utilities.inDocumentContent(obj): return [] result = [] acss = self.voice(speech_generator.DEFAULT) headings, forms, tables, vlinks, uvlinks, percent = self._script.utilities.getPageSummary(obj) if headings: result.append(messages.headingCount(headings)) if forms: result.append(messages.formCount(forms)) if tables: result.append(messages.tableCount(tables)) if vlinks: result.append(messages.visitedLinkCount(vlinks)) if uvlinks: result.append(messages.unvisitedLinkCount(uvlinks)) if percent is not None: result.append(messages.percentRead(percent)) if result: result.extend(acss) return result
def _generatePageSummary(self, obj, **args): if not self._script.utilities.inDocumentContent(obj): return [] result = [] acss = self.voice(speech_generator.DEFAULT) headings, forms, tables, vlinks, uvlinks, percent = \ self._script.utilities.getPageSummary(obj) if headings: result.append(messages.headingCount(headings)) if forms: result.append(messages.formCount(forms)) if tables: result.append(messages.tableCount(tables)) if vlinks: result.append(messages.visitedLinkCount(vlinks)) if uvlinks: result.append(messages.unvisitedLinkCount(uvlinks)) if percent is not None: result.append(messages.percentRead(percent)) if result: result.extend(acss) return result