terms from pad

master
Michael Murtaugh 2 years ago
parent 5f15865e54
commit 17eab3ce6e

@ -1,9 +1,17 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import json, random, textwrap import json, random, textwrap
import yaml
from urllib.request import urlopen
with open('terms.json', 'r') as f:
terms = json.load(f) # with open('terms.json', 'r') as f:
# terms = json.load(f)
# with open('terms.yaml', 'r') as f:
# terms = yaml.load(f)
f = urlopen("https://pad.xpub.nl/p/XPUB-promo-terms/export/txt")
terms = yaml.load(f)
def make_pub(): def make_pub():
actor = random.choice(terms['actor']) actor = random.choice(terms['actor'])

Loading…
Cancel
Save