From 5f15865e5434fbc9e07dd946bb62c679a8305394 Mon Sep 17 00:00:00 2001 From: ultrageranium Date: Mon, 23 Apr 2018 00:51:34 +0200 Subject: [PATCH] urn style random --- call.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/call.py b/call.py index 1f78794..07aa93f 100755 --- a/call.py +++ b/call.py @@ -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