yd-cli 0.8__tar.gz → 0.10__tar.gz
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.
- {yd_cli-0.8 → yd_cli-0.10}/PKG-INFO +1 -1
- {yd_cli-0.8 → yd_cli-0.10}/pyproject.toml +1 -1
- {yd_cli-0.8 → yd_cli-0.10}/src/yd/cli.py +13 -11
- {yd_cli-0.8 → yd_cli-0.10}/LICENSES/MIT.txt +0 -0
- {yd_cli-0.8 → yd_cli-0.10}/README.md +0 -0
- {yd_cli-0.8 → yd_cli-0.10}/src/yd/__init__.py +0 -0
- {yd_cli-0.8 → yd_cli-0.10}/src/yd/__main__.py +0 -0
- {yd_cli-0.8 → yd_cli-0.10}/src/yd/commands.py +0 -0
- {yd_cli-0.8 → yd_cli-0.10}/src/yd/echo.py +0 -0
- {yd_cli-0.8 → yd_cli-0.10}/src/yd/execution.py +0 -0
- {yd_cli-0.8 → yd_cli-0.10}/src/yd/io.py +0 -0
- {yd_cli-0.8 → yd_cli-0.10}/src/yd/py.typed +0 -0
- {yd_cli-0.8 → yd_cli-0.10}/src/yd/types.py +0 -0
|
@@ -70,15 +70,15 @@ def _action_name(action: yd.types.Action) -> str:
|
|
|
70
70
|
def _action_styler(action: yd.types.Action) -> str:
|
|
71
71
|
match action:
|
|
72
72
|
case yd.types.Action.CREATE:
|
|
73
|
-
return "bold
|
|
73
|
+
return "bold black on blue"
|
|
74
74
|
case yd.types.Action.COPY:
|
|
75
|
-
return "bold
|
|
75
|
+
return "bold black on green"
|
|
76
76
|
case yd.types.Action.DELETE:
|
|
77
|
-
return "bold
|
|
77
|
+
return "bold black on red"
|
|
78
78
|
case yd.types.Action.HARDLINK:
|
|
79
|
-
return "bold
|
|
79
|
+
return "bold black on bright_black"
|
|
80
80
|
case yd.types.Action.ATTRUPDATE:
|
|
81
|
-
return "bold
|
|
81
|
+
return "bold black on yellow"
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
def _setup_rich_devices() -> tuple[rich.console.Console, StrEnumHighlighter]:
|
|
@@ -86,10 +86,10 @@ def _setup_rich_devices() -> tuple[rich.console.Console, StrEnumHighlighter]:
|
|
|
86
86
|
theme = rich.theme.Theme(
|
|
87
87
|
highlighter.create_theme_addon(styler=_action_styler)
|
|
88
88
|
| {
|
|
89
|
-
"progress.elapsed": "italic
|
|
90
|
-
"info": "italic
|
|
91
|
-
"warning": "italic
|
|
92
|
-
"error": "bold
|
|
89
|
+
"progress.elapsed": "italic yellow",
|
|
90
|
+
"info": "italic yellow",
|
|
91
|
+
"warning": "italic red",
|
|
92
|
+
"error": "bold bright_red",
|
|
93
93
|
}
|
|
94
94
|
)
|
|
95
95
|
console = rich.console.Console(highlighter=highlighter, theme=theme)
|
|
@@ -312,7 +312,7 @@ def run(
|
|
|
312
312
|
),
|
|
313
313
|
rich.progress.TextColumn(
|
|
314
314
|
"",
|
|
315
|
-
table_column=rich.table.Column(
|
|
315
|
+
table_column=rich.table.Column(min_width=8),
|
|
316
316
|
),
|
|
317
317
|
*it.chain.from_iterable(
|
|
318
318
|
(
|
|
@@ -325,7 +325,7 @@ def run(
|
|
|
325
325
|
rich.progress.TextColumn(
|
|
326
326
|
f"{{task.fields[{action_name}]}}",
|
|
327
327
|
justify="right",
|
|
328
|
-
table_column=rich.table.Column(min_width=
|
|
328
|
+
table_column=rich.table.Column(min_width=5),
|
|
329
329
|
),
|
|
330
330
|
)
|
|
331
331
|
for action_name in {
|
|
@@ -333,6 +333,8 @@ def run(
|
|
|
333
333
|
}
|
|
334
334
|
),
|
|
335
335
|
console=console,
|
|
336
|
+
expand=True,
|
|
337
|
+
refresh_per_second=10,
|
|
336
338
|
) as progress,
|
|
337
339
|
):
|
|
338
340
|
template = "{action} {filename} ({transfer_bytes} bytes)"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|