scripts: fix pass-export TOTP containing too much information for keepassxc

This commit is contained in:
Leonardo Eugênio 2024-08-19 00:02:36 -03:00
parent 65bdab45c6
commit bc2ee9c165
2 changed files with 4 additions and 0 deletions

View file

@ -69,6 +69,7 @@
pass-export = [ pass-export = [
pass2csv pass2csv
gnupg gnupg
sd
]; ];
wpass = [ wpass = [
wdmenu wdmenu

View file

@ -8,3 +8,6 @@ pass2csv "$PASSWORD_STORE_DIR" "$HOME/passwords.csv" \
-f User '(user|login)(:\s*)?' \ -f User '(user|login)(:\s*)?' \
-f TOTP 'otpauth(:)?' \ -f TOTP 'otpauth(:)?' \
-f URL 'url(:\s*)?' -f URL 'url(:\s*)?'
# Fix TOTP format for keepass
sd '"//totp/.*?secret=(.*?)(&.*?)?"' '"$1"' "$HOME/passwords.csv"