Re: Open a link in ui.browseableMessage()?
Rui Fontes
Hello!
toggle quoted message
Show quoted text
Using some of my add-ons code: _NRIniFile = os.path.join(globalVars.appArgs.configPath, "NVDARecord.html") message = u"<h1>{title}</h1><br>".format(title=_("List of commands for running add-ons")) for addon in sorted(addonDic, key = lambda item: item.lower()): message += u"<h2>{addonSum}</h2>\n<table>\n<tr><th>".format(addonSum=addon) #. Translators: The title of the column containing the documentation of each of the scripts. message += _("Documentation") message += "</th><th>" #. Translators: The title of the column containing the command of each of the scripts. message += _("Gesture") message += "</th></tr>\n" script = addonDic[addon]) for gesture in sorted(script): message += u"<tr><td>{doc}</td><td>{gesture}</td></tr>\n".format (doc = script[gesture], gesture=gesture) with open(_NRIniFile, "w", encoding = "utf-8") as file: file.write(message) # Opens the help of our addon on default browser. webbrowser.open(item.getDocFilePath()) I didn't check rigorously the identation... And I didn't check the result, but theorically, it should result... Rui Fontes Às 18:20 de 04/08/2021, anthony borg escreveu: Hi rui |
|