Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 18 lines (13 sloc) 441 Bytes
#!/usr/bin/env python3
import json
import sys
reserved_names_file = sys.argv[1]
reserved_names = []
dataset = { "orgs": [] }
with open(reserved_names_file, "r") as names:
reserved_names = names.read().splitlines()
for name in reserved_names:
obj = { "akronym": name, "navn": "Reservert navn {}".format(name) }
dataset['orgs'].append(obj)
with open("misc_orgs.json", "w") as jsonfile:
jsonfile.write(json.dumps(dataset))