feat(configuration): support multiple vaults in the configuration file (#6)

When multiple vaults are added to the configuration file, the script will prompt 
you to select one at runtime
This commit is contained in:
Nathaniel Landau
2023-01-24 10:32:56 -05:00
committed by GitHub
parent 5abab2ad20
commit 1e4fbcb4e2
23 changed files with 350 additions and 171 deletions

View File

@@ -1,7 +1,6 @@
"""Utility functions."""
import re
from os import name, system
from pathlib import Path
from typing import Any
import typer
@@ -83,17 +82,6 @@ def version_callback(value: bool) -> None:
raise typer.Exit()
def vault_validation(path: str) -> bool | str:
"""Validates the vault path."""
path_to_validate: Path = Path(path).expanduser().resolve()
if not path_to_validate.exists():
return f"Path does not exist: {path_to_validate}"
if not path_to_validate.is_dir():
return f"Path is not a directory: {path_to_validate}"
return True
def docstring_parameter(*sub: Any) -> Any:
"""Decorator to replace variables within docstrings.