Initial commit with handy scripts

This commit is contained in:
oitsjustjose 2025-05-13 18:31:13 -05:00
commit 074a8c3187
5 changed files with 129 additions and 0 deletions

View file

@ -0,0 +1,20 @@
from uuid import uuid4
from argparse import ArgumentParser
def generate(length: int, current = ""):
if len(current) >= length:
return current[:length]
next = current + str(uuid4()).replace("-", "")
return generate(length, current = next)
def main(num: int) -> None:
print(generate(num))
if __name__ == "__main__":
parser = ArgumentParser(prog="Make Random", description="Creates a random GUID-like value of a provided length")
parser.add_argument('num')
args = parser.parse_args()
main(int(args.num))