Created
June 5, 2017 19:58
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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