Created
April 23, 2015 06:05
-
-
Save akesterson/ff7bcfe925b9621e47e5 to your computer and use it in GitHub Desktop.
Convert Keeper CSV exports to Lastpass CSV import
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This isn't 100%, but it will get you most of the way there (assumes bash 4+): | |
(\ | |
echo 'url,type,username,password,hostname,extra,name,grouping' ; \ | |
cat KEEPER_BACKUP_FILE | sed -e s/' '/'|'/g -e s/','//g | (\ | |
while read LINE; do \ | |
IFS='|' read -r -a fields <<< "$LINE"; \ | |
type="server"; \ | |
if [[ "${fields[4]}" == "" ]]; then \ | |
type=''; \ | |
fields[4]="http://sn"; \ | |
fi; \ | |
echo "${fields[4]},server,${fields[2]},${fields[3]},,${fields[5]},${fields[1]},${fields[0]}"; \ | |
done\ | |
) \ | |
) > SOME_NEW_FILE.csv | |
You will need to manually go through the CSV this generates, it is not accurate enough to trust it 100%. But it will get you going. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment