# November 2021, copyleft || Funix || Zine Camp, Worm, Rotterdam
#
# This script is to generate a zine from a telegram group chat
#
# import json # to read the json file
import json # to use json in python
d = open('result.json','r') #open the json file
dictio = json.load(d) # and make it load
m = dictio['messages'] # then declare the array "m" that take all the 'messages' keys
contents = ''
n = 0
for x in m:
if 'photo' in x:
contents += f""
n = n+1
print(f"
")
elif 'text' in x:
if x['text'] != '':
contents += f'
{x["text"]}
' else: continue intro = '''