Update README. Make sure to always have unique Titles for entries.
This commit is contained in:
parent
9439e42cdb
commit
6b3c2a157c
@ -32,13 +32,13 @@ Basic 1Password 1PIF structure
|
||||
'fields': [
|
||||
{
|
||||
'designation': 'username',
|
||||
'name': 'username',
|
||||
'name': 'name_of_username_field_on_website',
|
||||
'type': 'T',
|
||||
'value': 'john.doe'
|
||||
},
|
||||
{
|
||||
'designation': 'password',
|
||||
'name': 'password',
|
||||
'name': 'name_of_password_field_on_website',
|
||||
'type': 'P',
|
||||
'value': 'ultrasecurepassword'
|
||||
}
|
||||
|
@ -16,7 +16,13 @@ class KpWriter:
|
||||
# TODO: Handle nested groups?
|
||||
group = self.kp.add_group(self.kp.root_group, dest_group_name)
|
||||
|
||||
self.current_entry = self.kp.add_entry(group, title, "", "")
|
||||
suffix_ctr = 1
|
||||
new_title = title
|
||||
while self.kp.find_entries(title=new_title, group=group):
|
||||
suffix_ctr += 1
|
||||
new_title = "{} - {}".format(title, suffix_ctr)
|
||||
|
||||
self.current_entry = self.kp.add_entry(group, new_title, "", "")
|
||||
return self.current_entry
|
||||
|
||||
def save(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user