Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added the functionality to import passwords from a CSV file
This allows to migrate passwords from other password managers to TrezorPass. E.g. One could export his passwords from KeePass into a CSV file. Then modify this CSV via scripts or by hand such that the resulting CSV file corresponds to the TrezorPass CSV import format. This modified CSV can then be imported into TrezorPass.
This new functionality reads a properly formated CSV file from disk and adds its contents to the current entries.
Import format in CSV should be : group, key, password, comments
There is no special error checking, so be extra careful.
Make a backup first. As a matter of fact, TrezorPass automatically makes a backup for you before performing a CSV import.
Entries from CSV will be added to existing pwdb. If this is not desired create an empty pwdb file first.
GroupNames are unique, so if a groupname exists then key-password-comments tuples are added to the already existing group. If a group name does not exist, a new group is created and the key-password-comments tuples are added to the newly created group.
Keys are not unique. So key-password-comments are always added. If a key with a given name existed before and the CSV file contains a key with the same name, then the key-password-comments is added and after the import the given group has 2 keys with the same name. Both keys exist then, the old from before the import, and the new one from the import.
Examples of valid CSV file format: Some example lines