notionary 0.1.10__py3-none-any.whl → 0.1.12__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 +13 -2
- notionary/core/converters/elements/audio_element.py +143 -0
- notionary/core/converters/elements/embed_element.py +2 -4
- notionary/core/converters/elements/toggle_element.py +28 -20
- notionary/core/converters/markdown_to_notion_converter.py +70 -109
- notionary/core/converters/registry/block_element_registry.py +2 -6
- notionary/core/converters/registry/block_element_registry_builder.py +2 -0
- notionary/core/database/database_discovery.py +140 -0
- notionary/core/database/notion_database_manager.py +26 -49
- notionary/core/database/notion_database_manager_factory.py +10 -4
- notionary/core/notion_client.py +4 -2
- notionary/core/page/content/notion_page_content_chunker.py +84 -0
- notionary/core/page/content/page_content_manager.py +26 -8
- notionary/core/page/metadata/metadata_editor.py +57 -44
- notionary/core/page/metadata/notion_icon_manager.py +9 -11
- notionary/core/page/metadata/notion_page_cover_manager.py +15 -20
- notionary/core/page/notion_page_manager.py +137 -156
- notionary/core/page/properites/database_property_service.py +114 -98
- notionary/core/page/properites/page_property_manager.py +78 -49
- notionary/core/page/properites/property_formatter.py +1 -1
- notionary/core/page/properites/property_operation_result.py +43 -30
- notionary/core/page/properites/property_value_extractor.py +26 -8
- notionary/core/page/relations/notion_page_relation_manager.py +71 -52
- notionary/core/page/relations/notion_page_title_resolver.py +11 -11
- notionary/core/page/relations/page_database_relation.py +14 -14
- notionary/core/page/relations/relation_operation_result.py +50 -41
- notionary/util/page_id_utils.py +11 -7
- {notionary-0.1.10.dist-info → notionary-0.1.12.dist-info}/METADATA +1 -1
- {notionary-0.1.10.dist-info → notionary-0.1.12.dist-info}/RECORD +32 -30
- notionary/core/database/notion_database_schema.py +0 -104
- {notionary-0.1.10.dist-info → notionary-0.1.12.dist-info}/WHEEL +0 -0
- {notionary-0.1.10.dist-info → notionary-0.1.12.dist-info}/licenses/LICENSE +0 -0
- {notionary-0.1.10.dist-info → notionary-0.1.12.dist-info}/top_level.txt +0 -0
@@ -1,48 +1,43 @@
|
|
1
|
-
|
2
1
|
import random
|
3
2
|
from typing import Any, Dict, Optional
|
4
3
|
from notionary.core.notion_client import NotionClient
|
5
4
|
from notionary.util.logging_mixin import LoggingMixin
|
6
5
|
|
6
|
+
|
7
7
|
class NotionPageCoverManager(LoggingMixin):
|
8
8
|
def __init__(self, page_id: str, client: NotionClient):
|
9
9
|
self.page_id = page_id
|
10
10
|
self._client = client
|
11
|
-
|
11
|
+
|
12
12
|
async def set_cover(self, external_url: str) -> Optional[Dict[str, Any]]:
|
13
|
-
"""Sets a cover image from an external URL.
|
14
|
-
|
15
|
-
|
13
|
+
"""Sets a cover image from an external URL."""
|
14
|
+
|
16
15
|
return await self._client.patch(
|
17
16
|
f"pages/{self.page_id}",
|
18
17
|
{"cover": {"type": "external", "external": {"url": external_url}}},
|
19
18
|
)
|
20
|
-
|
19
|
+
|
21
20
|
async def set_random_gradient_cover(self) -> Optional[Dict[str, Any]]:
|
22
|
-
"""
|
23
|
-
"""
|
21
|
+
"""Sets a random gradient cover from Notion's default gradient covers."""
|
24
22
|
default_notion_covers = [
|
25
|
-
"https://www.notion.so/images/page-cover/gradients_8.png",
|
23
|
+
"https://www.notion.so/images/page-cover/gradients_8.png",
|
26
24
|
"https://www.notion.so/images/page-cover/gradients_2.png",
|
27
25
|
"https://www.notion.so/images/page-cover/gradients_11.jpg",
|
28
26
|
"https://www.notion.so/images/page-cover/gradients_10.jpg",
|
29
27
|
"https://www.notion.so/images/page-cover/gradients_5.png",
|
30
|
-
"https://www.notion.so/images/page-cover/gradients_3.png"
|
28
|
+
"https://www.notion.so/images/page-cover/gradients_3.png",
|
31
29
|
]
|
32
|
-
|
30
|
+
|
33
31
|
random_cover_url = random.choice(default_notion_covers)
|
34
|
-
|
32
|
+
|
35
33
|
return await self.set_cover(random_cover_url)
|
36
|
-
|
37
|
-
|
34
|
+
|
38
35
|
async def get_cover_url(self) -> str:
|
39
|
-
"""Retrieves the current cover image URL of the page.
|
40
|
-
|
41
|
-
|
36
|
+
"""Retrieves the current cover image URL of the page."""
|
37
|
+
|
42
38
|
page_data = await self._client.get_page(self.page_id)
|
43
|
-
|
39
|
+
|
44
40
|
if not page_data:
|
45
41
|
return ""
|
46
|
-
|
42
|
+
|
47
43
|
return page_data.get("cover", {}).get("external", {}).get("url", "")
|
48
|
-
|
@@ -9,15 +9,22 @@ from notionary.core.converters.registry.block_element_registry_builder import (
|
|
9
9
|
from notionary.core.notion_client import NotionClient
|
10
10
|
from notionary.core.page.metadata.metadata_editor import MetadataEditor
|
11
11
|
from notionary.core.page.metadata.notion_icon_manager import NotionPageIconManager
|
12
|
-
from notionary.core.page.metadata.notion_page_cover_manager import
|
13
|
-
|
14
|
-
|
12
|
+
from notionary.core.page.metadata.notion_page_cover_manager import (
|
13
|
+
NotionPageCoverManager,
|
14
|
+
)
|
15
|
+
from notionary.core.page.properites.database_property_service import (
|
16
|
+
DatabasePropertyService,
|
17
|
+
)
|
18
|
+
from notionary.core.page.relations.notion_page_relation_manager import (
|
19
|
+
NotionRelationManager,
|
20
|
+
)
|
15
21
|
from notionary.core.page.content.page_content_manager import PageContentManager
|
16
22
|
from notionary.core.page.properites.page_property_manager import PagePropertyManager
|
17
23
|
from notionary.util.logging_mixin import LoggingMixin
|
18
24
|
from notionary.util.page_id_utils import extract_and_validate_page_id
|
19
25
|
from notionary.core.page.relations.page_database_relation import PageDatabaseRelation
|
20
26
|
|
27
|
+
|
21
28
|
class NotionPageManager(LoggingMixin):
|
22
29
|
"""
|
23
30
|
High-Level Facade for managing content and metadata of a Notion page.
|
@@ -47,36 +54,41 @@ class NotionPageManager(LoggingMixin):
|
|
47
54
|
block_registry=self._block_element_registry,
|
48
55
|
)
|
49
56
|
self._metadata = MetadataEditor(self._page_id, self._client)
|
50
|
-
self._page_cover_manager = NotionPageCoverManager(
|
51
|
-
|
52
|
-
|
53
|
-
self.
|
57
|
+
self._page_cover_manager = NotionPageCoverManager(
|
58
|
+
page_id=self._page_id, client=self._client
|
59
|
+
)
|
60
|
+
self._page_icon_manager = NotionPageIconManager(
|
61
|
+
page_id=self._page_id, client=self._client
|
62
|
+
)
|
63
|
+
|
64
|
+
self._db_relation = PageDatabaseRelation(
|
65
|
+
page_id=self._page_id, client=self._client
|
66
|
+
)
|
54
67
|
self._db_property_service = None
|
55
|
-
|
56
|
-
self._relation_manager = NotionRelationManager(
|
57
|
-
|
68
|
+
|
69
|
+
self._relation_manager = NotionRelationManager(
|
70
|
+
page_id=self._page_id, client=self._client
|
71
|
+
)
|
72
|
+
|
58
73
|
self._property_manager = PagePropertyManager(
|
59
|
-
self._page_id,
|
60
|
-
self._client,
|
61
|
-
self._metadata,
|
62
|
-
self._db_relation
|
74
|
+
self._page_id, self._client, self._metadata, self._db_relation
|
63
75
|
)
|
64
76
|
|
65
77
|
async def _get_db_property_service(self) -> Optional[DatabasePropertyService]:
|
66
78
|
"""
|
67
79
|
Gets the database property service, initializing it if necessary.
|
68
80
|
This is a more intuitive way to work with the instance variable.
|
69
|
-
|
81
|
+
|
70
82
|
Returns:
|
71
83
|
Optional[DatabasePropertyService]: The database property service or None if not applicable
|
72
84
|
"""
|
73
85
|
if self._db_property_service is not None:
|
74
86
|
return self._db_property_service
|
75
|
-
|
87
|
+
|
76
88
|
database_id = await self._db_relation.get_parent_database_id()
|
77
89
|
if not database_id:
|
78
90
|
return None
|
79
|
-
|
91
|
+
|
80
92
|
self._db_property_service = DatabasePropertyService(database_id, self._client)
|
81
93
|
await self._db_property_service.load_schema()
|
82
94
|
return self._db_property_service
|
@@ -114,7 +126,7 @@ class NotionPageManager(LoggingMixin):
|
|
114
126
|
|
115
127
|
async def get_text(self) -> str:
|
116
128
|
return await self._page_content_manager.get_text()
|
117
|
-
|
129
|
+
|
118
130
|
async def set_title(self, title: str) -> Optional[Dict[str, Any]]:
|
119
131
|
return await self._metadata.set_title(title)
|
120
132
|
|
@@ -122,17 +134,15 @@ class NotionPageManager(LoggingMixin):
|
|
122
134
|
self, emoji: Optional[str] = None, external_url: Optional[str] = None
|
123
135
|
) -> Optional[Dict[str, Any]]:
|
124
136
|
return await self._page_icon_manager.set_icon(emoji, external_url)
|
125
|
-
|
137
|
+
|
126
138
|
async def _get_page_data(self, force_refresh=False) -> Dict[str, Any]:
|
127
|
-
"""
|
128
|
-
"""
|
139
|
+
"""Gets the page data and caches it for future use."""
|
129
140
|
if self._page_data is None or force_refresh:
|
130
141
|
self._page_data = await self._client.get_page(self._page_id)
|
131
142
|
return self._page_data
|
132
|
-
|
143
|
+
|
133
144
|
async def get_icon(self) -> Optional[str]:
|
134
|
-
"""Retrieves the page icon - either emoji or external URL.
|
135
|
-
"""
|
145
|
+
"""Retrieves the page icon - either emoji or external URL."""
|
136
146
|
return await self._page_icon_manager.get_icon()
|
137
147
|
|
138
148
|
async def get_cover_url(self) -> str:
|
@@ -140,10 +150,10 @@ class NotionPageManager(LoggingMixin):
|
|
140
150
|
|
141
151
|
async def set_page_cover(self, external_url: str) -> Optional[Dict[str, Any]]:
|
142
152
|
return await self._page_cover_manager.set_cover(external_url)
|
143
|
-
|
153
|
+
|
144
154
|
async def set_random_gradient_cover(self) -> Optional[Dict[str, Any]]:
|
145
155
|
return await self._page_cover_manager.set_random_gradient_cover()
|
146
|
-
|
156
|
+
|
147
157
|
async def get_properties(self) -> Dict[str, Any]:
|
148
158
|
"""Retrieves all properties of the page."""
|
149
159
|
return await self._property_manager.get_properties()
|
@@ -151,61 +161,62 @@ class NotionPageManager(LoggingMixin):
|
|
151
161
|
async def get_property_value(self, property_name: str) -> Any:
|
152
162
|
"""Get the value of a specific property."""
|
153
163
|
return await self._property_manager.get_property_value(
|
154
|
-
property_name,
|
155
|
-
self._relation_manager.get_relation_values
|
164
|
+
property_name, self._relation_manager.get_relation_values
|
156
165
|
)
|
157
|
-
|
158
|
-
async def set_property_by_name(
|
159
|
-
|
160
|
-
|
166
|
+
|
167
|
+
async def set_property_by_name(
|
168
|
+
self, property_name: str, value: Any
|
169
|
+
) -> Optional[Dict[str, Any]]:
|
170
|
+
"""Sets the value of a specific property by its name."""
|
161
171
|
return await self._property_manager.set_property_by_name(
|
162
|
-
property_name=property_name,
|
172
|
+
property_name=property_name,
|
163
173
|
value=value,
|
164
174
|
)
|
165
|
-
|
175
|
+
|
166
176
|
async def is_database_page(self) -> bool:
|
167
|
-
"""
|
168
|
-
"""
|
177
|
+
"""Checks if this page belongs to a database."""
|
169
178
|
return await self._db_relation.is_database_page()
|
170
|
-
|
179
|
+
|
171
180
|
async def get_parent_database_id(self) -> Optional[str]:
|
172
|
-
"""
|
173
|
-
"""
|
181
|
+
"""Gets the ID of the database this page belongs to, if any"""
|
174
182
|
return await self._db_relation.get_parent_database_id()
|
175
183
|
|
176
184
|
async def get_available_options_for_property(self, property_name: str) -> List[str]:
|
177
|
-
"""
|
178
|
-
"""
|
185
|
+
"""Gets the available option names for a property (select, multi_select, status)."""
|
179
186
|
db_service = await self._get_db_property_service()
|
180
187
|
if db_service:
|
181
188
|
return await db_service.get_option_names(property_name)
|
182
189
|
return []
|
183
190
|
|
184
191
|
async def get_property_type(self, property_name: str) -> Optional[str]:
|
185
|
-
"""
|
186
|
-
"""
|
192
|
+
"""Gets the type of a specific property."""
|
187
193
|
db_service = await self._get_db_property_service()
|
188
194
|
if db_service:
|
189
195
|
return await db_service.get_property_type(property_name)
|
190
196
|
return None
|
191
197
|
|
192
|
-
async def get_database_metadata(
|
193
|
-
|
194
|
-
|
198
|
+
async def get_database_metadata(
|
199
|
+
self, include_types: Optional[List[str]] = None
|
200
|
+
) -> Dict[str, Any]:
|
201
|
+
"""Gets complete metadata about the database this page belongs to."""
|
195
202
|
db_service = await self._get_db_property_service()
|
196
203
|
if db_service:
|
197
204
|
return await db_service.get_database_metadata(include_types)
|
198
205
|
return {"properties": {}}
|
199
206
|
|
200
|
-
async def get_relation_options(
|
201
|
-
|
202
|
-
|
203
|
-
|
207
|
+
async def get_relation_options(
|
208
|
+
self, property_name: str, limit: int = 100
|
209
|
+
) -> List[Dict[str, Any]]:
|
210
|
+
"""Returns available options for a relation property."""
|
211
|
+
return await self._relation_manager.get_relation_options(property_name, limit)
|
204
212
|
|
205
|
-
async def add_relations_by_name(
|
206
|
-
|
207
|
-
|
208
|
-
|
213
|
+
async def add_relations_by_name(
|
214
|
+
self, relation_property_name: str, page_titles: Union[str, List[str]]
|
215
|
+
) -> Optional[Dict[str, Any]]:
|
216
|
+
"""Adds one or more relations."""
|
217
|
+
return await self._relation_manager.add_relation_by_name(
|
218
|
+
property_name=relation_property_name, page_titles=page_titles
|
219
|
+
)
|
209
220
|
|
210
221
|
async def get_relation_values(self, property_name: str) -> List[str]:
|
211
222
|
"""
|
@@ -214,118 +225,88 @@ class NotionPageManager(LoggingMixin):
|
|
214
225
|
return await self._relation_manager.get_relation_values(property_name)
|
215
226
|
|
216
227
|
async def get_relation_property_ids(self) -> List[str]:
|
217
|
-
"""
|
218
|
-
"""
|
228
|
+
"""Returns a list of all relation property names."""
|
219
229
|
return await self._relation_manager.get_relation_property_ids()
|
220
230
|
|
221
231
|
async def get_all_relations(self) -> Dict[str, List[str]]:
|
222
|
-
"""
|
223
|
-
"""
|
232
|
+
"""Returns all relation properties and their values."""
|
224
233
|
return await self._relation_manager.get_all_relations()
|
225
|
-
|
234
|
+
|
226
235
|
async def get_status(self) -> Optional[str]:
|
227
|
-
"""
|
228
|
-
"""
|
236
|
+
"""Determines the status of the page (e.g., 'Draft', 'Completed', etc.)"""
|
229
237
|
return await self.get_property_value("Status")
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
async def
|
234
|
-
"""
|
235
|
-
Demonstriert die Verwendung des refactorierten NotionPageManager.
|
236
|
-
"""
|
237
|
-
print("=== NotionPageManager Demo ===")
|
238
|
-
|
239
|
-
page_manager = NotionPageManager(page_id="https://notion.so/1d0389d57bd3805cb34ccaf5804b43ce")
|
240
|
-
|
241
|
-
await page_manager.add_relations_by_name("Projekte", ["Fetzen mit Stine"])
|
242
|
-
|
243
|
-
|
244
|
-
input("Drücke Enter, um fortzufahren...")
|
245
|
-
|
246
|
-
|
247
|
-
is_database_page = await page_manager.is_database_page()
|
248
|
-
|
249
|
-
if not is_database_page:
|
250
|
-
print("Diese Seite gehört zu keiner Datenbank. Demo wird beendet.")
|
251
|
-
return
|
252
|
-
|
253
|
-
db_id = await page_manager.get_parent_database_id()
|
254
|
-
print(f"\n2. Datenbank-ID: {db_id}")
|
255
|
-
|
256
|
-
properties = await page_manager.get_properties()
|
257
|
-
print("\n3. Aktuelle Eigenschaften der Seite:")
|
258
|
-
for prop_name, prop_data in properties.items():
|
259
|
-
prop_type = prop_data.get("type", "unbekannt")
|
260
|
-
|
261
|
-
value = await page_manager.get_property_value(prop_name)
|
262
|
-
print(f" - {prop_name} ({prop_type}): {value}")
|
263
|
-
|
264
|
-
status_options = await page_manager.get_available_options_for_property("Status")
|
265
|
-
print(f"\n4. Verfügbare Status-Optionen: {status_options}")
|
266
|
-
|
267
|
-
tags_options = await page_manager.get_available_options_for_property("Tags")
|
268
|
-
print(f"\n5. Verfügbare Tags-Optionen: {tags_options}")
|
269
|
-
|
270
|
-
print("\n6. Relation-Eigenschaften und deren Optionen:")
|
271
|
-
for prop_name, prop_data in properties.items():
|
272
|
-
if prop_data.get("type") == "relation":
|
273
|
-
relation_options = await page_manager.get_relation_options(prop_name, limit=5)
|
274
|
-
option_names = [option.get("name", "Unbenannt") for option in relation_options]
|
275
|
-
print(f" - {prop_name} Relation-Optionen (max. 5): {option_names}")
|
276
|
-
|
277
|
-
print("\n7. Typen aller Eigenschaften:")
|
278
|
-
for prop_name in properties.keys():
|
279
|
-
prop_type = await page_manager.get_property_type(prop_name)
|
280
|
-
print(f" - {prop_name}: {prop_type}")
|
281
|
-
|
282
|
-
if status_options:
|
283
|
-
valid_status = status_options[0]
|
284
|
-
print(f"\n8. Setze Status auf '{valid_status}'...")
|
285
|
-
result = await page_manager.set_property_by_name("Status", valid_status)
|
286
|
-
print(f" Ergebnis: {'Erfolgreich' if result else 'Fehlgeschlagen'}")
|
287
|
-
|
288
|
-
current_status = await page_manager.get_status()
|
289
|
-
print(f" Aktueller Status: {current_status}")
|
290
|
-
|
291
|
-
# 9. Versuch, einen ungültigen Status zu setzen
|
292
|
-
invalid_status = "Bin King"
|
293
|
-
print(f"\n9. Versuche ungültigen Status '{invalid_status}' zu setzen...")
|
294
|
-
await page_manager.set_property_by_name("Status", invalid_status)
|
295
|
-
|
296
|
-
# 10. Komplette Datenbank-Metadaten für select-ähnliche Properties abrufen
|
297
|
-
print("\n10. Datenbank-Metadaten für select, multi_select und status Properties:")
|
298
|
-
metadata = await page_manager.get_database_metadata(
|
299
|
-
include_types=["select", "multi_select", "status"]
|
300
|
-
)
|
301
|
-
|
302
|
-
for prop_name, prop_info in metadata.get("properties", {}).items():
|
303
|
-
option_names = [opt.get("name", "") for opt in prop_info.get("options", [])]
|
304
|
-
print(f" - {prop_name} ({prop_info.get('type')}): {option_names}")
|
305
|
-
|
306
|
-
print("\nDemonstration abgeschlossen.")
|
307
|
-
|
308
|
-
|
309
|
-
async def demo2():
|
238
|
+
|
239
|
+
|
240
|
+
# TODO: Integration Test oder Showcase
|
241
|
+
async def multiple_toggler_integrations():
|
310
242
|
url = "https://www.notion.so/Jarvis-Clipboard-1a3389d57bd380d7a507e67d1b25822c"
|
311
|
-
|
312
243
|
page_manager = NotionPageManager(url=url)
|
313
|
-
|
314
|
-
# Beispiel mit einem Embed-Element im Transcript-Toggle
|
315
|
-
markdown = """
|
316
|
-
## 💪 Muskelaufbau und Kraft
|
317
|
-
- Regelmäßiges Training ist essentiell für den Muskelerhalt im Alter
|
318
|
-
- Richtige Ernährung unterstützt die Regeneration nach dem Training
|
319
244
|
|
245
|
+
example_output = """!> [📚] AI Summary: Explore the fascinating connection between the nervous system and muscle movement. Discover the differences between training for hypertrophy and strength, alongside effective resistance protocols. Learn how to assess recovery with tools like heart rate variability and grip strength. Dive into the impact of key nutrients such as creatine and electrolytes on muscle performance. This discussion offers actionable strategies to enhance movement, preserve strength with age, and boost energy levels.
|
246
|
+
|
247
|
+
+++ 🎧 Audio Summary
|
248
|
+
$[AI-generated audio summary](https://storage.googleapis.com/audio_summaries/ep_ai_summary_127d02ec-ca12-4312-a5ed-cb14b185480c.mp3)
|
249
|
+
|
250
|
+
<!-- spacer -->
|
251
|
+
|
252
|
+
## ⬆️ Key Insights
|
253
|
+
- The interplay between the nervous system and muscle fibers is critical for effective muscle contraction and movement coordination.
|
254
|
+
- Adequate nutrition, particularly protein and electrolytes, coupled with proper recovery practices, is essential for optimizing muscle growth and performance.
|
255
|
+
- Regular strength training helps offset age-related muscle decline and improves overall posture and functional movement.
|
256
|
+
- Simple tools like grip strength measurements and heart rate variability can provide valuable insights into recovery status and training readiness.
|
257
|
+
|
258
|
+
<!-- spacer -->
|
259
|
+
---
|
260
|
+
|
261
|
+
### 💪 1. Understanding Muscle Strength
|
262
|
+
- Muscles naturally weaken with age; strength training helps offset this decline and improve posture and movement.
|
263
|
+
- The *Henneman size principle* explains how our bodies efficiently recruit muscle fibers based on the weight of an object, prioritizing energy conservation.
|
264
|
+
- Neural adaptations are the primary driver of strength gains in the initial weeks of training, before hypertrophy becomes significant.
|
320
265
|
+++ Transcript
|
321
|
-
<embed:Listen to this highlight>(https://
|
322
|
-
|
323
|
-
|
266
|
+
<embed:Listen to this highlight>(https://snipd.com/snip/a1b2c3d4)
|
267
|
+
... "When we talk about strength training, we're primarily focusing on the neurological adaptations that occur first. What's fascinating is that during the first 4-6 weeks of a strength program, most of your strength gains come from improved neural efficiency, not muscle size. Your brain is literally learning to recruit more muscle fibers simultaneously, creating greater force output with the same muscle mass."
|
268
|
+
|
269
|
+
|
270
|
+
### 🧠 2. The Nervous System's Role
|
271
|
+
- The central nervous system coordinates which motor units are activated and in what sequence when performing movements.
|
272
|
+
- *Motor unit recruitment* follows a specific pattern that prioritizes smaller, more precise units before larger, more powerful ones.
|
273
|
+
- Fatigue can significantly impact nervous system efficiency, reducing both strength output and movement quality.
|
274
|
+
+++ Transcript
|
275
|
+
<embed:Listen to this highlight>(https://snipd.com/snip/e5f6g7h8)
|
276
|
+
... "The beauty of how our nervous system works is that it's incredibly adaptive. When you're learning a new movement, your brain is creating new neural pathways. With practice, these pathways become more efficient—similar to how a path through grass becomes more defined the more it's walked on. This is why technique practice is so crucial; you're literally building the neural infrastructure for efficient movement."
|
277
|
+
|
278
|
+
|
279
|
+
### 🔬 3. Assessing Recovery Through Simple Tests
|
280
|
+
- *Heart rate variability* (HRV) is a key indicator of recovery, but can be difficult to measure accurately without specialized equipment.
|
281
|
+
- Morning grip strength is a simple, readily available test to assess whole-system recovery and inform training decisions.
|
282
|
+
- Sleep quality has a direct correlation with both HRV and grip strength measurements.
|
283
|
+
+++ Transcript
|
284
|
+
<embed:Listen to this highlight>(https://snipd.com/snip/i9j0k1l2)
|
285
|
+
... "One of the simplest recovery tools you have access to is grip strength. First thing in the morning, try squeezing a hand dynamometer or even just observe how your grip feels. If it's significantly weaker than your baseline, that's often an indicator your nervous system is still fatigued. This simple test has been shown to correlate with overall systemic recovery and can help you decide whether to push hard in training or take a lighter approach that day."
|
286
|
+
|
287
|
+
|
288
|
+
### 🥗 4. Nutrition for Muscle Performance
|
289
|
+
- *Creatine monohydrate* remains one of the most well-researched and effective supplements for improving strength and power output.
|
290
|
+
- Adequate *electrolyte balance* is critical for optimal muscle contraction and preventing cramping during exercise.
|
291
|
+
- Protein timing and distribution throughout the day may be as important as total daily intake for maximizing muscle protein synthesis.
|
292
|
+
+++ Transcript
|
293
|
+
<embed:Listen to this highlight>(https://snipd.com/snip/m3n4o5p6)
|
294
|
+
... "The research on creatine is remarkably consistent. A dose of 3-5 grams daily increases phosphocreatine stores in your muscles, enhancing your capacity for high-intensity, short-duration activities. What's often overlooked is how it can benefit cognitive function as well. Your brain uses a significant amount of ATP, and creatine supports that energy production. This is why some studies show improvements in cognitive tasks, particularly under sleep-deprived conditions, when supplementing with creatine."
|
324
295
|
"""
|
325
|
-
|
326
|
-
await page_manager.append_markdown(markdown)
|
327
|
-
|
296
|
+
|
297
|
+
await page_manager.append_markdown(markdown=example_output)
|
298
|
+
|
299
|
+
|
300
|
+
async def long_text_demo():
|
301
|
+
url = "https://www.notion.so/Jarvis-Clipboard-1a3389d57bd380d7a507e67d1b25822c"
|
302
|
+
page_manager = NotionPageManager(url=url)
|
303
|
+
|
304
|
+
markdown_text = """
|
305
|
+
Die künstliche Intelligenz steht an einem Wendepunkt ihrer Entwicklung, an dem sie nicht mehr nur als technologisches Werkzeug betrachtet wird, sondern zunehmend als Partner in kreativen und intellektuellen Prozessen. Diese Transformation ist das Ergebnis jahrzehntelanger Forschung und Entwicklung, die von den frühen symbolischen KI-Systemen der 1950er und 1960er Jahre über die Expertensysteme der 1980er Jahre bis hin zu den heutigen tiefen neuronalen Netzwerken und Transformer-Modellen reicht. Der aktuelle Durchbruch in der KI, insbesondere im Bereich des maschinellen Lernens und des Natural Language Processing, beruht auf mehreren Schlüsselfaktoren: der Verfügbarkeit enormer Datenmengen zum Training dieser Modelle, der exponentiellen Steigerung der Rechenleistung, die es ermöglicht, komplexere Modelle zu trainieren, und den Fortschritten bei den Algorithmen selbst, insbesondere bei den Architekturen neuronaler Netzwerke. Diese Konvergenz hat zu KI-Systemen geführt, die in der Lage sind, menschliche Sprache mit beispielloser Genauigkeit zu verstehen und zu generieren, Bilder zu analysieren und zu erstellen und sogar Musik zu komponieren, die von menschlichen Kompositionen kaum zu unterscheiden ist. Während diese Fortschritte zahlreiche positive Anwendungen ermöglichen, von personalisierten Bildungserfahrungen bis hin zu effizienteren Gesundheitssystemen, werfen sie auch wichtige ethische Fragen auf, die unsere Gesellschaft angehen muss. Dazu gehören Bedenken hinsichtlich der Privatsphäre, da KI-Systeme oft mit großen Mengen persönlicher Daten trainiert werden, Fragen der Transparenz und Erklärbarkeit, da viele fortschrittliche KI-Modelle als "Black Boxes" fungieren, deren Entscheidungsprozesse schwer zu verstehen sind, und Bedenken hinsichtlich möglicher Verzerrungen und Diskriminierungen, die in diese Systeme eingebaut sein könnten. Darüber hinaus gibt es Fragen zur Zukunft der Arbeit, da KI-Systeme immer mehr Aufgaben übernehmen können, die traditionell von Menschen ausgeführt wurden. Es ist daher entscheidend, dass wir als Gesellschaft einen aktiven Dialog darüber führen, wie wir diese Technologien entwickeln und einsetzen wollen, um sicherzustellen, dass sie zum Wohle aller eingesetzt werden. Dies erfordert nicht nur technisches Fachwissen, sondern auch Beiträge aus Bereichen wie Ethik, Soziologie, Philosophie und Recht. Nur durch einen solchen interdisziplinären Ansatz können wir das volle Potenzial der künstlichen Intelligenz ausschöpfen und gleichzeitig sicherstellen, dass sie im Einklang mit unseren Werten und Zielen als Gesellschaft steht. In den kommenden Jahren werden wir wahrscheinlich Zeugen weiterer bedeutender Fortschritte auf dem Gebiet der künstlichen Intelligenz sein. Insbesondere könnten wir Fortschritte in Richtung einer allgemeineren KI sehen, die sich über einzelne, eng definierte Aufgaben hinaus entwickelt und in der Lage ist, Wissen und Fähigkeiten über verschiedene Domänen hinweg zu übertragen, ähnlich wie es Menschen tun. Dies könnte zu KI-Systemen führen, die nicht nur darauf trainiert sind, bestimmte Aufgaben zu erfüllen, sondern die in der Lage sind, zu lernen, zu schlussfolgern und sich an neue Situationen anzupassen, was ein höheres Maß an Autonomie und Kreativität ermöglicht. Gleichzeitig könnte es zu Fortschritten bei der Integration von KI in andere aufkommende Technologien kommen, wie z. B. das Internet der Dinge, die virtuelle und erweiterte Realität und die Robotik, was zu neuen Formen der Mensch-Computer-Interaktion und neuen Anwendungen in Bereichen wie dem Gesundheitswesen, der Bildung und der Unterhaltung führen könnte. Es ist jedoch wichtig zu beachten, dass die Entwicklung der KI nicht vorherbestimmt ist, sondern durch die Entscheidungen geprägt wird, die wir als Gesellschaft treffen, einschließlich der Frage, welche Forschungsbereiche wir priorisieren, wie wir KI regulieren und wie wir sie in verschiedene Aspekte unseres Lebens integrieren. Daher ist es wichtig, dass wir weiterhin einen offenen und integrativen Dialog über die Zukunft der KI führen und sicherstellen, dass ihre Entwicklung und ihr Einsatz im Einklang mit unseren gemeinsamen Werten und Zielen stehen. Die Auseinandersetzung mit technologischen Fragen führt unweigerlich zu tiefen philosophischen Überlegungen. Was bedeutet es, intelligent zu sein? Was unterscheidet menschliches Denken von maschinellem Denken? Wird es jemals möglich sein, das menschliche Bewusstsein vollständig zu verstehen und zu replizieren? Während die KI-Forschung voranschreitet, stößt sie an die Grenzen unseres Verständnisses von Intelligenz, Bewusstsein und Identität und wirft Fragen auf, mit denen sich Philosophen seit Jahrhunderten auseinandersetzen. Dieses Zusammenspiel von Technologie und Philosophie kann zu neuen Erkenntnissen über die Natur des Geistes und des Selbst führen. Zugleich ergeben sich neue Fragen, etwa ob Maschinen jemals ein Bewusstsein oder subjektive Erfahrungen haben könnten, wie wir sie kennen, und welche ethischen Implikationen dies haben könnte. Würden wir Maschinen mit Bewusstsein den gleichen moralischen Status und die gleichen Rechte zugestehen wie Menschen oder anderen empfindungsfähigen Wesen? Während wir noch weit davon entfernt sind, Maschinen mit echtem Bewusstsein zu erschaffen, werden diese Fragen mit dem Fortschritt der Technologie immer relevanter. Es ist wichtig, dass wir sie jetzt angehen, damit wir auf zukünftige Entwicklungen vorbereitet sind. Neben diesen philosophischen Fragen wirft der Fortschritt der KI auch praktische ethische Fragen auf, wie z. B. die Frage der Verantwortlichkeit. Wenn KI-Systeme immer autonomer werden und Entscheidungen treffen, die erhebliche Auswirkungen auf das menschliche Leben haben können, wie z. B. im Gesundheitswesen, im Finanzwesen oder im Straßenverkehr, wer ist dann verantwortlich, wenn etwas schief geht? Ist es der Entwickler des KI-Systems, der Benutzer oder das System selbst? Diese Fragen der Verantwortlichkeit werden immer komplexer, da KI-Systeme immer autonomer und undurchsichtiger werden. Gleichzeitig stellt sich die Frage der Kontrolle und Regulierung. Da KI-Systeme immer leistungsfähiger werden, steigen auch die potenziellen Risiken eines Missbrauchs oder eines unkontrollierten Einsatzes. Wie können wir sicherstellen, dass diese Systeme in einer Weise entwickelt und eingesetzt werden, die im Einklang mit den menschlichen Werten und dem Gemeinwohl steht? Welche Art von Regulierung oder Aufsicht ist erforderlich? Diese Fragen sind nicht nur technischer Natur, sondern betreffen auch grundlegende gesellschaftliche und politische Fragen darüber, wie wir Technologie steuern und wie wir sicherstellen, dass sie dem Gemeinwohl dient. Schließlich gibt es die Frage der globalen Zusammenarbeit und des Wettbewerbs. Da die KI zu einer immer wichtigeren Technologie wird, die erhebliche wirtschaftliche und strategische Vorteile bieten kann, besteht die Gefahr eines "KI-Rennens" zwischen Nationen oder Unternehmen, das auf Kosten der Sicherheit, Ethik oder gemeinsamen internationalen Standards gehen könnte. Die Geschichte hat gezeigt, dass technologische Revolutionen sowohl Chancen als auch Risiken mit sich bringen können, und die Art und Weise, wie wir mit ihnen umgehen, kann den Unterschied zwischen einer utopischen und einer dystopischen Zukunft ausmachen. Es ist daher wichtig, dass wir globale Dialoge und Zusammenarbeit fördern, um sicherzustellen, dass die Entwicklung und der Einsatz von KI zum Nutzen aller und im Einklang mit den gemeinsamen Werten und Zielen der Menschheit stattfinden. Die KI wirft somit ein breites Spektrum an Fragen auf, von technischen und philosophischen bis hin zu ethischen, gesellschaftlichen und politischen. Die Art und Weise, wie wir mit diesen Fragen umgehen, wird die Zukunft der KI und damit auch die Zukunft unserer Gesellschaft prägen. Es liegt an uns allen - Forschern, Entwicklern, politischen Entscheidungsträgern, Wirtschaftsführern und Bürgern -, aktiv an diesem Diskurs teilzunehmen und sicherzustellen, dass die Entwicklung und der Einsatz von KI im Einklang mit unseren Werten und Zielen als Menschheit stehen.
|
306
|
+
"""
|
307
|
+
await page_manager.append_markdown(markdown=markdown_text)
|
308
|
+
|
328
309
|
|
329
310
|
if __name__ == "__main__":
|
330
|
-
asyncio.run(
|
331
|
-
print("\nDemonstration completed.")
|
311
|
+
asyncio.run(long_text_demo())
|
312
|
+
print("\nDemonstration completed.")
|