Skip to content

Commit

Permalink
feat: add tags data from 1password 1PIF file to generic entry
Browse files Browse the repository at this point in the history
  • Loading branch information
davidandreoletti committed Jan 23, 2024
1 parent 2785c7d commit abdfffd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pass_import/managers/onepassword.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ class OnePassword4PIF(JSON):
'login': 'username',
'url': 'location',
'comments': 'notesPlain',
'group': 'folderUuid'
'group': 'folderUuid',
'tags': 'tags'
}

# Import methods
Expand Down Expand Up @@ -145,6 +146,13 @@ def parse(self):
for key, value in item.items():
if key not in self.ignore:
entry[keys.get(key, key)] = value

tags = []
if 'openContents' in item:
open_contents = item['openContents']
tags = open_contents.get('tags', [])

entry['tags'] = tags
self.data.append(entry)
self._sortgroup(folders)

Expand Down

0 comments on commit abdfffd

Please sign in to comment.