Compare commits
4 Commits
0.3.1
...
db60b4e42b
| Author | SHA1 | Date | |
|---|---|---|---|
| db60b4e42b | |||
|
afc964a076
|
|||
| d42f6d5fe1 | |||
|
103d6159d1
|
@@ -331,14 +331,31 @@ def main() -> None:
|
|||||||
console.print("No saved states.")
|
console.print("No saved states.")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
table = Table(box=box.SIMPLE, header_style="bold")
|
||||||
|
|
||||||
|
table.add_column("State")
|
||||||
|
table.add_column("Root path")
|
||||||
|
table.add_column("Created")
|
||||||
|
|
||||||
for name, root, created in rows:
|
for name, root, created in rows:
|
||||||
dt = datetime.fromisoformat(created)
|
dt = datetime.fromisoformat(created)
|
||||||
ts = dt.strftime("%Y-%m-%d %H:%M:%S %z")
|
ts = dt.strftime("%Y-%m-%d %H:%M:%S %z")
|
||||||
if name.startswith("auto-"):
|
|
||||||
console.print(f"[cyan]{name}[/cyan]\t{root}\t{ts}")
|
state_name = (
|
||||||
else:
|
f"[bright_cyan]{name}[/bright_cyan]"
|
||||||
console.print(f"{name}\t{root}\t{ts}")
|
if name.startswith("auto-")
|
||||||
return
|
else name
|
||||||
|
)
|
||||||
|
root = f"[bright_magenta]{root}[/bright_magenta]"
|
||||||
|
ts = f"[bright_cyan]{created}[/bright_cyan]"
|
||||||
|
|
||||||
|
table.add_row(
|
||||||
|
state_name,
|
||||||
|
root,
|
||||||
|
ts,
|
||||||
|
)
|
||||||
|
|
||||||
|
console.print(table)
|
||||||
|
|
||||||
if args.delete:
|
if args.delete:
|
||||||
if delete_state(conn, args.delete) == 0:
|
if delete_state(conn, args.delete) == 0:
|
||||||
|
|||||||
2
poetry.lock
generated
2
poetry.lock
generated
@@ -289,4 +289,4 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess
|
|||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "2.0"
|
lock-version = "2.0"
|
||||||
python-versions = ">=3.10,<4.0"
|
python-versions = ">=3.10,<4.0"
|
||||||
content-hash = "4a5c993fcc16fe3739c43eb00bed750ce0803d45e37c7a786aa0b83bb4930267"
|
content-hash = "8cfa38f4e2f17dba430ea08f7be3c91890a0c7a4535b69d9565b84d714f589bc"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "chguard"
|
name = "chguard"
|
||||||
version = "0.3.1"
|
version = "0.3.3"
|
||||||
description = "Safety-first tool to snapshot and restore filesystem ownership and permissions."
|
description = "Safety-first tool to snapshot and restore filesystem ownership and permissions."
|
||||||
authors = ["Marco D'Aleo <marco@marcodaleo.com>"]
|
authors = ["Marco D'Aleo <marco@marcodaleo.com>"]
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
@@ -12,8 +12,8 @@ repository = "https://git.sysmd.uk/guardutils/chguard"
|
|||||||
python = ">=3.10,<4.0"
|
python = ">=3.10,<4.0"
|
||||||
rich = ">=12"
|
rich = ">=12"
|
||||||
argcomplete = ">=2"
|
argcomplete = ">=2"
|
||||||
platformdirs = ">=4.5.1"
|
platformdirs = ">=4.2.2"
|
||||||
filelock = ">=3.20.1"
|
filelock = ">=3.15.4"
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
chguard = "chguard.cli:main"
|
chguard = "chguard.cli:main"
|
||||||
|
|||||||
Reference in New Issue
Block a user