diff options
| author | 2020-05-09 14:12:11 -0400 | |
|---|---|---|
| committer | 2020-05-09 14:12:11 -0400 | |
| commit | 917b18face67da9ea20755fbc860b52d5e65ae6b (patch) | |
| tree | 9ebef0ed6890bc06047748183b3b16dea44f3889 | |
| parent | 473ee2db847ab638206be66507906b6a09087719 (diff) | |
Add tool and requirements file0.1.0
| -rwxr-xr-x | pet_names | 20 | ||||
| -rw-r--r-- | requirements.txt | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/pet_names b/pet_names new file mode 100755 index 0000000..6dbb5c6 --- /dev/null +++ b/pet_names @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: CDDL-1.0 +# Copyright (c) 2020 Daniel Washburn <daniel@washburn.at> + +from hex2words import hex2words +from secrets import token_hex +import sys + +def main(argv): + try: + num = int(argv[1]) + except: + num = 1 + + for i in range(num): + tok = token_hex(2) + print("_".join(hex2words.hex2words(tok).lower().split())) + +if __name__ == "__main__": + main(sys.argv) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3d22bda --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +hex2words |