1
0

Add debug output

This commit is contained in:
2021-09-24 14:52:57 +02:00
parent 557c5c4f7d
commit 288ff8468b
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -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"]
+1
View File
@@ -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