#!/usr/bin/python3

import json
import requests
import time
import os
from decimal import Decimal
from shutil import copyfile





start_time = time.time()

os.chdir("/var/www/html/covid-portal/scripts/publications")


greek_dois=[]


#Edit the metadata of the publications 
with open ('greek-dois-all-all.json','r', encoding='utf-8') as f:
    data=json.load(f)
    new_data = list(dict.fromkeys(data))
    # print(len(new_data))


with open('greek-dois-all-new.json', 'w') as outfile:    
    json.dump(new_data, outfile)


print("--- %s minutes ---" % ((time.time() - start_time)/60))          
    

