MCPcopy Create free account
hub / github.com/chasingboy/Xtools / Base64EncodeLineCommand

Class Base64EncodeLineCommand

xtools.py:342–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340
341
342class Base64EncodeLineCommand(sublime_plugin.TextCommand):
343 def run(self, edit):
344 texts = get_buffer_text(self.view).strip('\n').split('\n')
345 lines = ''
346 for line in texts:
347 line = base64.b64encode(line.encode())
348 lines += line.decode() + '\n'
349 panel_print(self.view, edit, lines)
350
351
352class Base64DecodeLineCommand(sublime_plugin.TextCommand):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected