Created
October 10, 2020 14:34
-
-
Save WaylonWalker/70cd9d073b5179eae4edfed1f9da8bfc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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