From 288ff8468b6b278d846e74dcf5e4e57620273527 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Fri, 24 Sep 2021 14:52:57 +0200 Subject: [PATCH] Add debug output --- convert.py | 5 +++++ kpwriter.py | 1 + 2 files changed, 6 insertions(+) diff --git a/convert.py b/convert.py index 26fb834..90f4fa1 100755 --- a/convert.py +++ b/convert.py @@ -6,6 +6,7 @@ import yaml import onepif import kpwriter +from pprint import pprint from os.path import splitext parser = argparse.ArgumentParser(description="Convert 1Password 1PIF exports into a KeePass KDBX file.") @@ -38,7 +39,11 @@ RECORD_MAP = yaml.load(open("mappings.yml", "rt"), Loader=yaml.SafeLoader) uuid_map = {} for item in opif: + print("Item raw:") + pprint(item.raw) + print("Props:") + pprint(item.properties) # Fields that are not to be added as custom properties fids_done = ["passwordHistory"] diff --git a/kpwriter.py b/kpwriter.py index 16eea39..abaa03f 100644 --- a/kpwriter.py +++ b/kpwriter.py @@ -85,6 +85,7 @@ class KpWriter: self.set_prop("KeePassHttp Settings", json.dumps(current_settings)) def set_prop(self, key, value, protected=False): + print("Setting {} to {}".format(repr(key), repr(value))) self.current_entry.set_custom_property(key, value) if protected: # https://github.com/libkeepass/pykeepass/issues/89