UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Contacts CardDav - automatic setup and sync through this script

    Scheduled Pinned Locked Moved General
    18 Posts 6 Posters 1.8k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • R Offline
        Rustic
        last edited by Rustic

        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?

        T 1 Reply Last reply Reply Quote 1
        • T Offline
          tonton_ @Rustic
          last edited by

          @Rustic did not try with radicale, is it a nextcloud/owncloud variant ?
          where did the script failed exactly ?
          do you have the console return ?

          R 1 Reply Last reply Reply Quote 0
          • R Offline
            Rustic @tonton_
            last edited by

            @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.

            T 1 Reply Last reply Reply Quote 1
            • T Offline
              tonton_ @Rustic
              last edited by

              @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

              R 1 Reply Last reply Reply Quote 0
              • R Offline
                Rustic @tonton_
                last edited by

                @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.

                T 1 Reply Last reply Reply Quote 0
                • T Offline
                  tonton_ @Rustic
                  last edited by tonton_

                  @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 🙂

                  R 1 Reply Last reply Reply Quote 1
                  • R Offline
                    Rustic @tonton_
                    last edited by Rustic

                    @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.

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      Rustic
                      last edited by

                      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.

                      T 1 Reply Last reply Reply Quote 0
                      • T Offline
                        tonton_ @Rustic
                        last edited by tonton_

                        @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 🙂

                        1 Reply Last reply Reply Quote 0
                        • L Offline
                          lsitongia @tonton_
                          last edited by

                          @tonton_ Thank you for this work.

                          LINMOB says that there are improvements to CardDAV. I wonder if they are referring to your work here?

                          https://linmob.net/weekly-update-23-2024/

                          T 1 Reply Last reply Reply Quote 1
                          • T Offline
                            tonton_ @lsitongia
                            last edited by

                            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 ! 🙂

                            1 Reply Last reply Reply Quote 0
                            • Z Offline
                              zedr0k
                              last edited by

                              Thanks a lot for that script. It worked great for me. 👍

                              1 Reply Last reply Reply Quote 1
                              • First post
                                Last post