Giter Site home page Giter Site logo

ez-vcard's Introduction

ez-vcard

Continuous Integration:
Code Coverage: codecov.io
Maven Central: Maven Central
Chat Room: Gitter
License: FreeBSD License

ez-vcard is a vCard library written in Java. It can read and write vCards in many different formats. The "ez" stands for "easy" because the goal is to create a library that's easy to use.

Downloads | Javadocs | Maven/Gradle | Documentation

String str =
"BEGIN:VCARD\r\n" +
"VERSION:4.0\r\n" +
"N:Doe;Jonathan;;Mr;\r\n" +
"FN:John Doe\r\n" +
"END:VCARD\r\n";

VCard vcard = Ezvcard.parse(str).first();
String fullName = vcard.getFormattedName().getValue();
String lastName = vcard.getStructuredName().getFamily();
VCard vcard = new VCard();

StructuredName n = new StructuredName();
n.setFamily("Doe");
n.setGiven("Jonathan");
n.getPrefixes().add("Mr");
vcard.setStructuredName(n);

vcard.setFormattedName("John Doe");

String str = Ezvcard.write(vcard).version(VCardVersion.V4_0).go();

Features

  • Simple, intuitive API (see Examples).
  • Android compatibility.
  • Full compliance with 2.1, 3.0, and 4.0 specifications (see Supported Specifications).
  • Supports XML, HTML, and JSON encoded vCards (see Supported Specifications).
  • Extensive unit test coverage.
  • Low Java version requirement (1.8 or above).
  • Few dependencies on external libraries. Dependencies can be selectively excluded based on the functionality that is needed (see Dependencies).

News

August 27, 2023

Version 0.12.1 released. This release includes a few bug fixes. Please see the changelog for details.

February 4, 2023

Version 0.12.0 released. This release updates to Java 1.8 and a few other things. Please see the changelog for details.

September 11, 2021

Version 0.11.3 released. This release fixes several issues, including a security vulnerability. Please see the changelog for details.

Old News

Maven/Gradle

Maven

<dependency>
   <groupId>com.googlecode.ez-vcard</groupId>
   <artifactId>ez-vcard</artifactId>
   <version>0.12.1</version>
</dependency>

Gradle

compile 'com.googlecode.ez-vcard:ez-vcard:0.12.1'

Build Instructions

ez-vcard uses Maven as its build tool, and adheres to its conventions.

To build the project: mvn compile
To run the unit tests: mvn test
To build a JAR: mvn package

Eclipse users: Due to a quirk in the build process, before running the eclipse:eclipse goal, you must tweak some of the <resource> definitions in the POM file. See the comments in the POM file for details.

Questions / Feedback

You have some options:

Please submit bug reports and feature requests to the issue tracker. Contributors are listed in the project credits.

Java 6 branch

For those who can't use Java 8 (i.e. older Android APIs), there exists a parallel, Java 6 branch. This branch receives the same bug fixes that the main branch receives.

https://github.com/mangstadt/ez-vcard/tree/j6

Android

The ez-vcard-android project interfaces between ez-vcard and the native Android APIs. Note, however, that it is not being actively maintained.

Node.js

A Node.js wrapper for ez-vcard can be found here: https://github.com/Maxim-Mazurok/ez-vcard

Credits

Lead Developer
Michael Angstadt

Documentation
Michael Angstadt

Architecture Ideas
George El-Haddad (CardMe Project)

Maven Central Reviewer
Joel Orlina

Project Hosting
Github
Google Code

Contributors
amarnathr (hCard template bug)
bgorven (jackson-databind integration, jackson pretty printing, round-trip testing)
Moritz Bechler (Geo URI bug fix)
Kiran Kumar Bhushan (quoted-printable bug)
Sean Boylan (XXE vulnerability)
Florian Brunner (OSGi metadata)
Pratyush Chandra (ez-vcard-android)
Lívio Cipriano (Issue 35)
cmargenau (XML 1.1 support)
DerBlade (missing parameter method)
Ed Developer (wiki fix)
Juliane Dombrowski (quoted-printable line folding)
F. Gaffron (quoted-printable charsets)
Edward Hetherington (plain text KEY issue)
isindir (Javadoc fix)
knutolav (Issue 1, Issue 2)
Nico Lehmann (Windows 10 Contacts compatibility issue)
Alexander Myltsev (Issue with folding quoted printable values)
David Nault (Issue 3, Issue 7)
NeverWise (chaining parser & custom scribes issue)
rfc2822 (folding line issue, IMPP issue, trailing semicolons issue, non-Western digits)
Steven Ruppert (folding surrogate character pairs, parsing tel URIs)
Melchin Sapir (README suggestion)
Matt Siegel (base64 property value bug, unit test bug)
David Spieler (hCard template bug)
stonio (unit test fix, readme fix)
Tom Vogel (quoted-printable charsets)
Eike Weyl (Wiki fix, Javadoc fix)
沈健 (plain-text vCard formatting issue)

Donators
DAVDroid

Caffeine Suppliers
'feine
Starbucks
Volo Coffeehouse

No animals were harmed in the making of this library.

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.