Contacts CardDav - automatic setup and sync through this script
-
@tonton_ said in Contacts CardDav - automatic setup and sync through this script:
Just updated the github, for info here is the git readme :
A simple bash script to setup your carddav contact.
The script also have the ability to setup an auto synchronisation (hourly, daily, weekly...) and to add a sync button in your launcher.
You can use this script two ways : locally on and from your phone, or through adb (android debug tool) on your computer through a terminal.
First you have to put the script file on your phone storage.
You can do it by *connecting your phone to a computer and using the file explorer.
You can also use adb : with your phone connected to your computer (with usb debugging activated), you can use this command : adb push filepath_on_your_system destination_filepath_on_phone
Then you have to make your file executable and launch it.
If you are doing this through adb, first connect to your phone shell with this command adb shell, if you are doing this locally, ignore this last command.
Go into the folder you copied the script cd script_folder
Make it executable chmod -x ./scriptfile.
You can now run the script and follow its instructions ./scriptfileYeah checked the tutorial, it's a complete guide for a beginner group. Again, thanks for the guide.
-
Hello,
Thanks so much for this script.
I have a self-hosted radicale service to host my contacts and calendar.
I run your script and it failed.
I use this service in android with Davx5 app and works fine.
How can I make it work in ubuntu-touch? -
@Rustic did not try with radicale, is it a nextcloud/owncloud variant ?
where did the script failed exactly ?
do you have the console return ? -
@tonton_ I tried again, this time on my Lenovo Tab M10 HD, and it worked fine.
Before I tried on a RedMi Note 9 Pro and it didn't work but I cant get the console return because I went back to LineageOs 21 and on 2n mobile I have PostmarketOs gnome-mobile.
It would be nice to have the calendar synced as well.
Thanks so much. -
@Rustic
nice that it worked at least, don't hesitate to report the command output if it fails again
and concerning the calendar, i didn't implement it because it works out of the box (for me at least) with UT account system -
@tonton_ Adding radicale calendar does not work. The calendar is being added but it does not sync.
If at least it would be possible to import a .ics from within the calendar app that would be also nice. -
@Rustic don't have a lot of time for now, but you could try to use this script :
https://gist.github.com/vanyasem/379095d25ac350676fc70c42efe17c8c
after removing all contact related lines, and cron related (no more cron on focal)If this works for you tell me, i could try to include it in the script (with the auto sync and sync button features) no garanty i'll have time though, sorry !
if you make it work, something like this should launch the sync :
syncevolution --sync two-way $CONTACTS_CONFIG_NAME
with $CONTACTS_CONFIG_NAME being the input you set in the script
tell me if it works for you !Oh and radicale calendar, if caldav, should work natively, so you can also fill a bugreport for this if you have time
-
@tonton_ It worked. This is the command output:
Synchronization successful.
Changes applied during synchronization (@radicale):
+------------------|-----------------------|-----------------------|-CON-+
| | @radicale | @default | FLI |
| Source | NEW | MOD | DEL | ERR | NEW | MOD | DEL | ERR | CTS |
+------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| personalcalendar | 0 | 0 | 0 | 0 | 79 | 0 | 0 | 0 | 0 |
| refresh-from-local, 54 KB sent by client, 0 KB received |
+------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| start Wed Jun 5 19:39:48 2024, duration 0:10min |
| synchronization completed successfully |
+------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
[INFO] creating complete data backup after sync (enabled with dumpData and needed for printChanges)Synchronization successful.
Changes applied during synchronization:
+------------------|-----------------------|-----------------------|-CON-+
| | @default | @radicale | FLI |
| Source | NEW | MOD | DEL | ERR | NEW | MOD | DEL | ERR | CTS |
+------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| personalcalendar | 79 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| refresh-from-remote, 0 KB sent by client, 54 KB received |
| item(s) in database backup: 0 before sync, 79 after it |
+------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| start Wed Jun 5 19:39:46 2024, duration 0:13min |
| synchronization completed successfully |
+------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+Data modified @default during synchronization:
*** @default/personalcalendar ***
Comparison was impossible. -
I guess in order to sync this cal I'll have to erase .cache/syncevolution and then run the script again.
At least it worked.
Thanks so much. -
@Rustic
no you should just be able to run this command (didn't test it though) :syncevolution --sync two-way $CONTACTS_CONFIG_NAME
replace the $CONTACTS_CONFIG_NAME by the name you gave to your db, try it, if it works you can put this command in a desktop file (to have an icon to sync manually in your ut launcher) or a systemd timer to auto sync ! (you can take a look at what does my script for these)
line 131 to 140 for the desktop file and line 148 to 183 for the systemd timer/service files -
@tonton_ Thank you for this work.
LINMOB says that there are improvements to CardDAV. I wonder if they are referring to your work here?
-
I dont think so, my script is merely a setup helper for the existing backend ! I think they are refering to lionel s work on the new contact backend ! Take a look at last ut q&a video where he showcased it, it looks awesome !
-
Thanks a lot for that script. It worked great for me.