Created
March 22, 2017 16:35
-
-
Save AHilyard/1a0d55cc519b75837c0b9f98beefb15d to your computer and use it in GitHub Desktop.
A very simple Python script to generate Xcode storyboard file IDs.
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/python | |
import string | |
import random | |
def get_random_character(input): | |
if input == 'X': | |
all_characters = string.ascii_letters + string.digits | |
return random.choice(all_characters) | |
else: | |
return input | |
def main(): | |
id_template = "XXX-XX-XXX" | |
print ''.join([get_random_character(x) for x in id_template]) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment