From f93930d71240cf2dcf76318d0e4b80871f679e6f Mon Sep 17 00:00:00 2001 From: kolo Date: Wed, 23 Apr 2025 21:45:04 +0300 Subject: [PATCH] work --- README2.md | 349 +++++++++++++++++++++++++++-------------------------- 1 file changed, 181 insertions(+), 168 deletions(-) diff --git a/README2.md b/README2.md index 04af00a..71fd008 100644 --- a/README2.md +++ b/README2.md @@ -2,6 +2,17 @@ ### Python library for creating TUI +--- + +### Contents + +- [**Installing**](#installing) +- [**Quick Start**](#quick-start) +- [**Documentation**](#documentation) + - [**App**](#app) + +--- + ![preview](https://github.com/koloideal/Argenta/blob/kolo/imgs/mock_app_preview3.png?raw=True) An example of the TUI appearance @@ -85,174 +96,7 @@ def handler_with_flags(flags: InputFlags): --- - - -# `.app.autocompleter` - - - -## AutoCompleter Objects - -```python -class AutoCompleter() -``` - - - -#### \_\_init\_\_ - -```python -def __init__(history_filename: str = False, - autocomplete_button: str = 'tab') -> None -``` - -Public. Configures and implements auto-completion of input command - -**Arguments**: - -- `history_filename`: the name of the file for saving the history of the autocompleter -- `autocomplete_button`: the button for auto-completion - -**Returns**: - -`None` - ---- - - - -# `.app.defaults` - - - -## PredefinedMessages Objects - -```python -@dataclass -class PredefinedMessages() -``` - -Public. A dataclass with predetermined messages for quick use - ---- - - - -# `.app.dividing_line` - - - -## StaticDividingLine Objects - -```python -class StaticDividingLine(BaseDividingLine) -``` - - - -#### \_\_init\_\_ - -```python -def __init__(unit_part: str = '-', length: int = 25) -> None -``` - -Public. The static dividing line - -**Arguments**: - -- `unit_part`: the single part of the dividing line -- `length`: the length of the dividing line - -**Returns**: - -`None` - ---- - - - -#### get\_full\_static\_line - -```python -def get_full_static_line(is_override: bool) -> str -``` - -Private. Returns the full line of the dividing line - -**Arguments**: - -- `is_override`: has the default text layout been redefined - -**Returns**: - -full line of dividing line as str - ---- - - - -## DynamicDividingLine Objects - -```python -class DynamicDividingLine(BaseDividingLine) -``` - - - -#### \_\_init\_\_ - -```python -def __init__(unit_part: str = '-') -> None -``` - -Public. The dynamic dividing line - -**Arguments**: - -- `unit_part`: the single part of the dividing line - -**Returns**: - -`None` - ---- - - - -#### get\_full\_dynamic\_line - -```python -def get_full_dynamic_line(length: int, is_override: bool) -> str -``` - -Private. Returns the full line of the dividing line - -**Arguments**: - -- `length`: the length of the dividing line -- `is_override`: has the default text layout been redefined - -**Returns**: - -full line of dividing line as str - ---- - - - -# `.app.exceptions` - - - -## NoRegisteredHandlersException Objects - -```python -class NoRegisteredHandlersException(Exception) -``` - -The router has no registered handlers - ---- +# Documentation @@ -505,6 +349,175 @@ Public. Adds a message that will be displayed when the application is launched --- + + +# `.app.autocompleter` + + + +## AutoCompleter Objects + +```python +class AutoCompleter() +``` + + + +#### \_\_init\_\_ + +```python +def __init__(history_filename: str = False, + autocomplete_button: str = 'tab') -> None +``` + +Public. Configures and implements auto-completion of input command + +**Arguments**: + +- `history_filename`: the name of the file for saving the history of the autocompleter +- `autocomplete_button`: the button for auto-completion + +**Returns**: + +`None` + +--- + + + +# `.app.defaults` + + + +## PredefinedMessages Objects + +```python +@dataclass +class PredefinedMessages() +``` + +Public. A dataclass with predetermined messages for quick use + +--- + + + +# `.app.dividing_line` + + + +## StaticDividingLine Objects + +```python +class StaticDividingLine(BaseDividingLine) +``` + + + +#### \_\_init\_\_ + +```python +def __init__(unit_part: str = '-', length: int = 25) -> None +``` + +Public. The static dividing line + +**Arguments**: + +- `unit_part`: the single part of the dividing line +- `length`: the length of the dividing line + +**Returns**: + +`None` + +--- + + + +#### get\_full\_static\_line + +```python +def get_full_static_line(is_override: bool) -> str +``` + +Private. Returns the full line of the dividing line + +**Arguments**: + +- `is_override`: has the default text layout been redefined + +**Returns**: + +full line of dividing line as str + +--- + + + +## DynamicDividingLine Objects + +```python +class DynamicDividingLine(BaseDividingLine) +``` + + + +#### \_\_init\_\_ + +```python +def __init__(unit_part: str = '-') -> None +``` + +Public. The dynamic dividing line + +**Arguments**: + +- `unit_part`: the single part of the dividing line + +**Returns**: + +`None` + +--- + + + +#### get\_full\_dynamic\_line + +```python +def get_full_dynamic_line(length: int, is_override: bool) -> str +``` + +Private. Returns the full line of the dividing line + +**Arguments**: + +- `length`: the length of the dividing line +- `is_override`: has the default text layout been redefined + +**Returns**: + +full line of dividing line as str + +--- + + + +# `.app.exceptions` + + + +## NoRegisteredHandlersException Objects + +```python +class NoRegisteredHandlersException(Exception) +``` + +The router has no registered handlers + +--- + # `.command.exceptions`