notionary 0.2.2__py3-none-any.whl → 0.2.3__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.
@@ -67,7 +67,7 @@ class BlockRegistryBuilder:
67
67
  .with_paragraphs()
68
68
  .with_toggleable_heading_element()
69
69
  ).build()
70
-
70
+
71
71
  @classmethod
72
72
  def create_minimal_registry(cls) -> BlockRegistry:
73
73
  """
@@ -1,4 +1,3 @@
1
-
2
1
  from pydantic import BaseModel
3
2
  from dataclasses import dataclass
4
3
  from typing import Optional, List, Dict, Any, Literal
@@ -55,4 +54,4 @@ class NotionDatabaseResponse(BaseModel):
55
54
  public_url: Optional[str]
56
55
  archived: bool
57
56
  in_trash: bool
58
- request_id: Optional[str] = None
57
+ request_id: Optional[str] = None
@@ -69,8 +69,6 @@ class NotionClient(LoggingMixin):
69
69
  """
70
70
  return await self._make_request(HttpMethod.GET, endpoint)
71
71
 
72
- # TODO: Get Blocks implementeren und Patch Blcoks hierfür das Typing finden:
73
-
74
72
  async def get_database(self, database_id: str) -> NotionDatabaseResponse:
75
73
  """
76
74
  Ruft die Metadaten einer Notion-Datenbank anhand ihrer ID ab und gibt sie als NotionPageResponse zurück.
@@ -20,14 +20,19 @@ class MarkdownSyntaxPromptGenerator:
20
20
  """
21
21
  Lädt das Prompt-Template aus der Markdown-Datei.
22
22
  """
23
- current_dir = Path(__file__).parent
24
- template_path = current_dir / "res/notion_syntax_prompt.md"
23
+ current_file = Path(__file__).resolve()
24
+ current_dir = current_file.parent
25
+ template_path = current_dir / "res" / "notion_syntax_prompt.md"
25
26
 
26
27
  try:
27
28
  with open(template_path, "r", encoding="utf-8") as file:
28
29
  return file.read()
29
30
  except FileNotFoundError:
30
- raise FileNotFoundError(f"Template file not found at {template_path}")
31
+ raise FileNotFoundError(
32
+ f"Template file not found at {template_path}\n"
33
+ f"Current working directory: {os.getcwd()}\n"
34
+ f"Script location: {current_file}"
35
+ )
31
36
  except Exception as e:
32
37
  raise RuntimeError(f"Error loading template file: {e}")
33
38
 
@@ -89,4 +94,4 @@ class MarkdownSyntaxPromptGenerator:
89
94
  # Erstelle eine Instanz, um das Template zu laden
90
95
  instance = cls()
91
96
  element_docs = cls.generate_element_docs(element_classes)
92
- return instance.SYSTEM_PROMPT_TEMPLATE.format(element_docs=element_docs)
97
+ return instance.SYSTEM_PROMPT_TEMPLATE.format(element_docs=element_docs)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: notionary
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: A toolkit to convert between Markdown and Notion blocks
5
5
  Home-page: https://github.com/mathisarends/notionary
6
6
  Author: Mathis Arends
@@ -1,5 +1,5 @@
1
1
  notionary/__init__.py,sha256=hPvZ-iqt5R_dAs9KaRBhC5eXzuQ5uvt-9EaU2O_7bZw,691
2
- notionary/notion_client.py,sha256=1TfXiEg9ixE_ZT9iL6zSs7WphOoNlEQmTsaJAt6P3hA,7410
2
+ notionary/notion_client.py,sha256=O-lvy2-jMNSDc_8cWKuGVfckCdc1_PiQOlfxQKjQ6_A,7325
3
3
  notionary/database/database_discovery.py,sha256=qDGFhXG9s-_6CXdRg8tMiwX4dvX7jLjgAUFPSNlYtlI,4506
4
4
  notionary/database/notion_database.py,sha256=zbHPejETr101pprd7kewZ555d_TONN_wJi7b9Eyfoyg,7634
5
5
  notionary/database/notion_database_factory.py,sha256=FmijGYz6A4mCWVionOg9sxgFXfb9he52xdgNswJw24k,6584
@@ -25,11 +25,11 @@ notionary/elements/toggle_element.py,sha256=h9vYkkAIUHzn-0mu31qC6UPdlk_0EFIsU5A4
25
25
  notionary/elements/toggleable_heading_element.py,sha256=XdaPsd8anufwAACL8J-Egd_RcqPqZ1gFlzeol1GOyyc,9960
26
26
  notionary/elements/video_element.py,sha256=y0OmOYXdQBc2rSYAHRmA4l4rzNqPnyhuXbEipcgzQgY,5727
27
27
  notionary/elements/registry/block_registry.py,sha256=giWGcdgc3Z60wvfUr-FS6UMc-k-Q6DlXO8T0gl4fVC8,5027
28
- notionary/elements/registry/block_registry_builder.py,sha256=5dQhWiJ7jsyKUin1y7r-1Cmp0oOEAIfh6g91w8O4ydI,9319
28
+ notionary/elements/registry/block_registry_builder.py,sha256=Wnob3PbgzVAoXBW0Eon1KzX4aD4d36KeaDe_uYIKFnU,9311
29
29
  notionary/exceptions/database_exceptions.py,sha256=I-Tx6bYRLpi5pjGPtbT-Mqxvz3BFgYTiuZxknJeLxtI,2638
30
30
  notionary/exceptions/page_creation_exception.py,sha256=4v7IuZD6GsQLrqhDLriGjuG3ML638gAO53zDCrLePuU,281
31
31
  notionary/models/notion_block_response.py,sha256=gzL4C6K9QPcaMS6NbAZaRceSEnMbNwYBVVzxysza5VU,6002
32
- notionary/models/notion_database_response.py,sha256=k-IRInJPN63vAWpg3MKO6Oc7594V5vG6ljjOKvSMxp8,1213
32
+ notionary/models/notion_database_response.py,sha256=FMAasQP20S12J_KMdMlNpcHHwxFKX2YtbE4Q9xn-ruQ,1213
33
33
  notionary/models/notion_page_response.py,sha256=r4fwMwwDocj92JdbSmyrzIqBKsnEaz4aDUiPabrg9BM,1762
34
34
  notionary/page/markdown_to_notion_converter.py,sha256=EuqUGNv2HZu67INOnGheeJkt7WHTWGuLnhEG72_Wv5Y,15833
35
35
  notionary/page/notion_page.py,sha256=NDxAJaNk4tlKUrenhKBdnuvjlVgnxC0Z6fprf2LyNeE,18046
@@ -49,12 +49,12 @@ notionary/page/relations/notion_page_relation_manager.py,sha256=tfkvLHClaYel_uEa
49
49
  notionary/page/relations/notion_page_title_resolver.py,sha256=dIjiEeHjjNT-DrIhz1nynkfHkMpUuJJFOEjb25Wy7f4,3575
50
50
  notionary/page/relations/page_database_relation.py,sha256=8lEp8fQjPwjWhA8nZu3k8mW6EEc54ki1Uwf4iUV1DOU,2245
51
51
  notionary/prompting/element_prompt_content.py,sha256=tHref-SKA81Ua_IQD2Km7y7BvFtHl74haSIjHNYE3FE,4403
52
- notionary/prompting/markdown_syntax_prompt_generator.py,sha256=xKzTF62SFKzadyC7FHcOxWueRzkKiJ054pBHu9B4aLg,3155
52
+ notionary/prompting/markdown_syntax_prompt_generator.py,sha256=N6t9FHS_4IP9L5-zFpTM6iS7E-QJvoe7muPwEnF3UgQ,3352
53
53
  notionary/util/logging_mixin.py,sha256=b6wHj0IoVSWXbHh0yynfJlwvIR33G2qmaGNzrqyb7Gs,1825
54
54
  notionary/util/page_id_utils.py,sha256=EYNMxgf-7ghzL5K8lKZBZfW7g5CsdY0Xuj4IYmU8RPk,1381
55
55
  notionary/util/warn_direct_constructor_usage.py,sha256=vyJR73F95XVSRWIbyij-82IGOpAne9SBPM25eDpZfSU,1715
56
- notionary-0.2.2.dist-info/licenses/LICENSE,sha256=zOm3cRT1qD49eg7vgw95MI79rpUAZa1kRBFwL2FkAr8,1120
57
- notionary-0.2.2.dist-info/METADATA,sha256=O_A1Bnrg57G52QbqcILdspn6hi-juDA2_qaw9oavQ9g,8374
58
- notionary-0.2.2.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
59
- notionary-0.2.2.dist-info/top_level.txt,sha256=fhONa6BMHQXqthx5PanWGbPL0b8rdFqhrJKVLf_adSs,10
60
- notionary-0.2.2.dist-info/RECORD,,
56
+ notionary-0.2.3.dist-info/licenses/LICENSE,sha256=zOm3cRT1qD49eg7vgw95MI79rpUAZa1kRBFwL2FkAr8,1120
57
+ notionary-0.2.3.dist-info/METADATA,sha256=5GDY-SZ4tVpUd_3KdQo6jNWMc7PCv4sQWHuAhnL3ALs,8374
58
+ notionary-0.2.3.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
59
+ notionary-0.2.3.dist-info/top_level.txt,sha256=fhONa6BMHQXqthx5PanWGbPL0b8rdFqhrJKVLf_adSs,10
60
+ notionary-0.2.3.dist-info/RECORD,,