pyzotero 1.6.3__py3-none-any.whl → 1.6.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- _version.py +2 -2
- pyzotero/zotero.py +21 -19
- {pyzotero-1.6.3.dist-info → pyzotero-1.6.5.dist-info}/METADATA +3 -2
- pyzotero-1.6.5.dist-info/RECORD +10 -0
- {pyzotero-1.6.3.dist-info → pyzotero-1.6.5.dist-info}/WHEEL +1 -1
- pyzotero-1.6.3.dist-info/RECORD +0 -10
- {pyzotero-1.6.3.dist-info → pyzotero-1.6.5.dist-info}/AUTHORS +0 -0
- {pyzotero-1.6.3.dist-info → pyzotero-1.6.5.dist-info}/LICENSE.md +0 -0
- {pyzotero-1.6.3.dist-info → pyzotero-1.6.5.dist-info}/top_level.txt +0 -0
_version.py
CHANGED
pyzotero/zotero.py
CHANGED
|
@@ -305,7 +305,7 @@ class Zotero:
|
|
|
305
305
|
else:
|
|
306
306
|
self.endpoint = "http://localhost:23119/api"
|
|
307
307
|
self.local = True
|
|
308
|
-
if library_id and library_type:
|
|
308
|
+
if library_id is not None and library_type:
|
|
309
309
|
self.library_id = library_id
|
|
310
310
|
# library_type determines whether query begins w. /users or /groups
|
|
311
311
|
self.library_type = library_type + "s"
|
|
@@ -686,7 +686,7 @@ class Zotero:
|
|
|
686
686
|
),
|
|
687
687
|
),
|
|
688
688
|
headers=headers,
|
|
689
|
-
|
|
689
|
+
data=json.dumps(payload),
|
|
690
690
|
)
|
|
691
691
|
|
|
692
692
|
def new_fulltext(self, since):
|
|
@@ -1047,7 +1047,7 @@ class Zotero:
|
|
|
1047
1047
|
linked_file
|
|
1048
1048
|
linked_url
|
|
1049
1049
|
"""
|
|
1050
|
-
return self.item_template("attachment
|
|
1050
|
+
return self.item_template("attachment", linkmode=attachment_type)
|
|
1051
1051
|
|
|
1052
1052
|
def _attachment(self, payload, parentid=None):
|
|
1053
1053
|
"""
|
|
@@ -1097,7 +1097,7 @@ class Zotero:
|
|
|
1097
1097
|
"/{t}/{u}/searches".format(t=self.library_type, u=self.library_id),
|
|
1098
1098
|
),
|
|
1099
1099
|
headers=headers,
|
|
1100
|
-
|
|
1100
|
+
data=json.dumps(payload),
|
|
1101
1101
|
)
|
|
1102
1102
|
self.request = req
|
|
1103
1103
|
try:
|
|
@@ -1299,7 +1299,7 @@ class Zotero:
|
|
|
1299
1299
|
self.endpoint,
|
|
1300
1300
|
"/{t}/{u}/items".format(t=self.library_type, u=self.library_id),
|
|
1301
1301
|
),
|
|
1302
|
-
|
|
1302
|
+
data=to_send,
|
|
1303
1303
|
headers=dict(headers),
|
|
1304
1304
|
)
|
|
1305
1305
|
self.request = req
|
|
@@ -1330,7 +1330,7 @@ class Zotero:
|
|
|
1330
1330
|
t=self.library_type, u=self.library_id, v=value
|
|
1331
1331
|
),
|
|
1332
1332
|
),
|
|
1333
|
-
|
|
1333
|
+
data=payload,
|
|
1334
1334
|
headers=dict(uheaders),
|
|
1335
1335
|
)
|
|
1336
1336
|
self.request = presp
|
|
@@ -1374,7 +1374,7 @@ class Zotero:
|
|
|
1374
1374
|
"/{t}/{u}/collections".format(t=self.library_type, u=self.library_id),
|
|
1375
1375
|
),
|
|
1376
1376
|
headers=headers,
|
|
1377
|
-
|
|
1377
|
+
data=json.dumps(payload),
|
|
1378
1378
|
)
|
|
1379
1379
|
self.request = req
|
|
1380
1380
|
try:
|
|
@@ -1407,7 +1407,7 @@ class Zotero:
|
|
|
1407
1407
|
),
|
|
1408
1408
|
),
|
|
1409
1409
|
headers=headers,
|
|
1410
|
-
|
|
1410
|
+
data=json.dumps(payload),
|
|
1411
1411
|
)
|
|
1412
1412
|
|
|
1413
1413
|
def attachment_simple(self, files, parentid=None):
|
|
@@ -1465,7 +1465,7 @@ class Zotero:
|
|
|
1465
1465
|
),
|
|
1466
1466
|
),
|
|
1467
1467
|
headers=headers,
|
|
1468
|
-
|
|
1468
|
+
data=json.dumps(to_send),
|
|
1469
1469
|
)
|
|
1470
1470
|
|
|
1471
1471
|
def update_items(self, payload):
|
|
@@ -1483,7 +1483,7 @@ class Zotero:
|
|
|
1483
1483
|
self.endpoint,
|
|
1484
1484
|
"/{t}/{u}/items/".format(t=self.library_type, u=self.library_id),
|
|
1485
1485
|
),
|
|
1486
|
-
|
|
1486
|
+
data=json.dumps(chunk),
|
|
1487
1487
|
)
|
|
1488
1488
|
self.request = req
|
|
1489
1489
|
try:
|
|
@@ -1512,7 +1512,7 @@ class Zotero:
|
|
|
1512
1512
|
t=self.library_type, u=self.library_id
|
|
1513
1513
|
),
|
|
1514
1514
|
),
|
|
1515
|
-
|
|
1515
|
+
data=json.dumps(chunk),
|
|
1516
1516
|
)
|
|
1517
1517
|
self.request = req
|
|
1518
1518
|
try:
|
|
@@ -1543,7 +1543,7 @@ class Zotero:
|
|
|
1543
1543
|
t=self.library_type, u=self.library_id, i=ident
|
|
1544
1544
|
),
|
|
1545
1545
|
),
|
|
1546
|
-
|
|
1546
|
+
data=json.dumps({"collections": modified_collections}),
|
|
1547
1547
|
headers=headers,
|
|
1548
1548
|
)
|
|
1549
1549
|
|
|
@@ -1568,7 +1568,7 @@ class Zotero:
|
|
|
1568
1568
|
t=self.library_type, u=self.library_id, i=ident
|
|
1569
1569
|
),
|
|
1570
1570
|
),
|
|
1571
|
-
|
|
1571
|
+
data=json.dumps({"collections": modified_collections}),
|
|
1572
1572
|
headers=headers,
|
|
1573
1573
|
)
|
|
1574
1574
|
|
|
@@ -1932,14 +1932,14 @@ class Zupload:
|
|
|
1932
1932
|
child["parentItem"] = self.parentid
|
|
1933
1933
|
to_send = json.dumps(self.payload)
|
|
1934
1934
|
self.zinstance._check_backoff()
|
|
1935
|
-
req = self.client.post(
|
|
1935
|
+
req = self.zinstance.client.post(
|
|
1936
1936
|
url=build_url(
|
|
1937
1937
|
self.zinstance.endpoint,
|
|
1938
1938
|
liblevel.format(
|
|
1939
1939
|
t=self.zinstance.library_type, u=self.zinstance.library_id
|
|
1940
1940
|
),
|
|
1941
1941
|
),
|
|
1942
|
-
|
|
1942
|
+
data=to_send,
|
|
1943
1943
|
headers=headers,
|
|
1944
1944
|
)
|
|
1945
1945
|
try:
|
|
@@ -1988,7 +1988,7 @@ class Zupload:
|
|
|
1988
1988
|
i=reg_key,
|
|
1989
1989
|
),
|
|
1990
1990
|
),
|
|
1991
|
-
|
|
1991
|
+
data=data,
|
|
1992
1992
|
headers=auth_headers,
|
|
1993
1993
|
)
|
|
1994
1994
|
try:
|
|
@@ -2016,7 +2016,9 @@ class Zupload:
|
|
|
2016
2016
|
upload_pairs = tuple(upload_list)
|
|
2017
2017
|
try:
|
|
2018
2018
|
self.zinstance._check_backoff()
|
|
2019
|
-
|
|
2019
|
+
# We use a fresh httpx POST because we don't want our existing Pyzotero headers
|
|
2020
|
+
# for a call to the storage upload URL (currently S3)
|
|
2021
|
+
upload = httpx.post(
|
|
2020
2022
|
url=authdata["url"],
|
|
2021
2023
|
files=upload_pairs,
|
|
2022
2024
|
headers={"User-Agent": f"Pyzotero/{pz.__version__}"},
|
|
@@ -2043,7 +2045,7 @@ class Zupload:
|
|
|
2043
2045
|
}
|
|
2044
2046
|
reg_data = {"upload": authdata.get("uploadKey")}
|
|
2045
2047
|
self.zinstance._check_backoff()
|
|
2046
|
-
upload_reg = self.
|
|
2048
|
+
upload_reg = self.zinstance.client.post(
|
|
2047
2049
|
url=build_url(
|
|
2048
2050
|
self.zinstance.endpoint,
|
|
2049
2051
|
"/{t}/{u}/items/{i}/file".format(
|
|
@@ -2052,7 +2054,7 @@ class Zupload:
|
|
|
2052
2054
|
i=reg_key,
|
|
2053
2055
|
),
|
|
2054
2056
|
),
|
|
2055
|
-
|
|
2057
|
+
data=reg_data,
|
|
2056
2058
|
headers=dict(reg_headers),
|
|
2057
2059
|
)
|
|
2058
2060
|
try:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: pyzotero
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.5
|
|
4
4
|
Summary: Python wrapper for the Zotero API
|
|
5
5
|
Author-email: Stephan Hügel <urschrei@gmail.com>
|
|
6
6
|
License: # Blue Oak Model License
|
|
@@ -63,6 +63,7 @@ Requires-Dist: feedparser>=6.0.11
|
|
|
63
63
|
Requires-Dist: pytz
|
|
64
64
|
Requires-Dist: bibtexparser
|
|
65
65
|
Requires-Dist: httpx>=0.28.1
|
|
66
|
+
Requires-Dist: sphinx-rtd-theme>=3.0.2
|
|
66
67
|
Provides-Extra: test
|
|
67
68
|
Requires-Dist: pytest>=7.4.2; extra == "test"
|
|
68
69
|
Requires-Dist: httpretty; extra == "test"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
_version.py,sha256=Wh1l7lDfih75U-G0ME9gZnLgLqWtgspc0mVEOcWQpQ8,411
|
|
2
|
+
pyzotero/__init__.py,sha256=5QI4Jou9L-YJAf_oN9TgRXVKgt_Unc39oADo2Ch8bLI,243
|
|
3
|
+
pyzotero/zotero.py,sha256=9mwSEa3Z97Bdni9p_yMqeKBEYQFUvRdwFJAIaf0gg5A,76539
|
|
4
|
+
pyzotero/zotero_errors.py,sha256=UPhAmf2K05cnoeIl2wjufWQedepg7vBKb-ShU0TdlL4,2582
|
|
5
|
+
pyzotero-1.6.5.dist-info/AUTHORS,sha256=ZMicxg7lRScOYbxzMPznlzMbmrFIUIHwg-NvljEMbRQ,110
|
|
6
|
+
pyzotero-1.6.5.dist-info/LICENSE.md,sha256=bhy1CPMj1zWffD9YifFmSeBzPylsrhb1qP8OCEx5Etw,1550
|
|
7
|
+
pyzotero-1.6.5.dist-info/METADATA,sha256=WbXMwEG7mx08InP9iDe7ui0GG-2TzY53-ls0B-pn5Qg,7329
|
|
8
|
+
pyzotero-1.6.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
9
|
+
pyzotero-1.6.5.dist-info/top_level.txt,sha256=BOPNkPk5VtNDCy_li7Xftx6k0zG8STGxh-KgckcxLEw,18
|
|
10
|
+
pyzotero-1.6.5.dist-info/RECORD,,
|
pyzotero-1.6.3.dist-info/RECORD
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
_version.py,sha256=mQ_8947spH9F9E4bJgRMJ3LZK_sGORi1ak9UVDzTrr8,411
|
|
2
|
-
pyzotero/__init__.py,sha256=5QI4Jou9L-YJAf_oN9TgRXVKgt_Unc39oADo2Ch8bLI,243
|
|
3
|
-
pyzotero/zotero.py,sha256=xR7pbpvNjhLteNWfUUe56WmVEy73I0YsqcoXnW2LWhc,76408
|
|
4
|
-
pyzotero/zotero_errors.py,sha256=UPhAmf2K05cnoeIl2wjufWQedepg7vBKb-ShU0TdlL4,2582
|
|
5
|
-
pyzotero-1.6.3.dist-info/AUTHORS,sha256=ZMicxg7lRScOYbxzMPznlzMbmrFIUIHwg-NvljEMbRQ,110
|
|
6
|
-
pyzotero-1.6.3.dist-info/LICENSE.md,sha256=bhy1CPMj1zWffD9YifFmSeBzPylsrhb1qP8OCEx5Etw,1550
|
|
7
|
-
pyzotero-1.6.3.dist-info/METADATA,sha256=_sSykeMd0j3ndkriUjdoKsCain3uIxMhAqSY9vhnlm8,7290
|
|
8
|
-
pyzotero-1.6.3.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
|
|
9
|
-
pyzotero-1.6.3.dist-info/top_level.txt,sha256=BOPNkPk5VtNDCy_li7Xftx6k0zG8STGxh-KgckcxLEw,18
|
|
10
|
-
pyzotero-1.6.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|