Here is the initial port of ExportHtml to ST3 https://github.com/facelessuser/ExportHtml/tree/ST3
Seems to work fine, but report bugs here if they are found.
facelessuser wrote:I don't notice much of a difference with the ST2 version and the ST3 version for this plugin.
castles_made_of_sand wrote:Ah, I guess I meant more the view.scope_name() thingy which you still have to do pt by pt eh.
Traceback (most recent call last):
File "/home/nick/.config/sublime-text-3/Packages/ExportHtml/ExportBbcode.py", line 38, in execute
ExportBbcode(view).run(**self.args[value])
File "/home/nick/.config/sublime-text-3/Packages/ExportHtml/ExportBbcode.py", line 334, in run
self.setup(**inputs)
File "/home/nick/.config/sublime-text-3/Packages/ExportHtml/ExportBbcode.py", line 117, in setup
self.plist_file = self.apply_filters(readPlist(path_packages + colour_scheme.replace('Packages', '')))
File "X/plistlib.py", line 73, in readPlist
pathOrFile = open(pathOrFile, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/home/nick/.config/sublime-text-3/Packages/Color Scheme - Default/Blackboard.tmTheme'
if bulletin_board:
# print css
bbcode = ["{pre=%s}" % dict(css[None]).get('background-color', '#000000')]
A = bbcode.append
from lxml.html import fromstring
import re
for txt in fromstring(html).xpath('//text()'):
if txt.is_tail or txt.is_text:
parent = txt.getparent()
if txt.is_tail: parent = parent.getparent()
style = None
while parent is not None:
style = parent.get('style')
if style: break
else: parent = parent.getparent()
color = re.search(r'(?<!background-)color:(#[A-Fa-f0-9]+)', parent.get('style'))
if color:
color = color.group(1)
else:
color = dict(css[None]).get('color', '#000000')
A("{color=%s}%s{/color}" % (color, txt))
html = "".join(bbcode + ["{/pre}"])
Return to Plugin Announcements
Users browsing this forum: No registered users and 7 guests