Giter VIP home page Giter VIP logo

vcard_generator's Introduction

vcard generator

If you need to fill your DB or device with real-looking contact data, you're in luck, this is for you. This generates a lot of contact names, addresses and various details in a single vcard file to be imported in most address book apps.

This repo is relying heavily on the gist by brighid: https://gist.github.com/brighid/58519d5849701a1f4ec2

I increased the diversity of various fields, added base64 encoded profile images, added UTF-8 support for those fancy äöü's, and also localized it to my region (switzerland). Your use case may differ.

Disclaimer

However, the names and numbers are not totally unique. Depending on the ratio between the length of the names lists and the number of contacts you want to generate; duplicates may be a certainty.

Also be aware that the phone numbers and/or people with those exact names or email addresses may actually exist. Don't call.

Use it

python2 vcard_generator.py 100 filename

This creates a file with the name "filename.vcard" containing 100 random contacts. You may be able to create up to 65,000 cards at once.

Adjust it

  • add_class_field Mark generated cards with the class "vcard_generator" for easy finding fake contacts. Highly recommended to leave it True.
  • target_fields delete the fields in this list you'll never want to show up
  • frequency_of_org Frequency of an associated company to show up (0=never, 100=always)
  • frequency_of_title Frequency of a title to show up (0=never, 100=always)
  • frequency_of_address Frequency of an address to show up (0=never, 100=always)
  • frequency_of_photo Frequency of a user image to show up (0=never, 100=always). Be aware that some software might not like it if you import 50K cards with 50K images at once.
  • frequency_of_noble Frequency of a noble title to show up (0=never, 100=always)

Localize it

Adjust the following lists to your liking to match your target area.

first_names
last_names
streets
city
canton
plz
domains
orgs
titles

See it

BEGIN:VCARD
VERSION:3.0
N:Zürcher;Lorian;
FN:Lorian Zürcher
TEL;WORK;VOICE:0041 78 600 10 51
ADR;WORK:;;Pilatusstrasse 248;La Chaux-de-Fonds;NE;2300;Switzerland
EMAIL;PREF;INTERNET:[email protected]
CLASS:vcard_generator
REV:20200803T143131Z
END:VCARD
BEGIN:VCARD
VERSION:3.0
N:Röthlisberger;Joder;
FN:Joder Röthlisberger
PHOTO;TYPE=JPEG;ENCODING=b:/9j/base64string...
TEL;WORK;VOICE:077 344 95 75
ADR;WORK:;;Schwanenplatz 24b;Biel/Bienne;BE;2500;Switzerland
EMAIL;PREF;INTERNET:[email protected]
CLASS:vcard_generator
REV:20200610T112722Z
END:VCARD

More examples in the example folder.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.