Skip to content

Commit

Permalink
version bump to 1.12 to catch latest changes from upstream.
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-maus committed Jul 14, 2020
1 parent 47e99d2 commit 5144814
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 34 deletions.
66 changes: 34 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Features:

**CAUTION: This script will overwrite your current contacts in the FritzBox without any warning!**

## Information

This version of carddav2fb is a forked version from carlos22 (https://github.com/carlos22/carddav2fb) and adding support for convenient image upload, different FRITZ!Box base paths (for example for FRITZ!Box 7490 (UI) OS: 6.50) and full name design support.

## Requirements

* PHP-version 5.3.6 or higher
Expand All @@ -21,10 +25,10 @@ Features:

## Installation

Checkout the carddav2fb sources including its related subprojects using the following command:
Checkout the carddav2fb sources including its related subprojects using the following command:

```
git clone https://github.com/carlos22/carddav2fb.git
git clone https://github.com/jens-maus/carddav2fb.git
```

Now you should have everything setup and checked out to a 'carddav2fb' directory.
Expand Down Expand Up @@ -56,36 +60,34 @@ Now you should have everything setup and checked out to a 'carddav2fb' directory

## config.php Example (owncloud)

```php
$config['fritzbox_ip'] = 'fritz.box';
$config['fritzbox_user'] = '<USERNAME>';
$config['fritzbox_pw'] = '<PASSWORD>';
$config['phonebook_number'] = '0';
$config['phonebook_name'] = 'Telefonbuch';
$config['fritzbox_path'] = 'file:///var/media/ftp/';

// full name format options default 0
// parts in '' will only added if existing and switched to true in config
// 0 = 'Prefix' Lastname, Firstname, 'Additional Names', 'Suffix', 'orgname'
// 1 = 'Prefix' Firstname Lastname 'AdditionalNames' 'Suffix' '(orgname)'
// 2 = 'Prefix' Firstname 'AdditionalNames' Lastname 'Suffix' '(orgname)'
$config['fullname_format'] = 0;

// fullname parts
$config['prefix'] = false; // include prefix in fullname if existing
$config['suffix'] = false; // include suffix in fullname if existing
$config['addnames'] = false; // include additionalnames in fullname if existing
$config['orgname'] = false; // include organisation (company) in fullname if existing
$config['fritzbox_ip'] = 'fritz.box';
$config['fritzbox_user'] = '<USERNAME>';
$config['fritzbox_pw'] = '<PASSWORD>';
$config['phonebook_number'] = '0';
$config['phonebook_name'] = 'Telefonbuch';
$config['fritzbox_path'] = 'file:///var/media/ftp/';

// full name format options default 0
// parts in '' will only added if existing and switched to true in config
// 0 = 'Prefix' Lastname, Firstname, 'Additional Names', 'Suffix', 'orgname'
// 1 = 'Prefix' Firstname Lastname 'AdditionalNames' 'Suffix' '(orgname)'
// 2 = 'Prefix' Firstname 'AdditionalNames' Lastname 'Suffix' '(orgname)'
$config['fullname_format'] = 0;

// fullname parts
$config['prefix'] = false; // include prefix in fullname if existing
$config['suffix'] = false; // include suffix in fullname if existing
$config['addnames'] = false; // include additionalnames in fullname if existing
$config['orgname'] = false; // include organisation (company) in fullname if existing

$config['quickdial_keyword'] = 'Quickdial:'; // once activated you may add 'Quickdial:+49030123456:**709' to the contact note field and the number will be set as quickdialnumber in your FRITZ!Box. It is possible to add more quickdials for one contact each in a new line

// first
$config['carddav'][0] = array(
'url' => 'https://<HOSTNAME>/remote.php/carddav/addressbooks/<USERNAME>/contacts',
'user' => '<USERNAME>',
'pw' => '<PASSWORD>'
);
```
$config['quickdial_keyword'] = 'Quickdial:'; // once activated you may add 'Quickdial:+49030123456:**709' to the contact note field and the number will be set as quickdialnumber in your FRITZ!Box. It is possible to add more quickdials for one contact each in a new line

// first
$config['carddav'][0] = array(
'url' => 'https://<HOSTNAME>/remote.php/carddav/addressbooks/<USERNAME>/contacts',
'user' => '<USERNAME>',
'pw' => '<PASSWORD>'
);

## Note
This script is using third-party libraries for downloading VCards from CardDAV servers based on the following packages
Expand All @@ -97,4 +99,4 @@ This script is using third-party libraries for downloading VCards from CardDAV s
This script is released under Public Domain.

## Authors
Copyright (c) 2012-2016 Karl Glatz, Martin Rost, Jens Maus, Johannes Freiburger
Copyright (c) 2012-2020 Karl Glatz, Martin Rost, Jens Maus, Johannes Freiburger
4 changes: 2 additions & 2 deletions carddav2fb.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
setlocale(LC_ALL, 'de_DE.UTF8');

// Version identifier for CardDAV2FB
$carddav2fb_version = '1.11 (2016-05-12)';
$carddav2fb_version = '1.12 (2020-07-14)';

// check for the minimum php version
$php_min_version = '5.3.6';
Expand Down Expand Up @@ -70,7 +70,7 @@
// ---------------------------------------------
// MAIN
print "carddav2fb.php " . $carddav2fb_version . " - CardDAV to FRITZ!Box phonebook conversion tool" . PHP_EOL;
print "Copyright (c) 2012-2016 Karl Glatz, Martin Rost, Jens Maus, Johannes Freiburger" . PHP_EOL . PHP_EOL;
print "Copyright (c) 2012-2020 Karl Glatz, Martin Rost, Jens Maus, Johannes Freiburger" . PHP_EOL . PHP_EOL;

$client = new CardDAV2FB($config);

Expand Down

0 comments on commit 5144814

Please sign in to comment.