Skip to content

Instantly share code, notes, and snippets.

@WaylonWalker
Created October 10, 2020 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WaylonWalker/70cd9d073b5179eae4edfed1f9da8bfc to your computer and use it in GitHub Desktop.
Save WaylonWalker/70cd9d073b5179eae4edfed1f9da8bfc to your computer and use it in GitHub Desktop.
import re
import pyperclip
def copy():
with open('C:/Debian/rootfs/home/<user>/.easyclip') as f:
easyclip = f.readlines(1)
first = re.sub(r"^.*text': '", "", easyclip[0])
last = re.sub(r"'}\n$", "", first)
newline = re.sub(r"\x02", "\n", last)
doublequote = newline.replace("''", "'")
return doublequote
if __name__ == "__main__":
print(copy())
pyperclip.copy(copy())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment