Skip to content

A single purpose desktop application that allows a user to enter contact details into a GUI that then generates a QR code image.

License

Notifications You must be signed in to change notification settings

m-spangenberg/qr-vcard-generator

Repository files navigation

QR-vCard

example qr code

Summary

For my CS50P Final Project, I decided to create a single purpose, cross-platform desktop application with a functional GUI that generates vCards in QR code format.

Video Demo

Video Demo Link

Description

This is a single purpose desktop application that allows a user to enter contact details into a GUI that then generates a quick response code image. These QR code images can be scanned by most modern mobile devices that have a camera. QR code images allow for the ability to embed contact details on business cards, resumes, or even artwork.

The reason I chose this project was to learn how to create micro-applications for niche use-cases, and in turn learn more lightweight ways of presenting code functionality to end-users in non-technical settings. My reasoning being that good programmers should be able to help non-programmers solve problems by creating tools that simplify tasks and processes.




Setup

Make use of this one-liner for a quick setup.

git clone https://github.com/m-spangenberg/qr-vcard-generator && cd qr-vcard-generator/ && make init

Or, if you don't have build-essential installed, use pipenv to set up dependencies in order for the application to function.

# clone the repository
git clone https://github.com/m-spangenberg/qr-vcard-generator

# move into the cloned repo
cd qr-vcard-generator/

# make sure to have pipenv installed
pip install pipenv

# set up venv and install dependencies with pipenv
pipenv sync

# run the application
pipenv run python3 project.py



vCard Format

The vCard, or otherwise known as the VCF (Virtual Contact File) format is essentially a container format for contact information that can be shared between electronic devices, notably mobile phones.

With every entry on a new line, the .vcf format must always begin with BEGIN:VCARD, followed immediately by the version identifier VERSION:4.0, and must end with END:VCARD.

Example layout

BEGIN:VCARD
VERSION:4.0
KIND:individual
EMAIL;TYPE=work:[email protected]
EMAIL;TYPE=work:[email protected]
TITLE:Apple Seed Distributor
ROLE:Project Leader
FN:Johnny Appleseed
BDAY:19850412
ADR;TYPE=HOME:pobox;ext;street;locality;region;code;country
TEL;TYPE=CELL:+123 12 123 1234
TEL;TYPE=WORK:+123 12 12 1234
TEL;TYPE=HOME:+123 12 12 1234
TEL;TYPE=FAX:+123 12 12 1234
URL: https://www.example.com
TZ: Africa/Windhoek
ORG: ACME Apple Co. - Will take precedence over Full Name.
NOTE: optional note, keep it short
END:VCARD



Testing and Development Dependencies

To set up a development environment for this project with pipenv:

make dev

To perform unittests with pytest:

make tested

Or, if you don't have build-essential installed.

# install development dependencies
pipenv install --dev

# perform unittest
pipenv run pytest



Acknowledgements

Thank you to David Malan and his entire team for helping to make Harvard's CS50 accessible to anyone who wants to learn.

Easter Egg

If you generate an image without entering any information, you'll receive a QR code that points to Rick Astley's "Never Gonna Give You Up".

Further Reading

If you intend to fork this project, see the following links for helpful information on vCards.

Libraries Used

The following libraries and tools are used to make this project.

About

A single purpose desktop application that allows a user to enter contact details into a GUI that then generates a QR code image.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published