bitwarden #43

Merged
sid merged 3 commits from develop into release-25.11 2026-05-18 16:39:54 +02:00
Showing only changes of commit 49c93c82e0 - Show all commits

View file

@ -43,13 +43,20 @@ def process_csv(input_file, output_file):
if col not in new_row: if col not in new_row:
new_row[col] = default_val new_row[col] = default_val
folder = new_row.get('folder', '')
name = new_row.get('name', '')
if folder.startswith('www') and name:
if not name.startswith('http://') and not name.startswith('https://'):
new_row['login_uri'] = f'https://{name}'
else:
new_row['login_uri'] = name
if new_row['notes']: if new_row['notes']:
new_row['notes'] = new_row['notes'].replace('\n', ' ').replace('\r', ' ') new_row['notes'] = new_row['notes'].replace('\n', ' ').replace('\r', ' ')
new_row['notes'] = re.sub(r'\s+', ' ', new_row['notes']).strip() new_row['notes'] = re.sub(r'\s+', ' ', new_row['notes']).strip()
notes = new_row['notes'] notes = new_row['notes']
if notes: if notes:
# Look for pattern: "login: USERNAME"
match = re.search(r'login:\s*(\S+)', notes, re.IGNORECASE) match = re.search(r'login:\s*(\S+)', notes, re.IGNORECASE)
if match: if match:
username = match.group(1) username = match.group(1)