|
@@ -1,4 +1,3 @@
|
|
|
-import os
|
|
|
|
|
import subprocess
|
|
import subprocess
|
|
|
from pathlib import Path
|
|
from pathlib import Path
|
|
|
from dataclasses import dataclass
|
|
from dataclasses import dataclass
|
|
@@ -13,9 +12,11 @@ class KeePass:
|
|
|
bin: str | Path
|
|
bin: str | Path
|
|
|
|
|
|
|
|
def read_entry_attribute(self, key, attribute):
|
|
def read_entry_attribute(self, key, attribute):
|
|
|
|
|
+ print(f"reading attr {attribute} of key {key}..")
|
|
|
return self._exec(["show", "-a", attribute, self.path, key]).strip()
|
|
return self._exec(["show", "-a", attribute, self.path, key]).strip()
|
|
|
|
|
|
|
|
def read_entry_attachment(self, key, attachment):
|
|
def read_entry_attachment(self, key, attachment):
|
|
|
|
|
+ print(f"reading attachment {attachment} of key {key}..")
|
|
|
return self._exec(
|
|
return self._exec(
|
|
|
["attachment-export", "--stdout", self.path, key, attachment, "/dev/null"]
|
|
["attachment-export", "--stdout", self.path, key, attachment, "/dev/null"]
|
|
|
)
|
|
)
|