@@ -0,0 +1,851 @@
+import argparse, shelve%0A%0A%0Aif __name__ == %22__main__%22:%0A    # Parse the command line arguments%0A    parser = argparse.ArgumentParser(description=%22API key tool for PyHeufyBot.%22)%0A    parser.add_argument(%22-s%22, %22--storage%22, help=%22The storage file to use%22, type=str, default=%22../heufybot.db%22)%0A    parser.add_argument(%22-k%22, %22--key%22, help=%22The API key type to modify%22, type=str, required=True)%0A    parser.add_argument(%22-v%22, %22--value%22, help=%22The value of the API key%22, type=str, required=True)%0A    options = parser.parse_args()%0A%0A    storage = shelve.open(options.storage)%0A    if %22api-keys%22 not in storage:%0A        storage%5B%22api-keys%22%5D = %7B%7D%0A    keys = storage%5B%22api-keys%22%5D%0A    keys%5Boptions.key%5D = options.value%0A    storage%5B%22api-keys%22%5D = keys%0A    storage.close()%0A    print %22Key '%7B%7D' with value '%7B%7D' has been added to the API keys.%22.format(options.key, options.value)%0A

Add a tool to manage API keys