meldium importer resolves #68
This commit is contained in:
parent
3f0b14e48a
commit
804f1f5610
|
@ -92,6 +92,9 @@
|
|||
case 'splashidcsv':
|
||||
importSplashIdCsv(file, success, error);
|
||||
break;
|
||||
case 'meldiumcsv':
|
||||
importMeldiumCsv(file, success, error);
|
||||
break;
|
||||
default:
|
||||
error();
|
||||
break;
|
||||
|
@ -2336,5 +2339,35 @@
|
|||
});
|
||||
}
|
||||
|
||||
function importMeldiumCsv(file, success, error) {
|
||||
Papa.parse(file, {
|
||||
header: true,
|
||||
encoding: 'UTF-8',
|
||||
complete: function (results) {
|
||||
parseCsvErrors(results);
|
||||
|
||||
var folders = [],
|
||||
logins = [],
|
||||
loginRelationships = [];
|
||||
|
||||
for (var j = 0; j < results.data.length; j++) {
|
||||
var row = results.data[j];
|
||||
var login = {
|
||||
name: row.DisplayName && row.DisplayName !== '' ? row.DisplayName : '--',
|
||||
favorite: false,
|
||||
uri: row.Url && row.Url !== '' ? fixUri(row.Url) : null,
|
||||
password: row.Password && row.Password !== '' ? row.Password : null,
|
||||
username: row.UserName && row.UserName !== '' ? row.UserName : null,
|
||||
notes: row.Notes && row.Notes !== '' ? row.Notes : null
|
||||
};
|
||||
|
||||
logins.push(login);
|
||||
}
|
||||
|
||||
success(folders, logins, loginRelationships);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return _service;
|
||||
});
|
||||
|
|
|
@ -190,6 +190,12 @@
|
|||
instructions: $sce.trustAsHtml('Using the Ascendo DataVault desktop application, navigate ' +
|
||||
'to "Tools" > "Export". In the dialog that pops up, select the "All Items (DVX, CSV)" ' +
|
||||
'option. Click the "Ok" button to save the CSV file.')
|
||||
},
|
||||
{
|
||||
id: 'meldiumcsv',
|
||||
name: 'Meldium (csv)',
|
||||
instructions: $sce.trustAsHtml('Using the Meldium web vault, navigate to "Settings". ' +
|
||||
'Locate the "Export data" function and click "Show me my data" to save the CSV file.')
|
||||
}
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in New Issue