Skip to content

Commit 3c301a5

Browse files
committed
docs: Update PythonClientLibrary.md for recent changes
- Documents the new `get_all_note_paths` method. - Updates `get_active_note_content` documentation to include the `return_format` parameter and `Union[str, List[str]]` return type. - Verifies clarity of `validation_regex` description for `request_user_input`.
1 parent 27bf40f commit 3c301a5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

PYTHON_LIBRARY_DOCS.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,12 @@ Requests user input via a modal dialog in Obsidian. **Blocks** script execution.
301301
302302
Operate on the currently focused note. Raise `ObsidianCommError` if no Markdown note is active.
303303
304-
#### `get_active_note_content() -> str`
304+
#### `get_active_note_content(return_format: str = "string") -> Union[str, List[str]]`
305305
Retrieves the full Markdown content of the active note.
306-
* **Returns:** (`str`) Note content.
306+
* **Parameters:**
307+
* `return_format` (`str`, optional, default: `"string"`): Desired format: `"string"` (single string) or `"lines"` (list of strings).
308+
* **Returns:** (`Union[str, List[str]]`) Note content in the specified format.
309+
* **Raises:** `ValueError` if `return_format` is invalid.
307310
308311
#### `get_active_note_frontmatter() -> Optional[Dict[str, Any]]`
309312
Retrieves the parsed YAML frontmatter of the active note.
@@ -427,8 +430,9 @@ Retrieves absolute path of the current vault.
427430
428431
#### `get_all_note_paths(absolute: bool = False) -> List[str]`
429432
Retrieves paths of all Markdown notes.
430-
* **Parameters:** `absolute` (`bool`, optional, default: `False`).
433+
* **Parameters:** `absolute` (`bool`, optional, default: `False`): If `True`, returns absolute filesystem paths, otherwise vault-relative paths.
431434
* **Returns:** (`List[str]`) List of note paths.
435+
* **Raises:** `ObsidianCommError` if paths cannot be retrieved or vault path is needed but unavailable.
432436
433437
#### `get_all_note_titles() -> List[str]`
434438
Retrieves titles of all Markdown notes.

0 commit comments

Comments
 (0)