scripting/fasting the add of remote agenda?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

scripting/fasting the add of remote agenda?

Gnome Evolution - General mailing list
hello people,

I work at Renater (the french Research and Education Network) and
we start to promote lightweight alternatives to our online
services. I don't think Gnome can be seen as "lightweight" but
evolution is by far the best graphical MUA/caldav client i ever
seen. I still use mutt which is much more powerful to me so i'm sorry
about the newbie mood of the questions i'll probably ask.

also: we use debian stable as reference (because it's stable and simple
for endusers) so i'm not on the last version of evolution. however
i can probably try to build from git if there is some needs to test
recent features.

now my first question: let's say i want to visualize the remote agendas
of my colleages in evolution: AFAIS, i have to configure dozens of those
one by one, i can't even use one of them as a template for the next one.

* is it true?
* is there a way to create a plugin or an external program to quickly
  add some new calendars by querying an ldap server, for exemple?

regards
marc
_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: scripting/fasting the add of remote agenda?

Gnome Evolution - General mailing list
On Thu, 2020-09-17 at 12:16 +0200, Marc Chantreux via evolution-list
wrote:
> also: we use debian stable as reference (because it's stable and
> simple for endusers) so i'm not on the last version of evolution.

        Hi,
it would be good to know the Evolution version, as I've absolutely no
idea what the version is from the above. It's important, things could
change meanwhile.

> now my first question: let's say i want to visualize the remote
> agendas of my colleages in evolution:

If you mean 'visualize' like 'add a (shared?) calendar', then ...

> AFAIS, i have to configure dozens of those one by one, i can't even
> use one of them as a template for the next one.
>
> * is it true?

... depending on your version, yes or no. When you
File->New->Collection Account and fill your WebDAV (CalDAV+CardDAV)
credentials (and eventually also server address (can be with path)),
then it'll auto-add all available books/calendars/memo/task lists
configured for that user.

> * is there a way to create a plugin or an external program to quickly
>   add some new calendars by querying an ldap server, for exemple?

Depending on your version, evolution-data-server allows getting .source
templates from a shared directory and adds them to the user list of
configured calendars/books/... depending what the .source defines.
There is:

   $ gsettings get org.gnome.evolution-data-server autoconfig-directory

which had been added as part of
https://bugzilla.gnome.org/show_bug.cgi?id=775640
which is related to
https://bugzilla.gnome.org/show_bug.cgi?id=773156
and one other in the chain of bugs.

Even there was planned to write some documentation for this (as an
extract of the bug comments), it never happened, unfortunately. Check
for example this thread:
https://mail.gnome.org/archives/evolution-list/2019-November/msg00096.html

You may also get some hints from the source registry when you run it
with:

   $ ESR_DEBUG=1 /usr/libexec/evolution-source-registry

(the actual path for the binary can differ in your distribution). The
changes in the definitions are read on the source registry start.

        Bye,
        Milan

_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: scripting/fasting the add of remote agenda?

Gnome Evolution - General mailing list
hello,

> it would be good to know the Evolution version
> It's important, things could change meanwhile

of course! sorry... i'm too used to talk with debian users.

    evolution 3.30.5-1.1

> > now my first question: let's say i want to visualize the remote
> > agendas of my colleages in evolution:
> If you mean 'visualize' like 'add a (shared?) calendar', then ...

not really shared as i don't need write rights.

> > use one of them as a template for the next one.
> > * is it true?

> ... depending on your version, yes or no. When you
> File->New->Collection Account and fill your WebDAV (CalDAV+CardDAV)
> credentials (and eventually also server address (can be with path)),
> then it'll auto-add all available books/calendars/memo/task lists
> configured for that user.

excellent. so i have to update to test it (File/new/ don't have the
"Collection Account" entry)

> Depending on your version, evolution-data-server allows getting .source
> templates from a shared directory and adds them to the user list of
> configured calendars/books/... depending what the .source defines.
> There is:
>    $ gsettings get org.gnome.evolution-data-server autoconfig-directory

cool. i wasn't aware about the data-server. i just uploaded the doc and
will read it.

the key is empty for the moment.

> which had been added as part of > https://bugzilla.gnome.org/show_bug.cgi?id=775640
> which is related to > https://bugzilla.gnome.org/show_bug.cgi?id=773156
> and one other in the chain of bugs.

so it should work for me.

> Even there was planned to write some documentation for this (as an
> extract of the bug comments), it never happened, unfortunately. Check
> for example this thread:
> https://mail.gnome.org/archives/evolution-list/2019-November/msg00096.html

thanks for this and all the rest of this message: it was really
informative. i'll level up on this and come back later to feed back.

regards
marc
_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: scripting/fasting the add of remote agenda?

Gnome Evolution - General mailing list
On Thu, 2020-09-17 at 15:36 +0200, Marc Chantreux wrote:
> not really shared as i don't need write rights.

        Hi,
I meant 'shared' as 'being used by multiple users', not necessarily as
'being updated by multiple users'.

> so i have to update to test it (File/new/ don't have the
> "Collection Account" entry)

I do not recall whether 3.30.5 has it, you can also try
Edit->Accounts->Add->Collection Account. The item in File->New is just
a shortcut for the same.
        Bye,
        Milan

_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: scripting/fasting the add of remote agenda?

Gnome Evolution - General mailing list
hello,

> I do not recall whether 3.30.5 has it, you can also try
> Edit->Accounts->Add->Collection Account.

there is no entry there either. I have:
    * Mail Accounts
    * Adress Books
    * Calendars
    * Memo Lists
    * Task Lists

I realize it will be easier for everyone if i have a recent version.
How hard is it to compile from sources? If it's too hard, i can
at least switch to debian testing so i can have a evolution 3.36.

regards,
marc
_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: scripting/fasting the add of remote agenda?

Gnome Evolution - General mailing list
On Thu, 2020-09-17 at 16:12 +0200, Marc Chantreux wrote:
> there is no entry there either.

        Hi,
it was added later then, it seems.

> I realize it will be easier for everyone if i have a recent version.

:)

> How hard is it to compile from sources?

Check out yourself:
https://wiki.gnome.org/Apps/Evolution/Building
https://wiki.gnome.org/Apps/Evolution/Flatpak

The later has an advantage of running in a sandbox, not breaking your
machine with new dependencies. You can also get a recent version from
Flathub.org, no need to build it on your own. Read the notes there, it
has its caveats as well. Having running autoconfig in Flatpak (without
access to real directories on the host system) is something what might
not work due to the sandboxing.
        Bye,
        Milan

_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: scripting/fasting the add of remote agenda?

Gnome Evolution - General mailing list
hello Milan,

> https://wiki.gnome.org/Apps/Evolution/Building

may I propose a version of your script which works fine with set -u ?

export PATH=$PREFIX/bin${PATH+:}${PATH:-}
export XDG_DATA_DIRS=$PREFIX/share${XDG_DATA_DIRS+:}${XDG_DATA_DIRS:-}
export LD_LIBRARY_PATH=$PREFIX/lib
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig
export GSETTINGS_SCHEMA_DIR=$PREFIX/share/glib-2.0/schemas

installed gperf, did the command below, got:

# --   Requested 'libical-glib >= 3.0.7' but version of libical-glib is 3.0.4
# CMake Error at /usr/share/cmake-3.13/Modules/FindPkgConfig.cmake:452 (message):
#   A required package was not found

<<. sed '/^ *#/d;/^ *$/d'|xargs cmake .. -G "Unix Makefiles"
-DCMAKE_INSTALL_PREFIX=$PREFIX
-DCMAKE_BUILD_TYPE=Debug
-DLIB_SUFFIX=
-DENABLE_FILE_LOCKING=fcntl
-DENABLE_DOT_LOCKING=OFF
-DENABLE_CANBERRA=OFF
-DENABLE_OAUTH2=ON
-DENABLE_GTK=ON
-DENABLE_UOA=OFF
-DENABLE_EXAMPLES=ON
-DENABLE_INTROSPECTION=OFF
-DENABLE_VALA_BINDINGS=OFF
-DENABLE_INSTALLED_TESTS=ON
-DENABLE_GTK_DOC=OFF
-DWITH_PRIVATE_DOCS=OFF
-DWITH_PHONENUMBER=OFF
-DWITH_LIBDB=OFF
-DENABLE_GOA=OFF
-DENABLE_GOOGLE=OFF
.

I need libical from sources so i'll try to get  them but
for now I run out of time. I'll try later.

> https://wiki.gnome.org/Apps/Evolution/Flatpak

there isn't flatpack on the current stable debian so I can't run your
commands AFAIK and I really like the idea to build from source: I can
hack if I dare.

regards,
marc
_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: scripting/fasting the add of remote agenda?

Gnome Evolution - General mailing list
On Thu, 2020-09-17 at 21:48 +0200, Marc Chantreux wrote:
> may I propose a version of your script which works fine with set -u ?

        Hi,
I'm sorry, I do not know what you mean.

> I need libical from sources so i'll try to get  them but
> for now I run out of time. I'll try later.

Well, the page had been written to work flawlessly some time ago, the
dependencies might change meanwhile, the same as the distro-
dependencies (sometimes, the dependency brings in its own dependencies,
which are used by the project). I might update the dependencies once
I'll get to it.

With respect of the libical itself, check the end of the page, the
second part of this Troubleshooting section:
https://wiki.gnome.org/Apps/Evolution/Building#Prepare_Evolution-Data-Server_dependencies

>
> > https://wiki.gnome.org/Apps/Evolution/Flatpak
>
> there isn't flatpack on the current stable debian

It's weird: https://flatpak.org/setup/Debian/

> so I can't run your commands AFAIK and I really like the idea to
> build from source: I can hack if I dare.

In fact, you do build from the source there as well. You can add your
patches there, it's only slightly harder (once you know how to add a
patch it's simple - Google and flatpak documentation helps in this
regard).

By the way, I prefer Reply To List (Ctrl+L in evo), instead of Reply To
All, on this list. I've no idea whether mutt has anything like that.

        Bye,
        Milan


_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: scripting/fasting the add of remote agenda?

Gnome Evolution - General mailing list
hello,

> I'm sorry, I do not know what you mean.

I'm sorry i didn't explain :)

In your script, you have

export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS

if $XDG_DATA_DIRS doesn't exist, it expands silently
to this weird trailing ':' symbol. like this.

some people (including me) don't like silent misbehavior and set their
shell to raise an error whenever a parameter is not set (set -u).

so to me your script led to:

sh: 1: PREFIX: parameter not set

the way to fix this is to set a default while expanding

    echo hello ${PLAYER:-world}

as PLAYER is unset, the default applies so the final message is

    hello world

with +, you can also release a string if a variable is *actually* set.
so

    echo ${HOME+HOME is set}
    echo ${PLAYER+PLAYER is probably not}

will print only 'HOME is set'

i was proposing to improve the script you have in your page using those
interpolations.

export XDG_DATA_DIRS=$PREFIX/share${XDG_DATA_DIRS+:}${XDG_DATA_DIRS:-}
export LD_LIBRARY_PATH=$PREFIX/lib
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig
export GSETTINGS_SCHEMA_DIR=$PREFIX/share/glib-2.0/schemas

> Well, the page had been written to work flawlessly some time ago, the
> dependencies might change meanwhile, the same as the distro-
> dependencies (sometimes, the dependency brings in its own dependencies,
> which are used by the project). I might update the dependencies once
> I'll get to it.

> With respect of the libical itself, check the end of the page, the
> second part of this Troubleshooting section:
> https://wiki.gnome.org/Apps/Evolution/Building#Prepare_Evolution-Data-Server_dependencies

i'll try to dig this way and come back to you with a complete procedure.

> > there isn't flatpack on the current stable debian
> It's weird: https://flatpak.org/setup/Debian/

argg ...flatpak instread of flatpack. my bad: i'll give a try to it.

> > so I can't run your commands AFAIK and I really like the idea to
> > build from source: I can hack if I dare.

> In fact, you do build from the source there as well. You can add your
> patches there, it's only slightly harder (once you know how to add a
> patch it's simple - Google and flatpak documentation helps in this
> regard).

> By the way, I prefer Reply To List (Ctrl+L in evo), instead of Reply To
> All, on this list. I've no idea whether mutt has anything like that.

in mutt, it's just L.

There is a decent subset of the mutt features that are available in
evolution too and not in the other graphical MUA I tried. That's why i
choose evolution for this test. it would be nice to have some
similarities in the bindings but i don't know if it's possible.

Another reason I don't use graphical MUA even if I would like is i'm
confortable with vim so the experimental feature to have an external
editor is also something i appreciate.

regards,
marc
_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: scripting/fasting the add of remote agenda?

Gnome Evolution - General mailing list
On Fri, 2020-09-18 at 12:40 +0200, Marc Chantreux via evolution-list
wrote:
> export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS
>
> if $XDG_DATA_DIRS doesn't exist, it expands silently
> to this weird trailing ':' symbol. like this.

        Hi,
thanks for the explanation. In the above sample the variable doesn't
expand to the ':', it expands to an empty string, leaving there the
trailing ':'. One might not see much difference in it, but there is.

If I'm not mistaken, then in this particular case the command change is
"cosmetic", it cannot cause any real misbehavior, because, in the worst
case, it'll pile up "empty directories" into the XDG_DATA_DIRS
variable, or, better said, up to one, because the second call of it
will reuse the previously set variable value.

I do not mind to change the steps, after all it's a Wiki page and can
be changed by anyone. It makes the line looking more complicated, but,
as you said, for good. That being said, feel free to change it.
        Thanks and bye,
        Milan

_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list