cadrumo.entrypoints.tui.ledger.import_flow module¶
Import flow: choose a file or folder, preview what it holds, then confirm the write.
- IMPORT_PROVIDERS: Final[tuple[LedgerProviderID, ...]]¶
The readers an operator may pick for a bank statement, automatic first.
- import_outcome_lines(outcome)[source]¶
Describe a preview or an applied import, keeping unmeasured counts unmeasured.
- Return type:
- Parameters:
outcome (LedgerImportOutcomeV1)
- class LedgerImportScreen(controller)[source]¶
Bases:
LedgerConfirmationFlowScreenRead an operator-chosen source, show what it would write, and write it on confirmation.
- Parameters:
controller (LedgerWorkspaceController)
- FLOW_NAME: ClassVar[str]¶
- CSS: ClassVar[str]¶
Inline CSS, useful for quick scripts. Rules here take priority over CSS_PATH.
Note
This CSS applies to the whole app.
- compose()[source]¶
Called by Textual to create child widgets.
This method is called when a widget is mounted or by setting recompose=True when calling [refresh()][textual.widget.Widget.refresh].
Note that you don’t typically need to explicitly call this method.
Example
def compose(self) -> ComposeResult: yield Header() yield Label("Press the button below:") yield Button() yield Footer()
- property source_kind: LedgerImportSourceKind¶
The source kind currently selected.
- on_directory_tree_file_selected(event)[source]¶
Take a browsed file as the source.
- Return type:
- Parameters:
event (FileSelected)
- on_directory_tree_directory_selected(event)[source]¶
Take a browsed folder as the source; every importable file in it is read.
- Return type:
- Parameters:
event (DirectorySelected)
- can_focus: bool¶
Widget may receive focus.
- can_focus_children: bool¶
Widget’s children may receive focus.