Skip to content

Instantly share code, notes, and snippets.

@mcculley
Created June 5, 2017 19:58
Show Gist options
  • Save mcculley/8b33f3a4c1bc51654587f8972f5389dd to your computer and use it in GitHub Desktop.
Save mcculley/8b33f3a4c1bc51654587f8972f5389dd to your computer and use it in GitHub Desktop.
A little script to convert a word list into an address book in vCard/VCF format.
#!/bin/sh
if [ $# -eq 0 ]
then
cat << EOF
Usage: $0 <wordlist> > contacts.vcf
Converts a list of words, one per line, in <wordList> into an address book in
vCard/VCF format. This is useful for working around autocorrect problems on iOS.
EOF
exit 0
fi
for word in $(cat $1)
do
cat <<EOF
BEGIN:VCARD
VERSION:3.0
N:;$word;;;
FN:$word
END:VCARD
EOF
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment