zeruniverse/Password-Manager

Import issue

Closed this issue · 17 comments

Been having trying to import similar data from PPMA into Password-Manager, as its a bit vague as to what the correct or acceptable column names of a CSV file should be. Trying to export to see what is expected, seems just as bad as I have yet to figure out where on the "recovery" screen Im supposed to be able to export data - but that aside...

Is it possible on the import screen to show what fields are acceptable / available?
screenshot_20180923_181118

Otherwise all looks very good, so many thanks. Clifford

Yes I read that before starting. I just presented with an error along lines "Something went wrong", hence why I was saying if it actually produced a listing of what fields are active, I would stand a chance of knowing if the fields required are those defined as nicely readable or the col-name etc

Could you provide a sample file?

Exporting data consists of three steps:

  1. Creating a backup file (When logged in: Settings->Back Up)
  2. Start the recovery process using this file
  3. Export CSV

I think I know what the problem is: The delimiter for the csv file must be ; for importing.
I just added this prerequisite in the wiki.

I have just been spinning up a new server to test it all again.
Yes on V10, the backup instruction do now give as suggested by BenjaminHae, Im pretty sure when I was testing this before, it told me I would have to goto the login screen, but now clearly does allow to generate an encrypted file from Settings/Backup

I would have thought a CSV file would use comma's for delimiters as the C, would suggest than semicolon's?

So is it possible to not only have an update to show which fields are available but a prompt or selection of delimiters a s a feature suggestion?

I have tried again, and when editing import file with the header also changed , to ; I seem to have some success.
name;url;comment;tags;username;password
"Facebook - GV";"http://facebook.com/";"Comment1";"Tag1,Tag2";"a@g.com";"ABC123!"

Maybe a bit of overkill on the quotes, as my first run did work with mix of some field in quotes and not.

Thanks for that

I think for CSV delimiters we use a plugin... Not sure how hard it is to let it support ,.

and yes, we will consider to add the avaliable columns under the import pop up.

Btw, currently, you can go settings -> customize fields to look for avaliable fields. they are labels.

@BenjaminHae I found this: https://github.com/zeruniverse/Password-Manager/blob/master/src/js/main.js#L73

Is it possible to let the import function to support both ',' and ';' as separator?

Something like:

try:
    var accarray = $.csv.toObjects(csv, {separator: ";"});
    if len(accarray)==0:
          var accarray = $.csv.toObjects(csv, {separator: ","});
except:
    var accarray = $.csv.toObjects(csv, {separator: ","});

And can you add all labels to the import popup (modal)? The codes are all in jQuery now but I'm not an expert on jQuery...

I was planning to take a look at it. I hope there is a way to automatically determine the separator.
I'll also add the valid fields.

I've got some ideas for this that would add extra usability:

  • show column types available in the file
  • match columns to fields
  • guessing (or just trying) separators

I'll do it when I have a clear picture in my mind.

is this done or need some additional work? i currently have some time to look into it.

I have not started yet, so If you have time it would be a really cool feature.

close old issues