Skip to content

handle field names of Revelation entry types other than Generic#82

Merged
roddhjav merged 3 commits intoroddhjav:masterfrom
elho:revelation-update
Apr 16, 2020
Merged

handle field names of Revelation entry types other than Generic#82
roddhjav merged 3 commits intoroddhjav:masterfrom
elho:revelation-update

Conversation

@elho
Copy link
Copy Markdown
Contributor

@elho elho commented May 24, 2019

Non-ancrient versions of Revelation do support various types of password entries, each having a different subset of fields. There is both fields with additional information as well as fields for the same things with different names (e.g. code or pin what essetially is the password).

This change:

  • adds entries in the "Types" folder to the test data having one sample entry for each of the password entry types supported by Revelation 0.4.14
  • adds a folder with a desription to the test data for completeness sake (the description isn't used anywhere)
  • add handling of most of the password entry types field names, mapping them to better key names than what using --all would result in
  • skip the 'updated' field (relevant when using --all) which contains what looks like epoch time stamp of last update - if wanted by some users, it should be handled properly, as it is, its of little use and high annoyance
  • add some clean()'ing:
    • moving URLs stored in 'host' key in old Generic type entries to 'url' key, if that is not used yet,
    • concatenating 'host' and 'domain' keys to a FQDN stored in 'host'

@roddhjav
Copy link
Copy Markdown
Owner

Thank (again) a lot for this PR. This is a nice addition to the revelation importer and I will merge it.

However, you need to fix the tests first. You cannot change the file tests/db/revelation.xml because its result is tested against the data from tests/references/main.yml and this content is common for all supported importer.

Alternatively, to quickly and easily test your new data, you can create a new test for it in tests/tests_importers.py. You can simply take test_importers_encryptr and adapt it to test your new data with revelation. You mostly need to:

  • Create a file db/revelation-other.xml where you only need to put the data from your Type folder.
  • Create the reference test file with your expected data to ensure correctness of the test.

@elho elho force-pushed the revelation-update branch from 9f70a0b to 06453af Compare July 23, 2019 17:17
@elho
Copy link
Copy Markdown
Contributor Author

elho commented Jul 23, 2019

Besides fixing the test-suite, I meanwhile used a pass-import version with these changes with real world data, successfully import 541 passwords from Revelation into pass. 😄

@roddhjav roddhjav merged commit 8d96922 into roddhjav:master Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants