feat: added support for export of one file/item
This commit is contained in:
parent
2d60648cf9
commit
2ef7aafc89
1 changed files with 6 additions and 1 deletions
7
pass2csv
7
pass2csv
|
@ -96,7 +96,12 @@ def main(store_path, grouping_base, outfile, gpgbinary, use_agent, encodings,
|
|||
path = pathlib.Path(store_path)
|
||||
grouping_path = pathlib.Path(grouping_base)
|
||||
gpg = gnupg.GPG(gpgbinary=gpgbinary, use_agent=use_agent)
|
||||
for file in path.glob('**/*.gpg'):
|
||||
if not path.is_dir():
|
||||
if store_path[-4:] == '.gpg':
|
||||
files = [path]
|
||||
else:
|
||||
files = path.glob('**/*.gpg')
|
||||
for file in files:
|
||||
logging.info("Processing %s", file)
|
||||
with open(file, 'rb') as fp:
|
||||
decrypted = gpg.decrypt_file(fp)
|
||||
|
|
Loading…
Reference in a new issue