Last active
March 12, 2024 19:33
-
-
Save lbr88/40e6ec548d19920def1579c31fd957df 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 clipboard | |
import re | |
raw = clipboard.paste() | |
p = re.compile('.*\/\/([0-9]+)>(.*) » (.*) - .*$') | |
output = "" | |
for l in raw.splitlines(): | |
m = p.match(l) | |
if m != None: | |
output += "{0} {1} --> {2}\n".format(m.group(1),m.group(2),m.group(3)) | |
if output != "": | |
clipboard.copy(output) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment