Add debug output
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user