Skip to content

Instantly share code, notes, and snippets.

@mcwindy
Created June 14, 2023 09:35
Show Gist options
  • Save mcwindy/77ec38c4ad7072e1323f879d107eb3fc to your computer and use it in GitHub Desktop.
Save mcwindy/77ec38c4ad7072e1323f879d107eb3fc to your computer and use it in GitHub Desktop.
# pip install pyperclip
import pyperclip
while True:
txt = pyperclip.waitForNewPaste()
modified = txt.replace(',', ',')
modified = modified.replace('1', '2')
if txt != modified:
pyperclip.copy(modified)
# pyperclip.paste()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment