notionary 0.1.24__py3-none-any.whl → 0.1.25__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/elements/code_block_element.py +2 -2
- notionary/elements/prompts/element_prompt_content.py +1 -2
- notionary/elements/prompts/synthax_prompt_builder.py +1 -1
- notionary/elements/registry/block_element_registry.py +1 -1
- notionary/page/content/page_content_manager.py +6 -4
- notionary/page/notion_page.py +4 -2
- {notionary-0.1.24.dist-info → notionary-0.1.25.dist-info}/METADATA +1 -1
- {notionary-0.1.24.dist-info → notionary-0.1.25.dist-info}/RECORD +11 -11
- {notionary-0.1.24.dist-info → notionary-0.1.25.dist-info}/WHEEL +0 -0
- {notionary-0.1.24.dist-info → notionary-0.1.25.dist-info}/licenses/LICENSE +0 -0
- {notionary-0.1.24.dist-info → notionary-0.1.25.dist-info}/top_level.txt +0 -0
@@ -155,5 +155,5 @@ class CodeBlockElement(NotionBlockElement):
|
|
155
155
|
'```json\n{"name": "Alice", "age": 30}\n```',
|
156
156
|
"```mermaid\nflowchart TD\n A --> B\n```",
|
157
157
|
],
|
158
|
-
"avoid": "NEVER EVER wrap markdown content with ```markdown. Markdown should be written directly without code block formatting. NEVER use ```markdown under any circumstances."
|
159
|
-
}
|
158
|
+
"avoid": "NEVER EVER wrap markdown content with ```markdown. Markdown should be written directly without code block formatting. NEVER use ```markdown under any circumstances.",
|
159
|
+
}
|
@@ -67,7 +67,7 @@ CRITICAL USAGE GUIDELINES:
|
|
67
67
|
f"**Example:** {content['examples'][0]}" if content["examples"] else "",
|
68
68
|
f"**When to use:** {content['when_to_use']}",
|
69
69
|
]
|
70
|
-
|
70
|
+
|
71
71
|
if "avoid" in content and content["avoid"]:
|
72
72
|
doc_parts.append(f"**Avoid:** {content['avoid']}")
|
73
73
|
|
@@ -32,18 +32,20 @@ class PageContentManager(LoggingMixin):
|
|
32
32
|
)
|
33
33
|
self._chunker = NotionPageContentChunker()
|
34
34
|
|
35
|
-
async def append_markdown(
|
35
|
+
async def append_markdown(
|
36
|
+
self, markdown_text: str, append_divider: bool = False
|
37
|
+
) -> str:
|
36
38
|
"""
|
37
39
|
Append markdown text to a Notion page, automatically handling content length limits.
|
38
40
|
First strips out triple backtick markdown fences if they wrap the entire content.
|
39
|
-
|
41
|
+
|
40
42
|
Args:
|
41
43
|
markdown_text: The markdown text to append
|
42
44
|
append_divider: If True, appends a divider after the markdown content (default: False)
|
43
45
|
"""
|
44
46
|
try:
|
45
47
|
blocks = self._markdown_to_notion_converter.convert(markdown_text)
|
46
|
-
|
48
|
+
|
47
49
|
if append_divider:
|
48
50
|
divider_block = {"type": "divider", "divider": {}}
|
49
51
|
blocks.append(divider_block)
|
@@ -180,4 +182,4 @@ class PageContentManager(LoggingMixin):
|
|
180
182
|
|
181
183
|
async def get_text(self) -> str:
|
182
184
|
blocks = await self.get_page_blocks_with_children()
|
183
|
-
return self._notion_to_markdown_converter.convert(blocks)
|
185
|
+
return self._notion_to_markdown_converter.convert(blocks)
|
notionary/page/notion_page.py
CHANGED
@@ -130,7 +130,7 @@ class NotionPage(LoggingMixin):
|
|
130
130
|
self._url_loaded = True
|
131
131
|
return self._url
|
132
132
|
|
133
|
-
async def append_markdown(self, markdown: str) -> str:
|
133
|
+
async def append_markdown(self, markdown: str, append_divider=False) -> str:
|
134
134
|
"""
|
135
135
|
Append markdown content to the page.
|
136
136
|
|
@@ -140,7 +140,9 @@ class NotionPage(LoggingMixin):
|
|
140
140
|
Returns:
|
141
141
|
str: Status or confirmation message.
|
142
142
|
"""
|
143
|
-
return await self._page_content_manager.append_markdown(
|
143
|
+
return await self._page_content_manager.append_markdown(
|
144
|
+
markdown_text=markdown, append_divider=append_divider
|
145
|
+
)
|
144
146
|
|
145
147
|
async def clear(self) -> str:
|
146
148
|
"""
|
@@ -9,7 +9,7 @@ notionary/elements/audio_element.py,sha256=KuPA30Ii0Bv0WcAOOze_XBB98W0kMZSSWZ3An
|
|
9
9
|
notionary/elements/bookmark_element.py,sha256=hnDpAQsNfN1nUORuxfsEyg6Tustck1wcfynNumlLSFI,7931
|
10
10
|
notionary/elements/bulleted_list_element.py,sha256=-0_CeCfjHOkgYmK6m8Jl6uQasp8HepwSojCJKh5NhPo,2721
|
11
11
|
notionary/elements/callout_element.py,sha256=GA5vIhepgy7tuf4o18LWroVwuVEP08Hc-8zuKHBQKGs,4037
|
12
|
-
notionary/elements/code_block_element.py,sha256
|
12
|
+
notionary/elements/code_block_element.py,sha256=wTy9bDQjK-Wm4Ip9upiuVtH168brVC0iU06uBxz2bkI,5763
|
13
13
|
notionary/elements/column_element.py,sha256=v2O5lgewFeA9YE99XqhPxp6ujtHW1LfMKclPDERqbeU,10794
|
14
14
|
notionary/elements/divider_element.py,sha256=FUYc2rn7cSyHbuOlQdECJWVfMYcyY5BPDaSCyXkIESs,1988
|
15
15
|
notionary/elements/embed_element.py,sha256=i4DaDk-xvCxIV-D-OwcEy1lng_eac8U1jDfKOyMVSnY,4382
|
@@ -25,18 +25,18 @@ notionary/elements/text_inline_formatter.py,sha256=wvUdbDPoiVXcSZEMWy_1RAN2UcwwA
|
|
25
25
|
notionary/elements/todo_lists.py,sha256=gyktOvG1tSQvta_SjDauowfP__woJ9ySUHzwMwlN7Cg,3914
|
26
26
|
notionary/elements/toggle_element.py,sha256=UZvvOeVlayMCoXi5bvYTreMq9-3W4TrP6Gs2uUJ8qsE,8149
|
27
27
|
notionary/elements/video_element.py,sha256=37KzUkbUrxXgIxbhrq0iDAR_Mr-q7b4FlLTn7IonoKg,5513
|
28
|
-
notionary/elements/prompts/element_prompt_content.py,sha256=
|
29
|
-
notionary/elements/prompts/synthax_prompt_builder.py,sha256=
|
30
|
-
notionary/elements/registry/block_element_registry.py,sha256
|
28
|
+
notionary/elements/prompts/element_prompt_content.py,sha256=cVxPSFTIfn2ceTrdYVpbDqPYuHgpQ-30Y9BxRVhwJSM,791
|
29
|
+
notionary/elements/prompts/synthax_prompt_builder.py,sha256=v-6oakV_8joJp8QN2qgA4_Pmko3mU0yRlCWaWHHe-_o,4389
|
30
|
+
notionary/elements/registry/block_element_registry.py,sha256=r1V6waYQxZ_4bF6Mx_HmQ42-yhh8E54v-yNRT4PsnLk,3570
|
31
31
|
notionary/elements/registry/block_element_registry_builder.py,sha256=N5SqUqSxDoNDxg4iOwCu9KsfTYj_KD0832oNpwS-pSw,9042
|
32
32
|
notionary/exceptions/database_exceptions.py,sha256=I-Tx6bYRLpi5pjGPtbT-Mqxvz3BFgYTiuZxknJeLxtI,2638
|
33
33
|
notionary/exceptions/page_creation_exception.py,sha256=4v7IuZD6GsQLrqhDLriGjuG3ML638gAO53zDCrLePuU,281
|
34
34
|
notionary/page/markdown_to_notion_converter.py,sha256=AY-b-qjqs4Xc1j1I9GwijXdOAPYpgvbHF9NRuUXgHVg,15081
|
35
|
-
notionary/page/notion_page.py,sha256=
|
35
|
+
notionary/page/notion_page.py,sha256=impnmdFj4U64wtk9K7PQREVClSnop-L9OtnWM2JGxIM,17740
|
36
36
|
notionary/page/notion_page_factory.py,sha256=UUEZ-cyEWL0OMVPrgjc4vJdcplEa1bO2yHCYooACYC8,8189
|
37
37
|
notionary/page/notion_to_markdown_converter.py,sha256=qZIeZjDpeGFgW5RGTrcfi0mVI6NT0VvXeHM7jpP6ZHo,8067
|
38
38
|
notionary/page/content/notion_page_content_chunker.py,sha256=xRks74Dqec-De6-AVTxMPnXs-MSJBzSm1HfJfaHiKr8,3330
|
39
|
-
notionary/page/content/page_content_manager.py,sha256=
|
39
|
+
notionary/page/content/page_content_manager.py,sha256=2_q_3GseiogROxDMIP2bpLpkxc1vwJRDatcH7hvCkrA,6584
|
40
40
|
notionary/page/metadata/metadata_editor.py,sha256=61uiw8oB25O8ePhytoJvZDetuof5sjPoM6aoHZGo4wc,4949
|
41
41
|
notionary/page/metadata/notion_icon_manager.py,sha256=ixZrWsHGVpmF05Ncy9LCt8vZlKAQHYFZW-2yI5JZZDI,1426
|
42
42
|
notionary/page/metadata/notion_page_cover_manager.py,sha256=qgQxQE-bx4oWjLFUQvpXD5GzO1Mx7w7htz1xC2BOqUg,1717
|
@@ -51,8 +51,8 @@ notionary/page/relations/page_database_relation.py,sha256=F9aGXFjjL8ZLNbfTGeGm_Q
|
|
51
51
|
notionary/page/relations/relation_operation_result.py,sha256=NDxBzGntOxc_89ti-HG8xDSqfY6PwyGHKHrrKbCzNjM,5010
|
52
52
|
notionary/util/logging_mixin.py,sha256=fKsx9t90bwvL74ZX3dU-sXdC4TZCQyO6qU9I8txkw_U,1369
|
53
53
|
notionary/util/page_id_utils.py,sha256=EYNMxgf-7ghzL5K8lKZBZfW7g5CsdY0Xuj4IYmU8RPk,1381
|
54
|
-
notionary-0.1.
|
55
|
-
notionary-0.1.
|
56
|
-
notionary-0.1.
|
57
|
-
notionary-0.1.
|
58
|
-
notionary-0.1.
|
54
|
+
notionary-0.1.25.dist-info/licenses/LICENSE,sha256=zOm3cRT1qD49eg7vgw95MI79rpUAZa1kRBFwL2FkAr8,1120
|
55
|
+
notionary-0.1.25.dist-info/METADATA,sha256=tpuLGOyAZhAv9u3WoE2MywEosgBqwDJiapjBrkW96gc,8342
|
56
|
+
notionary-0.1.25.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
57
|
+
notionary-0.1.25.dist-info/top_level.txt,sha256=fhONa6BMHQXqthx5PanWGbPL0b8rdFqhrJKVLf_adSs,10
|
58
|
+
notionary-0.1.25.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|