mirror of
https://gitlab.com/KKlochko/tui-rsync.git
synced 2026-08-20 05:37:43 +00:00
Add the show all option for Source.
This commit is contained in:
@@ -57,4 +57,6 @@
|
||||
Added *show one* option for Source.
|
||||
** 0.8.14 <2023-06-25 Sun>
|
||||
Added *show one* option for Group.
|
||||
** 0.8.15 <2023-06-26 Mon>
|
||||
Added *show all* option for Source.
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "tui-rsync"
|
||||
version = "0.8.14"
|
||||
version = "0.8.15"
|
||||
description = "tui-rsync will help you to manage yours backups."
|
||||
authors = ["Kostiantyn Klochko <kostya_klochko@ukr.net>"]
|
||||
readme = "README.rst"
|
||||
|
||||
@@ -24,6 +24,7 @@ import typer
|
||||
|
||||
from tui_rsync.models.models import Source, Destination, SyncCommand, Path
|
||||
from tui_rsync.cli.label_prompt import LabelPrompt
|
||||
from tui_rsync.models.models import all_labels
|
||||
|
||||
console = Console()
|
||||
source_show = typer.Typer()
|
||||
@@ -37,7 +38,7 @@ def one(
|
||||
),
|
||||
):
|
||||
"""
|
||||
[green b]Show[/] an [yellow]existing source label[/].
|
||||
[green b]Show[/] an [yellow]existing source[/].
|
||||
"""
|
||||
if label is None:
|
||||
console.print("What is the [yellow b]label of source[/]? ")
|
||||
@@ -51,3 +52,13 @@ def one(
|
||||
|
||||
console.print(source.show_format())
|
||||
|
||||
@source_show.command()
|
||||
def all():
|
||||
"""
|
||||
[green b]Show[/] [yellow]all existing sources[/].
|
||||
"""
|
||||
|
||||
for label in all_labels().iterator():
|
||||
source = Source.get_source(label.label)
|
||||
console.print(source.show_format())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user