I'd like to take the output of `pwsafe --exportdb > database.txt` and convert it to a KeePassX XML friendly format (feature request in pwsafe).
I found flat file converter but the syntax is beyond me with this example. Solutions are welcomed.
More details
Here is the pwsafe --> KeePassX XML translations. The pwsafe export is simply a txt file with 6 fields (the first field can be ignored):
uuid= doesn't translate
group= group>title
name= entry>title
login= entry>username
passwd= entry>password
notes= entry>comment
Example txt file for conversion (exported from pwsafe):
# passwordsafe version 2.0 database"
uuid group name login passwd notes
"123d9-daf-df-3423423" "retail" "amazon" "myamazonuser" "sjfJ849" "superfluous comment"
"4599d934-dsfs-324" "retail" "netflix" "netflixuser" "dj3W$#" ""
"4kdfkd-434-jj" "email" "gmail" "mygmail" "dfkpass" ""
Example xml in keepassx xml:
<!DOCTYPE KEEPASSX_DATABASE>
<database>
<group>
<title>Internet</title>
<entry>
<title>github</title>
<username>githubusername</username>
<password>githubpassword</password>
<comment>optional comment</comment>
</entry>
</group>
<group>
<title>retail</title>
<entry>
<title>amazon</title>
<username>username</username>
<password>myamazonpw</password>
</entry>
</group>
<group>
<title>retail</title>
<entry>
<title>netflix</title>
<username>username</username>
<password>mynfxpw</password>
</entry>
</group>
</database>