notionary 0.1.29__py3-none-any.whl → 0.2.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.
- notionary/__init__.py +5 -5
- notionary/database/notion_database.py +50 -59
- notionary/database/notion_database_factory.py +16 -20
- notionary/elements/audio_element.py +1 -1
- notionary/elements/bookmark_element.py +1 -1
- notionary/elements/bulleted_list_element.py +2 -8
- notionary/elements/callout_element.py +1 -1
- notionary/elements/code_block_element.py +1 -1
- notionary/elements/divider_element.py +1 -1
- notionary/elements/embed_element.py +1 -1
- notionary/elements/heading_element.py +2 -8
- notionary/elements/image_element.py +1 -1
- notionary/elements/mention_element.py +1 -1
- notionary/elements/notion_block_element.py +1 -1
- notionary/elements/numbered_list_element.py +2 -7
- notionary/elements/paragraph_element.py +1 -1
- notionary/elements/qoute_element.py +1 -1
- notionary/elements/registry/{block_element_registry.py → block_registry.py} +70 -26
- notionary/elements/registry/{block_element_registry_builder.py → block_registry_builder.py} +48 -32
- notionary/elements/table_element.py +1 -1
- notionary/elements/text_inline_formatter.py +13 -9
- notionary/elements/todo_element.py +1 -1
- notionary/elements/toggle_element.py +1 -1
- notionary/elements/toggleable_heading_element.py +1 -1
- notionary/elements/video_element.py +1 -1
- notionary/models/notion_block_response.py +264 -0
- notionary/models/notion_database_response.py +63 -0
- notionary/models/notion_page_response.py +100 -0
- notionary/notion_client.py +38 -5
- notionary/page/content/page_content_retriever.py +68 -0
- notionary/page/content/page_content_writer.py +103 -0
- notionary/page/markdown_to_notion_converter.py +5 -5
- notionary/page/metadata/metadata_editor.py +91 -63
- notionary/page/metadata/notion_icon_manager.py +55 -28
- notionary/page/metadata/notion_page_cover_manager.py +23 -20
- notionary/page/notion_page.py +223 -218
- notionary/page/notion_page_factory.py +102 -151
- notionary/page/notion_to_markdown_converter.py +5 -5
- notionary/page/properites/database_property_service.py +11 -55
- notionary/page/properites/page_property_manager.py +44 -67
- notionary/page/properites/property_value_extractor.py +3 -3
- notionary/page/relations/notion_page_relation_manager.py +165 -213
- notionary/page/relations/notion_page_title_resolver.py +59 -41
- notionary/page/relations/page_database_relation.py +7 -9
- notionary/{elements/prompts → prompting}/element_prompt_content.py +19 -4
- notionary/prompting/markdown_syntax_prompt_generator.py +92 -0
- notionary/util/logging_mixin.py +17 -8
- notionary/util/warn_direct_constructor_usage.py +54 -0
- {notionary-0.1.29.dist-info → notionary-0.2.1.dist-info}/METADATA +2 -1
- notionary-0.2.1.dist-info/RECORD +60 -0
- {notionary-0.1.29.dist-info → notionary-0.2.1.dist-info}/WHEEL +1 -1
- notionary/database/database_info_service.py +0 -43
- notionary/elements/prompts/synthax_prompt_builder.py +0 -150
- notionary/page/content/page_content_manager.py +0 -211
- notionary/page/properites/property_operation_result.py +0 -116
- notionary/page/relations/relation_operation_result.py +0 -144
- notionary-0.1.29.dist-info/RECORD +0 -58
- {notionary-0.1.29.dist-info → notionary-0.2.1.dist-info}/licenses/LICENSE +0 -0
- {notionary-0.1.29.dist-info → notionary-0.2.1.dist-info}/top_level.txt +0 -0
@@ -1,211 +0,0 @@
|
|
1
|
-
import json
|
2
|
-
from typing import Any, Dict, List, Optional
|
3
|
-
|
4
|
-
from notionary.elements.registry.block_element_registry import BlockElementRegistry
|
5
|
-
from notionary.notion_client import NotionClient
|
6
|
-
|
7
|
-
from notionary.page.markdown_to_notion_converter import (
|
8
|
-
MarkdownToNotionConverter,
|
9
|
-
)
|
10
|
-
from notionary.page.notion_to_markdown_converter import (
|
11
|
-
NotionToMarkdownConverter,
|
12
|
-
)
|
13
|
-
from notionary.page.content.notion_page_content_chunker import (
|
14
|
-
NotionPageContentChunker,
|
15
|
-
)
|
16
|
-
from notionary.util.logging_mixin import LoggingMixin
|
17
|
-
|
18
|
-
|
19
|
-
class PageContentManager(LoggingMixin):
|
20
|
-
BATCH_SIZE = 100
|
21
|
-
|
22
|
-
def __init__(
|
23
|
-
self,
|
24
|
-
page_id: str,
|
25
|
-
client: NotionClient,
|
26
|
-
block_registry: Optional[BlockElementRegistry] = None,
|
27
|
-
):
|
28
|
-
self.page_id = page_id
|
29
|
-
self._client = client
|
30
|
-
self._markdown_to_notion_converter = MarkdownToNotionConverter(
|
31
|
-
block_registry=block_registry
|
32
|
-
)
|
33
|
-
self._notion_to_markdown_converter = NotionToMarkdownConverter(
|
34
|
-
block_registry=block_registry
|
35
|
-
)
|
36
|
-
self._chunker = NotionPageContentChunker()
|
37
|
-
|
38
|
-
async def append_markdown(self, markdown_text: str, append_divider = False) -> str:
|
39
|
-
"""
|
40
|
-
Append markdown text to a Notion page, automatically handling content length limits.
|
41
|
-
|
42
|
-
Args:
|
43
|
-
markdown_text: The markdown text to append
|
44
|
-
append_divider: If True, appends a divider after the markdown content (default: False)
|
45
|
-
"""
|
46
|
-
try:
|
47
|
-
# Just the markdown synthax for the divider as it will be converted to a Notion divider block
|
48
|
-
if append_divider:
|
49
|
-
markdown_text = markdown_text + "\n\n---\n\n"
|
50
|
-
|
51
|
-
blocks = self._markdown_to_notion_converter.convert(markdown_text)
|
52
|
-
fixed_blocks = self._chunker.fix_blocks_content_length(blocks)
|
53
|
-
|
54
|
-
total_blocks = len(fixed_blocks)
|
55
|
-
num_batches = (total_blocks + self.BATCH_SIZE - 1) // self.BATCH_SIZE
|
56
|
-
|
57
|
-
all_success = True
|
58
|
-
for batch_num in range(num_batches):
|
59
|
-
start_idx = batch_num * self.BATCH_SIZE
|
60
|
-
end_idx = min((batch_num + 1) * self.BATCH_SIZE, total_blocks)
|
61
|
-
batch = fixed_blocks[start_idx:end_idx]
|
62
|
-
|
63
|
-
batch_success = await self._process_batch(batch, batch_num, num_batches)
|
64
|
-
if not batch_success:
|
65
|
-
all_success = False
|
66
|
-
break
|
67
|
-
|
68
|
-
if all_success:
|
69
|
-
return f"Successfully added {total_blocks} blocks to the page in {num_batches} batch(es)."
|
70
|
-
return "Failed to add all blocks. See logs for details."
|
71
|
-
|
72
|
-
except Exception as e:
|
73
|
-
self.logger.error("Error appending markdown: %s", str(e))
|
74
|
-
raise
|
75
|
-
|
76
|
-
async def has_database_descendant(self, block_id: str) -> bool:
|
77
|
-
"""
|
78
|
-
Check if a block or any of its descendants is a database.
|
79
|
-
"""
|
80
|
-
resp = await self._client.get(f"blocks/{block_id}/children")
|
81
|
-
children = resp.get("results", []) if resp else []
|
82
|
-
|
83
|
-
for child in children:
|
84
|
-
block_type = child.get("type")
|
85
|
-
if block_type in ["child_database", "database", "linked_database"]:
|
86
|
-
return True
|
87
|
-
|
88
|
-
if child.get("has_children", False):
|
89
|
-
if await self.has_database_descendant(child["id"]):
|
90
|
-
return True
|
91
|
-
|
92
|
-
return False
|
93
|
-
|
94
|
-
async def delete_block_with_children(
|
95
|
-
self, block: Dict[str, Any], skip_databases: bool
|
96
|
-
) -> tuple[int, int]:
|
97
|
-
"""
|
98
|
-
Delete a block and all its children, optionally skipping databases.
|
99
|
-
Returns a tuple of (deleted_count, skipped_count).
|
100
|
-
"""
|
101
|
-
deleted = 0
|
102
|
-
skipped = 0
|
103
|
-
|
104
|
-
block_type = block.get("type")
|
105
|
-
if skip_databases and block_type in [
|
106
|
-
"child_database",
|
107
|
-
"database",
|
108
|
-
"linked_database",
|
109
|
-
]:
|
110
|
-
return 0, 1
|
111
|
-
|
112
|
-
if skip_databases and await self.has_database_descendant(block["id"]):
|
113
|
-
return 0, 1
|
114
|
-
|
115
|
-
# Process children first
|
116
|
-
if block.get("has_children", False):
|
117
|
-
children_resp = await self._client.get(f"blocks/{block['id']}/children")
|
118
|
-
for child in children_resp.get("results", []):
|
119
|
-
child_deleted, child_skipped = await self.delete_block_with_children(
|
120
|
-
child, skip_databases
|
121
|
-
)
|
122
|
-
deleted += child_deleted
|
123
|
-
skipped += child_skipped
|
124
|
-
|
125
|
-
# Then delete the block itself
|
126
|
-
if await self._client.delete(f"blocks/{block['id']}"):
|
127
|
-
deleted += 1
|
128
|
-
|
129
|
-
return deleted, skipped
|
130
|
-
|
131
|
-
async def clear(self, skip_databases: bool = True) -> str:
|
132
|
-
"""
|
133
|
-
Clear the content of the page, optionally preserving databases.
|
134
|
-
"""
|
135
|
-
blocks_resp = await self._client.get(f"blocks/{self.page_id}/children")
|
136
|
-
results = blocks_resp.get("results", []) if blocks_resp else []
|
137
|
-
|
138
|
-
total_deleted = 0
|
139
|
-
total_skipped = 0
|
140
|
-
|
141
|
-
for block in results:
|
142
|
-
deleted, skipped = await self.delete_block_with_children(
|
143
|
-
block, skip_databases
|
144
|
-
)
|
145
|
-
total_deleted += deleted
|
146
|
-
total_skipped += skipped
|
147
|
-
|
148
|
-
return (
|
149
|
-
f"Deleted {total_deleted} blocks. Skipped {total_skipped} database blocks."
|
150
|
-
)
|
151
|
-
|
152
|
-
async def get_blocks(self) -> List[Dict[str, Any]]:
|
153
|
-
result = await self._client.get(f"blocks/{self.page_id}/children")
|
154
|
-
if not result:
|
155
|
-
self.logger.error("Error retrieving page content: %s", result.error)
|
156
|
-
return []
|
157
|
-
return result.get("results", [])
|
158
|
-
|
159
|
-
async def get_block_children(self, block_id: str) -> List[Dict[str, Any]]:
|
160
|
-
result = await self._client.get(f"blocks/{block_id}/children")
|
161
|
-
if not result:
|
162
|
-
self.logger.error("Error retrieving block children: %s", result.error)
|
163
|
-
return []
|
164
|
-
return result.get("results", [])
|
165
|
-
|
166
|
-
async def get_page_blocks_with_children(
|
167
|
-
self, parent_id: Optional[str] = None
|
168
|
-
) -> List[Dict[str, Any]]:
|
169
|
-
blocks = (
|
170
|
-
await self.get_blocks()
|
171
|
-
if parent_id is None
|
172
|
-
else await self.get_block_children(parent_id)
|
173
|
-
)
|
174
|
-
|
175
|
-
if not blocks:
|
176
|
-
return []
|
177
|
-
|
178
|
-
for block in blocks:
|
179
|
-
if not block.get("has_children"):
|
180
|
-
continue
|
181
|
-
|
182
|
-
block_id = block.get("id")
|
183
|
-
if not block_id:
|
184
|
-
continue
|
185
|
-
|
186
|
-
# Recursive call for nested blocks
|
187
|
-
children = await self.get_page_blocks_with_children(block_id)
|
188
|
-
if children:
|
189
|
-
block["children"] = children
|
190
|
-
|
191
|
-
return blocks
|
192
|
-
|
193
|
-
async def get_text(self) -> str:
|
194
|
-
blocks = await self.get_page_blocks_with_children()
|
195
|
-
return self._notion_to_markdown_converter.convert(blocks)
|
196
|
-
|
197
|
-
|
198
|
-
async def _process_batch(self, batch: List[Dict], batch_num: int, num_batches: int) -> bool:
|
199
|
-
"""
|
200
|
-
Verarbeitet einen einzelnen Batch von Blöcken und gibt zurück, ob es erfolgreich war.
|
201
|
-
"""
|
202
|
-
result = await self._client.patch(
|
203
|
-
f"blocks/{self.page_id}/children", {"children": batch}
|
204
|
-
)
|
205
|
-
|
206
|
-
if not result:
|
207
|
-
self.logger.error("Failed to add batch %d/%d to page.", batch_num + 1, num_batches)
|
208
|
-
return False
|
209
|
-
|
210
|
-
self.logger.info("Successfully added batch %d/%d (%d blocks) to page.", batch_num + 1, num_batches, len(batch))
|
211
|
-
return True
|
@@ -1,116 +0,0 @@
|
|
1
|
-
from typing import Any, Dict, List, Optional
|
2
|
-
from dataclasses import dataclass
|
3
|
-
|
4
|
-
|
5
|
-
@dataclass
|
6
|
-
class PropertyOperationResult:
|
7
|
-
"""
|
8
|
-
Result of a property operation in Notion.
|
9
|
-
|
10
|
-
Attributes:
|
11
|
-
success: Whether the operation was successful
|
12
|
-
property_name: Name of the affected property
|
13
|
-
value: The value that was set or retrieved
|
14
|
-
error: Error message, if any
|
15
|
-
available_options: Available options for select-like properties
|
16
|
-
api_response: The original API response
|
17
|
-
"""
|
18
|
-
|
19
|
-
success: bool
|
20
|
-
property_name: str
|
21
|
-
value: Optional[Any] = None
|
22
|
-
error: Optional[str] = None
|
23
|
-
available_options: Optional[List[str]] = None
|
24
|
-
api_response: Optional[Dict[str, Any]] = None
|
25
|
-
|
26
|
-
# Common error messages
|
27
|
-
NO_API_RESPONSE = "Failed to set property (no API response)"
|
28
|
-
RELATION_TYPE_ERROR = "Property '{}' is of type 'relation'. Relations must be set using the RelationManager."
|
29
|
-
|
30
|
-
@classmethod
|
31
|
-
def from_success(
|
32
|
-
cls, property_name: str, value: Any, api_response: Dict[str, Any]
|
33
|
-
) -> "PropertyOperationResult":
|
34
|
-
"""Creates a success result."""
|
35
|
-
return cls(
|
36
|
-
success=True,
|
37
|
-
property_name=property_name,
|
38
|
-
value=value,
|
39
|
-
api_response=api_response,
|
40
|
-
)
|
41
|
-
|
42
|
-
@classmethod
|
43
|
-
def from_error(
|
44
|
-
cls,
|
45
|
-
property_name: str,
|
46
|
-
error: str,
|
47
|
-
value: Optional[Any] = None,
|
48
|
-
available_options: Optional[List[str]] = None,
|
49
|
-
) -> "PropertyOperationResult":
|
50
|
-
"""Creates an error result."""
|
51
|
-
return cls(
|
52
|
-
success=False,
|
53
|
-
property_name=property_name,
|
54
|
-
value=value,
|
55
|
-
error=error,
|
56
|
-
available_options=available_options or [],
|
57
|
-
)
|
58
|
-
|
59
|
-
@classmethod
|
60
|
-
def from_api_error(
|
61
|
-
cls, property_name: str, api_response: Dict[str, Any]
|
62
|
-
) -> "PropertyOperationResult":
|
63
|
-
"""Creates a result from an API error response."""
|
64
|
-
return cls(
|
65
|
-
success=False,
|
66
|
-
property_name=property_name,
|
67
|
-
error=api_response.get("message", "Unknown API error"),
|
68
|
-
api_response=api_response,
|
69
|
-
)
|
70
|
-
|
71
|
-
@classmethod
|
72
|
-
def from_no_api_response(
|
73
|
-
cls, property_name: str, value: Optional[Any] = None
|
74
|
-
) -> "PropertyOperationResult":
|
75
|
-
"""Creates a standardized result for missing API responses."""
|
76
|
-
return cls.from_error(property_name, cls.NO_API_RESPONSE, value)
|
77
|
-
|
78
|
-
@classmethod
|
79
|
-
def from_relation_type_error(
|
80
|
-
cls, property_name: str, value: Optional[Any] = None
|
81
|
-
) -> "PropertyOperationResult":
|
82
|
-
"""Creates a standardized error result for relation type properties."""
|
83
|
-
error_msg = cls.RELATION_TYPE_ERROR.format(property_name)
|
84
|
-
return cls.from_error(property_name, error_msg, value)
|
85
|
-
|
86
|
-
def to_dict(self) -> Dict[str, Any]:
|
87
|
-
"""Converts the result to a dictionary."""
|
88
|
-
result = {
|
89
|
-
"success": self.success,
|
90
|
-
"property": self.property_name,
|
91
|
-
}
|
92
|
-
|
93
|
-
if self.value is not None:
|
94
|
-
result["value"] = self.value
|
95
|
-
|
96
|
-
if not self.success:
|
97
|
-
result["error"] = self.error
|
98
|
-
|
99
|
-
if self.available_options:
|
100
|
-
result["available_options"] = self.available_options
|
101
|
-
|
102
|
-
if self.api_response:
|
103
|
-
result["api_response"] = self.api_response
|
104
|
-
|
105
|
-
return result
|
106
|
-
|
107
|
-
def __str__(self) -> str:
|
108
|
-
"""String representation of the result."""
|
109
|
-
if self.success:
|
110
|
-
return f"Success: Property '{self.property_name}' set to '{self.value}'"
|
111
|
-
|
112
|
-
if self.available_options:
|
113
|
-
options = "', '".join(self.available_options)
|
114
|
-
return f"Error: {self.error}\nAvailable options for '{self.property_name}': '{options}'"
|
115
|
-
|
116
|
-
return f"Error: {self.error}"
|
@@ -1,144 +0,0 @@
|
|
1
|
-
from typing import Any, Dict, List, Optional
|
2
|
-
from dataclasses import dataclass, field
|
3
|
-
|
4
|
-
|
5
|
-
@dataclass
|
6
|
-
class RelationOperationResult:
|
7
|
-
"""
|
8
|
-
Result of a relation operation in Notion.
|
9
|
-
|
10
|
-
Attributes:
|
11
|
-
success: Whether the operation was successful overall
|
12
|
-
property_name: Name of the affected relation property
|
13
|
-
found_pages: List of page titles/IDs that were successfully found
|
14
|
-
not_found_pages: List of page titles that could not be found
|
15
|
-
page_ids_added: List of page IDs that were added to the relation
|
16
|
-
error: Error message, if any
|
17
|
-
api_response: The original API response
|
18
|
-
"""
|
19
|
-
|
20
|
-
success: bool
|
21
|
-
property_name: str
|
22
|
-
found_pages: List[str] = field(default_factory=list)
|
23
|
-
not_found_pages: List[str] = field(default_factory=list)
|
24
|
-
page_ids_added: List[str] = field(default_factory=list)
|
25
|
-
error: Optional[str] = None
|
26
|
-
api_response: Optional[Dict[str, Any]] = None
|
27
|
-
|
28
|
-
NO_API_RESPONSE = "Failed to update relation (no API response)"
|
29
|
-
NO_PAGES_FOUND = "No valid pages found for relation"
|
30
|
-
|
31
|
-
@classmethod
|
32
|
-
def from_success(
|
33
|
-
cls,
|
34
|
-
property_name: str,
|
35
|
-
found_pages: List[str],
|
36
|
-
page_ids_added: List[str],
|
37
|
-
api_response: Dict[str, Any],
|
38
|
-
not_found_pages: Optional[List[str]] = None,
|
39
|
-
) -> "RelationOperationResult":
|
40
|
-
"""Creates a success result."""
|
41
|
-
return cls(
|
42
|
-
success=True,
|
43
|
-
property_name=property_name,
|
44
|
-
found_pages=found_pages,
|
45
|
-
not_found_pages=not_found_pages or [],
|
46
|
-
page_ids_added=page_ids_added,
|
47
|
-
api_response=api_response,
|
48
|
-
)
|
49
|
-
|
50
|
-
@classmethod
|
51
|
-
def from_error(
|
52
|
-
cls,
|
53
|
-
property_name: str,
|
54
|
-
error: str,
|
55
|
-
found_pages: Optional[List[str]] = None,
|
56
|
-
not_found_pages: Optional[List[str]] = None,
|
57
|
-
page_ids_added: Optional[List[str]] = None,
|
58
|
-
) -> "RelationOperationResult":
|
59
|
-
"""Creates an error result."""
|
60
|
-
return cls(
|
61
|
-
success=False,
|
62
|
-
property_name=property_name,
|
63
|
-
found_pages=found_pages or [],
|
64
|
-
not_found_pages=not_found_pages or [],
|
65
|
-
page_ids_added=page_ids_added or [],
|
66
|
-
error=error,
|
67
|
-
)
|
68
|
-
|
69
|
-
@classmethod
|
70
|
-
def from_no_pages_found(
|
71
|
-
cls, property_name: str, not_found_pages: List[str]
|
72
|
-
) -> "RelationOperationResult":
|
73
|
-
"""Creates a standardized result for when no pages were found."""
|
74
|
-
return cls.from_error(
|
75
|
-
property_name=property_name,
|
76
|
-
error=cls.NO_PAGES_FOUND,
|
77
|
-
not_found_pages=not_found_pages,
|
78
|
-
)
|
79
|
-
|
80
|
-
@classmethod
|
81
|
-
def from_no_api_response(
|
82
|
-
cls, property_name: str, found_pages: List[str], page_ids_added: List[str]
|
83
|
-
) -> "RelationOperationResult":
|
84
|
-
"""Creates a standardized result for a missing API response."""
|
85
|
-
return cls.from_error(
|
86
|
-
property_name=property_name,
|
87
|
-
error=cls.NO_API_RESPONSE,
|
88
|
-
found_pages=found_pages,
|
89
|
-
page_ids_added=page_ids_added,
|
90
|
-
)
|
91
|
-
|
92
|
-
@property
|
93
|
-
def has_not_found_pages(self) -> bool:
|
94
|
-
"""Returns True if there were any pages that couldn't be found."""
|
95
|
-
return len(self.not_found_pages) > 0
|
96
|
-
|
97
|
-
@property
|
98
|
-
def has_found_pages(self) -> bool:
|
99
|
-
"""Returns True if any pages were found."""
|
100
|
-
return len(self.found_pages) > 0
|
101
|
-
|
102
|
-
def to_dict(self) -> Dict[str, Any]:
|
103
|
-
"""Converts the result to a dictionary."""
|
104
|
-
result = {
|
105
|
-
"success": self.success,
|
106
|
-
"property": self.property_name,
|
107
|
-
}
|
108
|
-
|
109
|
-
if self.found_pages:
|
110
|
-
result["found_pages"] = self.found_pages
|
111
|
-
|
112
|
-
if self.not_found_pages:
|
113
|
-
result["not_found_pages"] = self.not_found_pages
|
114
|
-
|
115
|
-
if self.page_ids_added:
|
116
|
-
result["page_ids_added"] = self.page_ids_added
|
117
|
-
|
118
|
-
if not self.success:
|
119
|
-
result["error"] = self.error
|
120
|
-
|
121
|
-
if self.api_response:
|
122
|
-
result["api_response"] = self.api_response
|
123
|
-
|
124
|
-
return result
|
125
|
-
|
126
|
-
def __str__(self) -> str:
|
127
|
-
"""String representation of the result."""
|
128
|
-
if self.success:
|
129
|
-
base = f"Success: Added {len(self.page_ids_added)} relation(s) to property '{self.property_name}'"
|
130
|
-
|
131
|
-
if self.not_found_pages:
|
132
|
-
pages_str = "', '".join(self.not_found_pages)
|
133
|
-
base += f"\nWarning: Could not find pages: '{pages_str}'"
|
134
|
-
|
135
|
-
return base
|
136
|
-
|
137
|
-
if not self.found_pages and self.not_found_pages:
|
138
|
-
pages_str = "', '".join(self.not_found_pages)
|
139
|
-
return f"Error: {self.error}\nNone of the requested pages were found: '{pages_str}'"
|
140
|
-
|
141
|
-
if self.found_pages and not self.page_ids_added:
|
142
|
-
return f"Error: {self.error}\nPages were found but could not be added to the relation."
|
143
|
-
|
144
|
-
return f"Error: {self.error}"
|
@@ -1,58 +0,0 @@
|
|
1
|
-
notionary/__init__.py,sha256=ypCkbF1YEcwy5aE2kGFmtJOZq41Vs01lahJNqRO27fU,735
|
2
|
-
notionary/notion_client.py,sha256=6YhaDK9UjH18Q0f1bxVVNGMbCvpQhatse6WRVIARGCE,6035
|
3
|
-
notionary/database/database_discovery.py,sha256=qDGFhXG9s-_6CXdRg8tMiwX4dvX7jLjgAUFPSNlYtlI,4506
|
4
|
-
notionary/database/database_info_service.py,sha256=Ig6gx8jUSPYORJvfgEV5kV6t72pZQsWU8HPMqd43B-o,1336
|
5
|
-
notionary/database/notion_database.py,sha256=YCOuzrWfKRJvMiWdVfEt8i3NAEqpKDwHj5SX4GUraEk,8017
|
6
|
-
notionary/database/notion_database_factory.py,sha256=Af57yaUHidD8TKJ8uyXOc2nnqHm7on6VGFdDRjxiq9o,6692
|
7
|
-
notionary/database/models/page_result.py,sha256=Vmm5_oYpYAkIIJVoTd1ZZGloeC3cmFLMYP255mAmtaw,233
|
8
|
-
notionary/elements/audio_element.py,sha256=WpcUpIv4U9grZegiCAmyc-Gj3XM3TQVFKr9PQM-QErg,5352
|
9
|
-
notionary/elements/bookmark_element.py,sha256=MS2K3pD-hMmS4Fmk1W8BwNL_-j4baHF42EoOWMNIfXw,8152
|
10
|
-
notionary/elements/bulleted_list_element.py,sha256=VdMKlxDlixTeYVQIqwM4vQ55xHqABtqzZDqIUATG9oE,2875
|
11
|
-
notionary/elements/callout_element.py,sha256=11qr9XGpF7jWle0wbog5eUrE4SAkThDdK9s4oplOxX0,4499
|
12
|
-
notionary/elements/code_block_element.py,sha256=6E-fc9zJegSQ_FjB08HImXL2rDQnmkFoRwoPuN-7PwI,6247
|
13
|
-
notionary/elements/divider_element.py,sha256=fLWU7Pn0JXIV8tPcuxvMMua4S54JOi2hQRjLcbVwC7g,2218
|
14
|
-
notionary/elements/embed_element.py,sha256=NEQopRLMzMIybVLbTt_y1cgaH1-VZW14xkbGJIDirkE,4586
|
15
|
-
notionary/elements/heading_element.py,sha256=Su4OUYeDvb9kvAFCmzagKQCNgkwvxsUn1KXJFTuYTFE,3186
|
16
|
-
notionary/elements/image_element.py,sha256=Qo94TavAnmJzGveDfdSkOAZeypij-zqbxsJ14rfbKIc,4765
|
17
|
-
notionary/elements/mention_element.py,sha256=B88AcU4XqpEXfhXywS_3K7TJIgoJT_3tWzJ_KcdJ4V4,8234
|
18
|
-
notionary/elements/notion_block_element.py,sha256=HN1Bu9wAaFsRIN6jkZSclo6KgB4nNvcVx7hlPWIhmy8,1265
|
19
|
-
notionary/elements/numbered_list_element.py,sha256=zW1MjNU_02mJBDGnaQFkAESY_i1rCYgp9o4zl6Au0DQ,2865
|
20
|
-
notionary/elements/paragraph_element.py,sha256=JuAN4cFRsJkePD7s7TNhDdSuojZtr6WOaCTGzJsBEGg,3262
|
21
|
-
notionary/elements/qoute_element.py,sha256=jG4FkD7Ieec3piBWcOeCZPgvw0GF0KZlxzdx2svQC0M,6129
|
22
|
-
notionary/elements/table_element.py,sha256=ujlo6bwrmKrQWRWGuUQebeDS-1T-c_R0SkzaPEPy2m8,11256
|
23
|
-
notionary/elements/text_inline_formatter.py,sha256=RdegEHvS5_AzDtqYxKb4b0uDbcpp3UhxHo6GyR84NFc,7780
|
24
|
-
notionary/elements/todo_element.py,sha256=cWuu8R55hNj6ubjrLu2yJpoeij7UfWhvmaklqcx8AI8,4131
|
25
|
-
notionary/elements/toggle_element.py,sha256=o7Utj0nKZAW5MzF_RMyD36HSWMj1cZmLEmqfGH-BFuY,11089
|
26
|
-
notionary/elements/toggleable_heading_element.py,sha256=EAkL9mU6u13JEgUOx6CeAhD8P3L_q6L_M_C8qZ_OTSs,9967
|
27
|
-
notionary/elements/video_element.py,sha256=2WwvZuG_UOVBnpEikZFxupe_x321QkczrodZHd5IeCw,5734
|
28
|
-
notionary/elements/prompts/element_prompt_content.py,sha256=Snha2FMtWO94kl1KwIJp6n7pY6Z8K-9_zVj1TUyaNNA,3729
|
29
|
-
notionary/elements/prompts/synthax_prompt_builder.py,sha256=W3ex5RDszlhMgYPGpemxiEI653hQKl147B-bh_ynR9g,6656
|
30
|
-
notionary/elements/registry/block_element_registry.py,sha256=r1V6waYQxZ_4bF6Mx_HmQ42-yhh8E54v-yNRT4PsnLk,3570
|
31
|
-
notionary/elements/registry/block_element_registry_builder.py,sha256=C6W64CwFqZBu31hZZqoD-uCZCOMOOXeFVk_SHKSp58U,9048
|
32
|
-
notionary/exceptions/database_exceptions.py,sha256=I-Tx6bYRLpi5pjGPtbT-Mqxvz3BFgYTiuZxknJeLxtI,2638
|
33
|
-
notionary/exceptions/page_creation_exception.py,sha256=4v7IuZD6GsQLrqhDLriGjuG3ML638gAO53zDCrLePuU,281
|
34
|
-
notionary/page/markdown_to_notion_converter.py,sha256=LFnv98uU3QRzxH7sZI0AE5_QxeHkNQZMxVcab-r8Qls,15877
|
35
|
-
notionary/page/notion_page.py,sha256=GkQ7m50e1wPFd-El7JtdIuJr4eSGyBA8Bt4OXqN8yew,17708
|
36
|
-
notionary/page/notion_page_factory.py,sha256=UUEZ-cyEWL0OMVPrgjc4vJdcplEa1bO2yHCYooACYC8,8189
|
37
|
-
notionary/page/notion_to_markdown_converter.py,sha256=EUiHeurQb73zQJ5Gatvf_67vWd-vOI8qg3yFLz8bf8Q,6452
|
38
|
-
notionary/page/content/notion_page_content_chunker.py,sha256=xRks74Dqec-De6-AVTxMPnXs-MSJBzSm1HfJfaHiKr8,3330
|
39
|
-
notionary/page/content/page_content_manager.py,sha256=mzY-w68LUQD4Nv-iAqVf8v5TsCKzZJbbZZkYXokkl40,7796
|
40
|
-
notionary/page/metadata/metadata_editor.py,sha256=61uiw8oB25O8ePhytoJvZDetuof5sjPoM6aoHZGo4wc,4949
|
41
|
-
notionary/page/metadata/notion_icon_manager.py,sha256=I4MczURRYc1PV0qDFwbCCzicqiDyOhKpdk9E2b9lWMc,1579
|
42
|
-
notionary/page/metadata/notion_page_cover_manager.py,sha256=hasXPIbTy9rD55tHr_zzF2yj_lD0RsULz5UP0rNRx4g,1929
|
43
|
-
notionary/page/properites/database_property_service.py,sha256=AJuBGahbb53VQa6IGGHxBMoOgCy6vFZg08uR_eDjNUs,11570
|
44
|
-
notionary/page/properites/page_property_manager.py,sha256=Xl8Cwn8WVszqpFXT_NvASkmP5igpCTEgRVhG_F45424,6914
|
45
|
-
notionary/page/properites/property_formatter.py,sha256=d_Nr5XQxgjB6VIS0u3ey14MOUKY416o_BvdXjbkUNAQ,3667
|
46
|
-
notionary/page/properites/property_operation_result.py,sha256=PhxHJJxxG2BdDl7aswhWnMSmf9RQtoinKkRHDoqxwCs,3913
|
47
|
-
notionary/page/properites/property_value_extractor.py,sha256=1BfyCYrFzfIUmNTozavrLTjG--6P6Dy2tkewf6rHHwQ,2353
|
48
|
-
notionary/page/relations/notion_page_relation_manager.py,sha256=ooN-WxXNPBE_vkNJgbc1wH8iIWBlKa9FHgiMeJjbYdw,13032
|
49
|
-
notionary/page/relations/notion_page_title_resolver.py,sha256=XQpa5XY4hoh5UYqpewTYaaftNX52WHyk2XmM4r8B2uY,3016
|
50
|
-
notionary/page/relations/page_database_relation.py,sha256=F9aGXFjjL8ZLNbfTGeGm_QAyXhz2AEOw7GgDLdprEcE,2313
|
51
|
-
notionary/page/relations/relation_operation_result.py,sha256=NDxBzGntOxc_89ti-HG8xDSqfY6PwyGHKHrrKbCzNjM,5010
|
52
|
-
notionary/util/logging_mixin.py,sha256=fKsx9t90bwvL74ZX3dU-sXdC4TZCQyO6qU9I8txkw_U,1369
|
53
|
-
notionary/util/page_id_utils.py,sha256=EYNMxgf-7ghzL5K8lKZBZfW7g5CsdY0Xuj4IYmU8RPk,1381
|
54
|
-
notionary-0.1.29.dist-info/licenses/LICENSE,sha256=zOm3cRT1qD49eg7vgw95MI79rpUAZa1kRBFwL2FkAr8,1120
|
55
|
-
notionary-0.1.29.dist-info/METADATA,sha256=69g2NERYbBfVTloeDP3yKBtTV_n2fL8iJ2UOrY9TdjQ,8342
|
56
|
-
notionary-0.1.29.dist-info/WHEEL,sha256=GHB6lJx2juba1wDgXDNlMTyM13ckjBMKf-OnwgKOCtA,91
|
57
|
-
notionary-0.1.29.dist-info/top_level.txt,sha256=fhONa6BMHQXqthx5PanWGbPL0b8rdFqhrJKVLf_adSs,10
|
58
|
-
notionary-0.1.29.dist-info/RECORD,,
|
File without changes
|
File without changes
|