-
-
Save negasus/d4ef9037ecdb9a4e1e54d5744b54c1df to your computer and use it in GitHub Desktop.
Raycast scrtipt for UUID generation
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
#!/usr/bin/env python3 | |
# @raycast.schemaVersion 1 | |
# @raycast.title uuid | |
# @raycast.mode inline | |
# @raycast.author negasus | |
# @raycast.authorURL https://negasus.dev | |
# @raycast.description Generate UUIDv4 and copy it to the clipboard | |
import sys | |
import uuid | |
import subprocess | |
result = str(uuid.uuid4()) | |
subprocess.run("pbcopy", universal_newlines=True, input=result) | |
hint = "uuid copied to the clipboard" | |
if sys.stdout.isatty(): | |
print(hint) | |
else: | |
sys.stdout.write(hint) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment