Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jens-maus/carddav2fb
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/jens-maus/carddav2fb: (23 commits)
  we use !== for asXML() to make sure we really match with false
  fixed some more issues revealed by scrutinizer.
  Scrutinizer Auto-Fixes
  fixed some php code warnings revealed by scrutinizer-ci.
  Update README.md
  fixed the recently introduced warning/error outputs by adding PHP_EOL and a semicolon. This refs jens-maus#26.
  added some more warning/error output if a FTP-connection cannot be performed for some reasons. This refs jens-maus#26.
  fixed problem if the fonpix directory doesn't exist and is freshly created. This refs jens-maus#26.
  slightly reworked the photo data recognition/conversion routines to have some additional base64 encoding checks and to also check for the ['value'] key in the photo_data array or otherwise assume this might be an URL to point at a specific image. This refs jens-maus#24.
  yet an other spechial char: "ø"
  reworked routines constructing the phonebook names depending on the 'fullname_format' user setting. Now it should be more consistnt and generate valid names even for vcards not following a standard set.
  cleaned up processing output to look a bit nicer and also fixed $vcard_obj->n[0] warning not being set.
  cleanup: adapted code to common coding style rules (please use same coding styling in future!)
  cleanup: replaced all tabs by spaces (no tabs please, they are evil!)
  removed all the "init-images" stuff as it is not required anymore.
  improve vcard phone conversion
  upload image if nessesary only
  fix VIP handling
  fix minor typo
  Addresses jens-maus#15. Chaning given IP to hostname to avoid Fritzbox to assume remote access
  ...
  • Loading branch information
holzhannes committed May 13, 2016
2 parents 60b7301 + e03ace2 commit 19e869d
Show file tree
Hide file tree
Showing 1,003 changed files with 624 additions and 370 deletions.
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# CardDAV contacts import for AVM FRITZ!Box

[![Build Status](https://scrutinizer-ci.com/g/jens-maus/carddav2fb/badges/build.png?b=master)](https://scrutinizer-ci.com/g/jens-maus/carddav2fb/build-status/master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/jens-maus/carddav2fb/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/jens-maus/carddav2fb/?branch=master)

Features:

* Allows to import CardDAV-based VCard contacts (e.g. from 'owncloud') to a phonebook in a AVM FRITZ!Box
Expand All @@ -12,17 +14,20 @@ Features:

## Information

This version of carddav2fb is a forked version from jens-maus (https://github.com/jens-maus/carddav2fb.git) 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.
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 is required.
* PHP-version 5.3.6 or higher
* PHP-curl module
* PHP-ftp module
* PHP-mbstring module

## Installation

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

git clone https://github.com/holzhannes/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 All @@ -33,15 +38,14 @@ Now you should have everything setup and checked out to a 'carddav2fb' directory
* `Access to NAS content` (required to upload photos via ftp).
3. Make sure the telephone book you are going to update via carddav2fb exists on the FRITZ!Box, otherwise the upload will fail.
4. Copy `config.example.php` to `config.php` and adapt it to your needs including setting the FRITZ!Box user settings.
5. Copy as many `initializing images` from the folder `init-images` to your FRITZ!Box `fonpix` folder.

## Usage

### Ubuntu

1. Install PHP5, PHP-curl and PHP-ftp module:
1. Install PHP, PHP-curl, PHP-ftp and PHP-mbstring module:

sudo apt-get install php5-cli php5-curl php5-ftp
sudo apt-get install php-cli php-curl php-ftp php-mbstring

2. Open a Terminal and execute:

Expand All @@ -60,6 +64,7 @@ Now you should have everything setup and checked out to a 'carddav2fb' directory
$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'
Expand Down Expand Up @@ -92,4 +97,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-2015 Karl Glatz, Martin Rost, Jens Maus
Copyright (c) 2012-2016 Karl Glatz, Martin Rost, Jens Maus, Johannes Freiburger
Loading

0 comments on commit 19e869d

Please sign in to comment.