The most active fork AFAIK is this one: https://github.com/andig/carddav2fb (with PHP8 support).
Features:
CAUTION: This script will overwrite your current contacts in the FritzBox without any warning!
Checkout the carddav2fb sources including its related subprojects using the following command:
git clone https://github.com/carlos22/carddav2fb.git
Now you should have everything setup and checked out to a 'carddav2fb' directory.
System -> FRITZ!Box-Users -> Login via Username+Password
in your FRITZ!Box activated.System -> FRITZ!Box-Users
for which the following access rights have been granted:
FRITZ!Box settings
(required to upload telephone book data)Access to NAS content
(required to upload photos via ftp).config.example.php
to config.php
and adapt it to your needs including setting the FRITZ!Box user settings.Install PHP, PHP-curl, PHP-ftp, PHP-mbstring and php-xml module:
sudo apt-get install php-cli php-curl php-ftp php-mbstring php-xml
Open a Terminal and execute:
php carddav2fb.php
C:\PHP
.C:\PHP\php.exe C:\path\to\carddav2fb\carddav2fb.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['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>'
);
This script is using third-party libraries for downloading VCards from CardDAV servers based on the following packages
This script is released under Public Domain.
Copyright (c) 2012-2016 Karl Glatz, Martin Rost, Jens Maus, Johannes Freiburger