fisrt commit zotero linked

This commit is contained in:
Adrien Raison 2021-02-13 21:05:52 +01:00
parent 26c7b0a442
commit 3f368206fb
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
import smtplib
import requests
import dotenv
import os
import json
import time
dotenv.load_dotenv()
mail = os.getenv("MAIL")
password = os.getenv("PASSWORD")
mail1 = os.getenv("ADRESS_1")
mail2 = os.getenv("ADRESS_2")
zotero_key = os.getenv("ZOTERO_API_KEY")
joplin_key = os.getenv("JOPLIN_API_KEY")
d = requests.get(f"https://api.zotero.org/groups/2611287/items?key={zotero_key}")
print()
with open("../../output_shared.json", "w") as outfile:
json.dump(d.json(), outfile)
current = []
while True:
time.sleep(2)
with open("../../output_shared.json", "r") as file:
data = json.load(file)
print(data[0])