Merge pull request #838 from PR0M3TH3AN/codex/add-manual-export-without-encryption

Add option to export and import database without encryption
This commit is contained in:
thePR0M3TH3AN
2025-08-20 21:08:49 -04:00
committed by GitHub
8 changed files with 151 additions and 32 deletions

View File

@@ -1325,6 +1325,11 @@ def main(argv: list[str] | None = None, *, fingerprint: str | None = None) -> in
exp = sub.add_parser("export")
exp.add_argument("--file")
exp.add_argument(
"--unencrypted",
action="store_true",
help="Export without encryption",
)
imp = sub.add_parser("import")
imp.add_argument("--file")
@@ -1396,7 +1401,9 @@ def main(argv: list[str] | None = None, *, fingerprint: str | None = None) -> in
password_manager.deterministic_totp = True
if args.command == "export":
password_manager.handle_export_database(Path(args.file))
password_manager.handle_export_database(
Path(args.file), encrypt=not args.unencrypted
)
return 0
if args.command == "import":
password_manager.handle_import_database(Path(args.file))