示例#1
0
 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))
示例#2
0
 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
         )
     )
示例#3
0
 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,
     }
示例#4
0
 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,
     }