Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
522 B

#!/bin/bash
tmpfile=$(mktemp)
destfile=$(mktemp)
wget -q 'https://drive.yigitcolakoglu.com/remote.php/dav/addressbooks/users/yigitcolakoglu/contacts/?export' \
--user yigitcolakoglu \
--password "$(pass show Server/drive.yigitcolakoglu.com/yigitcolakoglu)" \
-O $tmpfile
abook --convert \
--informat vcard \
--infile $tmpfile \
--outformat abook \
--outfile $destfile
rm $tmpfile
chmod 600 $destfile
sed 's/([0-9]) ([0-9])/\1\2/g' $destfile
mv $destfile "$XDG_DATA_HOME"/abook/addressbook