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

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