pyzotero 1.6.4__tar.gz → 1.6.6__tar.gz
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.
- pyzotero-1.6.6/.github/dependabot.yml +16 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/.readthedocs.yaml +5 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/PKG-INFO +2 -2
- {pyzotero-1.6.4 → pyzotero-1.6.6}/doc/conf.py +16 -1
- {pyzotero-1.6.4 → pyzotero-1.6.6}/doc/index.rst +3 -1
- {pyzotero-1.6.4 → pyzotero-1.6.6}/src/_version.py +2 -2
- {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero/zotero.py +5 -3
- {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero.egg-info/PKG-INFO +2 -2
- {pyzotero-1.6.4 → pyzotero-1.6.6}/uv.lock +1 -2
- pyzotero-1.6.4/.github/dependabot.yml +0 -16
- {pyzotero-1.6.4 → pyzotero-1.6.6}/.coveragerc +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/.github/ISSUE_TEMPLATE/usage_question.md +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/.github/pull_request_template.md +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/.github/workflows/tests.yml +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/.gitignore +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/AUTHORS +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/CITATION.cff +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/CONTRIBUTING.md +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/CONTRIBUTORS.md +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/LICENSE.md +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/README.md +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/__init__.py +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/doc/Makefile +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/doc/_templates/layout.html +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/doc/cat.png +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/dump_contributors.py +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/pyproject.toml +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/setup.cfg +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/setup.py +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero/__init__.py +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero/zotero_errors.py +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero.egg-info/SOURCES.txt +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero.egg-info/dependency_links.txt +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero.egg-info/requires.txt +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/src/pyzotero.egg-info/top_level.txt +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/__init__.py +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/attachments_doc.json +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/citation_doc.xml +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/collection_doc.json +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/collection_tags.json +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/collection_versions.json +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/collections_doc.json +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/creation_doc.json +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/groups_doc.json +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/item_doc.json +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/item_fields.json +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/item_file.pdf +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/item_template.json +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/item_types.json +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/item_versions.json +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/items_doc.json +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/keys_doc.txt +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/api_responses/tags_doc.json +0 -0
- {pyzotero-1.6.4 → pyzotero-1.6.6}/tests/test_zotero.py +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "pip"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
open-pull-requests-limit: 20
|
|
8
|
+
groups:
|
|
9
|
+
# Specify a name for the group, which will be used in pull request titles
|
|
10
|
+
# and branch names
|
|
11
|
+
python-dependencies:
|
|
12
|
+
# Define patterns to include dependencies in the group (based on
|
|
13
|
+
# dependency name)
|
|
14
|
+
applies-to: version-updates # Applies the group rule to version updates
|
|
15
|
+
patterns:
|
|
16
|
+
- "*"
|
|
@@ -11,11 +11,16 @@ build:
|
|
|
11
11
|
tools:
|
|
12
12
|
python: "3.11"
|
|
13
13
|
|
|
14
|
+
jobs:
|
|
15
|
+
post_create_environment:
|
|
16
|
+
- python -m pip install sphinx_rtd_theme
|
|
17
|
+
|
|
14
18
|
python:
|
|
15
19
|
install:
|
|
16
20
|
- method: pip
|
|
17
21
|
path: .
|
|
18
22
|
|
|
23
|
+
|
|
19
24
|
# Build documentation in the docs/ directory with Sphinx
|
|
20
25
|
sphinx:
|
|
21
26
|
configuration: doc/conf.py
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
# All configuration values have a default; values that are commented out
|
|
12
12
|
# serve to show the default.
|
|
13
13
|
|
|
14
|
+
import os
|
|
14
15
|
import sys
|
|
15
16
|
from datetime import date
|
|
16
17
|
|
|
@@ -18,8 +19,22 @@ sys.path.insert(1, "..")
|
|
|
18
19
|
import pyzotero
|
|
19
20
|
from pyzotero import zotero as zot
|
|
20
21
|
|
|
22
|
+
# Tell Jinja2 templates the build is running on Read the Docs
|
|
23
|
+
if os.environ.get("READTHEDOCS", "") == "True":
|
|
24
|
+
if "html_context" not in globals():
|
|
25
|
+
html_context = {}
|
|
26
|
+
html_context["READTHEDOCS"] = True
|
|
27
|
+
|
|
21
28
|
author = zot.__author__
|
|
22
29
|
current_year = date.today().year
|
|
30
|
+
|
|
31
|
+
html_context = {
|
|
32
|
+
"display_github": True, # Integrate GitHub
|
|
33
|
+
"github_user": "urschrei", # Username
|
|
34
|
+
"github_repo": "pyzotero", # Repo name
|
|
35
|
+
"github_version": "main", # Version
|
|
36
|
+
"conf_py_path": "/doc/", # Path in the checkout to the docs root
|
|
37
|
+
}
|
|
23
38
|
# If extensions (or modules to document with autodoc) are in another directory,
|
|
24
39
|
# add these directories to sys.path here. If the directory is relative to the
|
|
25
40
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
@@ -97,7 +112,7 @@ pygments_style = "sphinx"
|
|
|
97
112
|
|
|
98
113
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
99
114
|
# a list of builtin themes.
|
|
100
|
-
html_theme = "
|
|
115
|
+
html_theme = "sphinx_rtd_theme"
|
|
101
116
|
RTD_NEW_THEME = True
|
|
102
117
|
|
|
103
118
|
# Theme options are theme-specific and customize the look and feel of a theme
|
|
@@ -106,7 +106,7 @@ General Usage
|
|
|
106
106
|
First, create a new Zotero instance:
|
|
107
107
|
|
|
108
108
|
|
|
109
|
-
.. py:class:: Zotero(library_id, library_type[, api_key, preserve_json_order, locale])
|
|
109
|
+
.. py:class:: Zotero(library_id, library_type[, api_key, preserve_json_order, locale, local])
|
|
110
110
|
|
|
111
111
|
:param str library_id: a valid Zotero API user ID
|
|
112
112
|
:param str library_type: a valid Zotero API library type: **user** or **group**
|
|
@@ -937,6 +937,8 @@ Uploading files
|
|
|
937
937
|
|
|
938
938
|
Upload files to their corresponding attachments. If the attachments lack the ``key`` property they are assumed not to exist and will be created. The ``parentid`` parameter is **not compatible** with existing attachments. In order for uploads to succeed, the filename parameter of each attachment must resolve.
|
|
939
939
|
|
|
940
|
+
This method is really only required in cases where a sync has been interrupted, leaving your library with attachment items that don't have corresponding files attached. It *may* also work for uploading modified files, though **this is untested**.
|
|
941
|
+
|
|
940
942
|
:param list attachments: A list of dicts representing zotero imported files which may or may not already have their key fields filled in.
|
|
941
943
|
:param string parentid: a library Item ID. If this is specified and key fields are not included, attachments will be created as child items of this ID.
|
|
942
944
|
:param string/path basedir: A string or path object to which the filenames specified in attachments will be evaluated relative to. If unspecified the filenames are evaluated as they are.
|
|
@@ -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"
|
|
@@ -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(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
version = 1
|
|
2
|
-
requires-python = ">=3.
|
|
2
|
+
requires-python = ">=3.9"
|
|
3
3
|
|
|
4
4
|
[[package]]
|
|
5
5
|
name = "anyio"
|
|
@@ -354,7 +354,6 @@ wheels = [
|
|
|
354
354
|
|
|
355
355
|
[[package]]
|
|
356
356
|
name = "pyzotero"
|
|
357
|
-
version = "1.6.2.dev7+g9114623.d20241230"
|
|
358
357
|
source = { editable = "." }
|
|
359
358
|
dependencies = [
|
|
360
359
|
{ name = "bibtexparser" },
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
updates:
|
|
3
|
-
- package-ecosystem: "github-actions"
|
|
4
|
-
directory: "/"
|
|
5
|
-
schedule:
|
|
6
|
-
interval: "weekly"
|
|
7
|
-
ignore:
|
|
8
|
-
# Optional: Official actions have moving tags like v1;
|
|
9
|
-
# if you use those, you don't need updates.
|
|
10
|
-
- dependency-name: "actions/*"
|
|
11
|
-
|
|
12
|
-
- package-ecosystem: pip
|
|
13
|
-
directory: "/"
|
|
14
|
-
schedule:
|
|
15
|
-
interval: daily
|
|
16
|
-
open-pull-requests-limit: 10
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|