arcade-google-slides 0.1.0__py3-none-any.whl → 0.1.1__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.
- arcade_google_slides/tools/search.py +9 -2
- arcade_google_slides/utils.py +4 -4
- {arcade_google_slides-0.1.0.dist-info → arcade_google_slides-0.1.1.dist-info}/METADATA +1 -1
- {arcade_google_slides-0.1.0.dist-info → arcade_google_slides-0.1.1.dist-info}/RECORD +6 -6
- {arcade_google_slides-0.1.0.dist-info → arcade_google_slides-0.1.1.dist-info}/WHEEL +0 -0
- {arcade_google_slides-0.1.0.dist-info → arcade_google_slides-0.1.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -53,7 +53,9 @@ async def search_presentations(
|
|
|
53
53
|
] = False,
|
|
54
54
|
order_by: Annotated[
|
|
55
55
|
list[OrderBy] | None,
|
|
56
|
-
"Sort order. Defaults to listing the most recently modified presentations first"
|
|
56
|
+
"Sort order. Defaults to listing the most recently modified presentations first. "
|
|
57
|
+
"If presentation_contains or presentation_not_contains is provided, "
|
|
58
|
+
"then the order_by will be ignored.",
|
|
57
59
|
] = None,
|
|
58
60
|
limit: Annotated[int, "The number of presentations to list"] = 50,
|
|
59
61
|
pagination_token: Annotated[
|
|
@@ -69,7 +71,12 @@ async def search_presentations(
|
|
|
69
71
|
Searches for presentations in the user's Google Drive.
|
|
70
72
|
Excludes presentations that are in the trash.
|
|
71
73
|
"""
|
|
72
|
-
if
|
|
74
|
+
if presentation_contains or presentation_not_contains:
|
|
75
|
+
# Google drive API does not support other order_by values for
|
|
76
|
+
# queries with fullText search (which is used when presentation_contains
|
|
77
|
+
# or presentation_not_contains is provided).
|
|
78
|
+
order_by = None
|
|
79
|
+
elif order_by is None:
|
|
73
80
|
order_by = [OrderBy.MODIFIED_TIME_DESC]
|
|
74
81
|
elif isinstance(order_by, OrderBy):
|
|
75
82
|
order_by = [order_by]
|
arcade_google_slides/utils.py
CHANGED
|
@@ -81,7 +81,7 @@ def convert_presentation_to_markdown(presentation: Presentation) -> str:
|
|
|
81
81
|
def build_files_list_params(
|
|
82
82
|
mime_type: str,
|
|
83
83
|
page_size: int,
|
|
84
|
-
order_by: list[OrderBy],
|
|
84
|
+
order_by: list[OrderBy] | None,
|
|
85
85
|
pagination_token: str | None,
|
|
86
86
|
include_shared_drives: bool,
|
|
87
87
|
search_only_in_shared_drive_id: str | None,
|
|
@@ -98,7 +98,7 @@ def build_files_list_params(
|
|
|
98
98
|
params = {
|
|
99
99
|
"q": query,
|
|
100
100
|
"pageSize": page_size,
|
|
101
|
-
"orderBy": ",".join([item.value for item in order_by]),
|
|
101
|
+
"orderBy": ",".join([item.value for item in order_by]) if order_by else None,
|
|
102
102
|
"pageToken": pagination_token,
|
|
103
103
|
}
|
|
104
104
|
|
|
@@ -149,8 +149,8 @@ def build_files_list_query(
|
|
|
149
149
|
name_not_contains = keyword.replace("'", "\\'")
|
|
150
150
|
full_text_not_contains = keyword.replace("'", "\\'")
|
|
151
151
|
keyword_query = (
|
|
152
|
-
f"(name
|
|
153
|
-
f"fullText
|
|
152
|
+
f"(not (name contains '{name_not_contains}' or "
|
|
153
|
+
f"fullText contains '{full_text_not_contains}'))"
|
|
154
154
|
)
|
|
155
155
|
query.append(keyword_query)
|
|
156
156
|
|
|
@@ -5,13 +5,13 @@ arcade_google_slides/enum.py,sha256=uRBfvSfDpbZaunuA6upPP3GvXArOW8r7k6YYPsa9X9M,
|
|
|
5
5
|
arcade_google_slides/file_picker.py,sha256=kGfUVfH5QVlIW1sL-_gAwPokt7TwVEcPk3Vnk53GKUE,2005
|
|
6
6
|
arcade_google_slides/templates.py,sha256=pxbdMj57eV3-ImW3CixDWscpVKS94Z8nTNyTxDhUfGY,283
|
|
7
7
|
arcade_google_slides/types.py,sha256=osCGae3PXl9U_eA7zqVEA6kcju6W-npXLUlsbJZIuqc,6664
|
|
8
|
-
arcade_google_slides/utils.py,sha256=
|
|
8
|
+
arcade_google_slides/utils.py,sha256=OA0B7jsD6zn3B6Mpil1uSnv9t0XBqtuOXSBbn9SQ034,5125
|
|
9
9
|
arcade_google_slides/tools/__init__.py,sha256=JMWqB_57Nul0mF6vwSJsqzHp91cimmy9cvqcgM-tacw,531
|
|
10
10
|
arcade_google_slides/tools/comment.py,sha256=SCLONR43ZXBHjLFkaNnIbWvxO3qV0tG-li8HkHi1Npk,2960
|
|
11
11
|
arcade_google_slides/tools/create.py,sha256=JbKhvZH5jbj7dFXLdUhm9mHDWYChXQZ66BSilersYMA,3955
|
|
12
12
|
arcade_google_slides/tools/get.py,sha256=ZqV8gtDJR0I7wMugholR59zCtHfT5CjiaG3kwl9XCZk,1209
|
|
13
|
-
arcade_google_slides/tools/search.py,sha256=
|
|
14
|
-
arcade_google_slides-0.1.
|
|
15
|
-
arcade_google_slides-0.1.
|
|
16
|
-
arcade_google_slides-0.1.
|
|
17
|
-
arcade_google_slides-0.1.
|
|
13
|
+
arcade_google_slides/tools/search.py,sha256=IG75QZWwWvBvi0widULJQJdheX2XfYpkSxol5u_9tT0,5346
|
|
14
|
+
arcade_google_slides-0.1.1.dist-info/METADATA,sha256=UJBsiT22Pf8FmbuNjMt72vJfa5WbYQA-80OMDd5A2xk,1190
|
|
15
|
+
arcade_google_slides-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
16
|
+
arcade_google_slides-0.1.1.dist-info/licenses/LICENSE,sha256=ixeE7aL9b2B-_ZYHTY1vQcJB4NufKeo-LWwKNObGDN0,1960
|
|
17
|
+
arcade_google_slides-0.1.1.dist-info/RECORD,,
|
|
File without changes
|
{arcade_google_slides-0.1.0.dist-info → arcade_google_slides-0.1.1.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|