urn style random

master
ultrageranium 6 years ago
parent 4ec036da38
commit 5f15865e54

@ -7,13 +7,19 @@ with open('terms.json', 'r') as f:
def make_pub():
actor = random.choice(terms['actor'])
terms['actor'].remove(actor)
action = random.choice(terms['action'])
terms['action'].remove(action)
prefix = ''
sort = random.choice(terms['sort'])
terms['sort'].remove(sort)
media = random.choice(terms['media'])
terms['media'].remove(media)
if random.randint(0,2) == 0:
prefix = random.choice(terms['prefix']) + '-'
prefix = random.choice(terms['prefix'])
terms['prefix'].remove(prefix)
prefix += '-'
return actor + ' ' + action + ' ' + prefix + sort + ' ' + media

Loading…
Cancel
Save