From 3886b7f1cdbc767dc71a8a1b0085d3f5eefb72b7 Mon Sep 17 00:00:00 2001 From: Gwyn Date: Mon, 16 Feb 2026 16:57:16 -0500 Subject: [PATCH] first commit --- README.md | 0 clip-sort.py | 12 ++++++++++++ requirements.txt | 1 + 3 files changed, 13 insertions(+) create mode 100644 README.md create mode 100644 clip-sort.py create mode 100644 requirements.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/clip-sort.py b/clip-sort.py new file mode 100644 index 0000000..8cd72e5 --- /dev/null +++ b/clip-sort.py @@ -0,0 +1,12 @@ +import pyperclip as pycl +import sys + +if __name__ == "__main__": + clip = pycl.paste() + if "\r\n" in clip: # Windows Carrige return case + cliplist = clip.split("\r\n") + else: + cliplist = clip.split("\n") + cliplist.sort() + pycl.copy("\n".join(cliplist)) + sys.exit(0) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..c9c47dd --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +pyperclip