def SetPage(self, html): if html.startswith("<md>"): html = DecodeMarkdown(html[4:]) elif html.startswith("<rst>"): html = DecodeReST(html[5:]) wxHtmlWindow.SetPage( self, '<html><body bgcolor="%s" text="%s">%s</body></html>' % (self.GetBackgroundColour().GetAsString(wx.C2S_HTML_SYNTAX), self.GetForegroundColour().GetAsString(wx.C2S_HTML_SYNTAX), html))
def SetPage(self, html): if html.startswith("<md>"): html = DecodeMarkdown(html[4:]) elif html.startswith("<rst>"): html = DecodeReST(html[5:]) wxHtmlWindow.SetPage( self, '<html><body bgcolor="%s" text="%s">%s</body></html>' % ( self.GetBackgroundColour().GetAsString(wx.C2S_HTML_SYNTAX), self.GetForegroundColour().GetAsString(wx.C2S_HTML_SYNTAX), html ) )
def GetPluginData(self, pluginInfo): description = pluginInfo.englishDescription if description.startswith("<md>"): description = DecodeMarkdown(description[4:]) elif description.startswith("<rst>"): description = DecodeReST(description[5:]) iconData = base64.b64encode(str(pluginInfo.icon.pil.tobytes())) return { "name": pluginInfo.englishName, "author": pluginInfo.author, "version": pluginInfo.version, "url": pluginInfo.url, "guid": pluginInfo.guid, "description": description, "icon": iconData, }