fritz-xml-2vcard

3.0.4 • Public • Published

fritzXML2vcard Build Status

Convert FRITZ!Box address book XML format to vCards.

Web interface/ online version

An online web-version is available. You may also download the entire website.

Screenshot Web interface/ online version

CLI user installation

Requires nodejs and npm.

Install the fritz-xml-2vcard package from npm.

npm i -g fritz-xml-2vcard
fritz-xml-2vcard /path/to/contact.xml /path/to/output/dir

Developer installation

git clone https://github.com/Rillke/fritzXML2vcard.git
cd fritzXML2vcard
npm install
npm run build
npm test
mkdir -p /path/to/output/dir
/path/to/node_or_nodejs ./convert.js /path/to/contact.xml /path/to/output/dir

Node.js API usage

var libConvert = require('fritz-xml-2vcard');
// area code and country code are optional arguments
var result = libConvert.fritzXML2vcard(xmlString, '030', '+49');
for (var vcfFile in result) {
	if (result.hasOwnProperty(vcfFile)) {
		fs.writeFileSync(outputDir + '/' + vcfFile, result[vcfFile]);
	}
}

Web Browser API usage

Get fritzXML2vcard-browser-api-min.js or fritzXML2vcard-browser-api.js. Put it side by side with the following html file:

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>Cool vcf converter.</title>
	</head>
	<body>
		<!-- page content -->
		<script src="fritzXML2vcard-browser-api-min.js"></script>
		<script>
		var fritzXML = '<?xml version="1.0" encoding="utf-8"?>' +
			'<phonebooks><phonebook name="Telefonbuch">' +
			'<contact><person><realName>Test GmbH</realName></person>' +
			'<telephony nid="2"><number type="work" prio="1" id="0">(01234) 567890</number>' +
			'<number type="fax_work" prio="0" id="1">56789-2</number></telephony>' +
			'</contact></phonebook></phonebooks>';
		var vCards = window.libConvert.fritzXML2vcard(fritzXML, '030', '+49');
		console.log(vCards);
		for (var vcfFile in vCards) {
			if (vCards.hasOwnProperty(vcfFile)) {
				alert(vcfFile + ': ' + vCards[vcfFile]);
			}
		}
		</script>
	</body>
</html>

Other tools

Tool Language / Plattform Web-Version Import Export License
Contact-Conversion-Wizard C# easy to run on Windows; MacOS and Linux possible - Outlook, Fritz!Box XML, vCard, Fritz!Adr, CSV, Google Contacts Outlook, Fritz!Box XML, vCard, Fritz!Adr, Snom v7, Snom v8, Gigaset Talk&Surf CSV, Asstra, Grandstream, Auerswald, Google Contacts GPLv3
fritzXML2vcard JavaScript - Node.js Almost all operating systems available Fritz!Box XML vCard(s) MIT
vcard2fritzXML Java - Almost all operating systems - vCard Fritz!Box XML GPLv2

Package Sidebar

Install

npm i fritz-xml-2vcard

Weekly Downloads

1

Version

3.0.4

License

MIT

Unpacked Size

2.64 MB

Total Files

41

Last publish

Collaborators

  • rillke