Coverage for pass_import/managers/padlock.py: 100%
14 statements
« prev ^ index » next coverage.py v7.4.3, created at 2024-02-26 12:11 +0000
« prev ^ index » next coverage.py v7.4.3, created at 2024-02-26 12:11 +0000
1# -*- encoding: utf-8 -*-
2# pass import - Passwords importer swiss army knife
3# Copyright (C) 2017-2024 Alexandre PUJOL <alexandre@pujol.io>.
4#
6import os
8from pass_import.core import register_managers
9from pass_import.formats.csv import CSV
12class PadlockCSV(CSV):
13 """Importer for Padloc CSV format."""
14 name = 'padlock'
15 url = 'https://padloc.app'
16 hexport = 'Settings > Export Data and copy text into a .csv file'
17 himport = 'pass import padlock file.csv'
18 keys = {
19 'title': 'name',
20 'password': 'password',
21 'login': 'username',
22 'url': 'url',
23 'comments': 'notes',
24 'group': 'tags'
25 }
27 def parse(self):
28 """Parse Padloc CSV file."""
29 super().parse()
30 for entry in self.data:
31 entry['group'] = entry.get('group', '').replace('\\', os.sep)
34register_managers(PadlockCSV)