Created
June 6, 2024 17:34
-
-
Save sandro010/82fbae9cc8a8d729a1f042e7ea21b725 to your computer and use it in GitHub Desktop.
VCF generator
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
| import sys | |
| def create_vcf_file(input_file, output_file): | |
| with open(input_file, 'r') as numbers_file: | |
| with open(output_file, 'w') as vcf_file: | |
| for line in numbers_file: | |
| phone_number = line.strip() | |
| vcf_file.write(f"BEGIN:VCARD\nVERSION:3.0\nFN:\nN:;;;;\nTEL;TYPE=CELL:{phone_number}\nCATEGORIES:myContacts\nEND:VCARD\n") | |
| create_vcf_file(sys.argv[1], sys.argv[2]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment