Re: What means "a:0:{}"

Ralf Lang <[email protected]> Fri, 5 Apr 2019 08:26:06 +0200
Newsgroups gmane.comp.horde.kronolith
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------DA7AEC8859148A06B9B141DA
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Hi Ferdinand,

Am 04.04.19 um 22:09 schrieb Ferdinand Gruber:
> Am 04.04.19 um 08:00 schrieb Ralf Lang:
>> Let's do an exercise.
>> We will need the external API of kronolith, especially
>>
>> put() https://github.com/horde/kronolith/blob/master/lib/Api.php#L263
>> browser() https://github.com/horde/kronolith/blob/master/lib/Api.php#L58
> The file kronolith/lib/Api.php already exists in my Horde directory.
> Why should I download it ???

I referenced the relevant lines with the method signatures and the
documentation comments. I did not mean you should download that file.


>> Create a new file kronolith/bin/events and make it executable (+x) - you
>> could also use the horde admin php shell and select context Kronolith
>>
>> First some boilerplate
>>
>> #!/usr/bin/env
>> php
>>
>> <?php
>>
>> $baseDir = __DIR__ . '/../';
>> require_once $baseDir . 'lib/Application.php';
>> Horde_Registry::appInit('kronolith', array('cli' => true));
>>
>> This initializes kronolith as admin.
>>
>> Now let's begin browsing.
>>
>> // authorize as lang (replace with your name)
>>
>> $registry->setAuth('lang', array(), array());
>>
>> // Dive into the calendar path step by step (app, owner, calendar)
>>
>> print_r($registry->call('calendar/browse', array()));
>>
>> // This gives you the available calendars both as a dir of individual
>> event files and as an ics file of all events
>>
>> print_r($registry->call('calendar/browse', array('kronolith/lang')));
>>
>> // dive into one of these
>>
>> print_r($registry->call('calendar/browse',
>> array('kronolith/lang/KI14jYtCMpbet4ecYzAg1bn.ics')));
>> print_r($registry->call('calendar/browse',
>> array('kronolith/lang/KI14jYtCMpbet4ecYzAg1bn')));
>
> I created the file kronolith/bin/events as you described above.
> Then I run:
>
> php ./events
>
> and I get the output - some arrays and the events in ICS format.
>
> But on the last line, I get an error message - i commented it out.
>
I reproduced that. Seems the old webdav API is broken for this use case.
I will look into this later.


> print_r($registry->call('calendar/browse',array('kronolith/ferdinand/gO9NqonqPBun1TwWNl148w1.ics')));
>
> //
> print_r($registry->call('calendar/browse',array('kronolith/ferdinand/gO9NqonqPBun1TwWNl148w1')));
>

>> Now you know how to use the api and you see examples of event
>> description structure.
> Unfortunately I don't know anything how to use the API. In this case I
> am an absolute beginner.
> Please help.
>
> I don't know how to use the API in my project.
>
> I don't understand, how to use an API.
>
OK, give me some time. I will come up with a tested end user solution,
but it will take some time - other work has priority.

Can you please tell me in what format you have the events which you want
to feed into kronolith?

(csv, ics, ...)

For ical format there is already a script you can use:

https://github.com/horde/kronolith/blob/master/bin/kronolith-import-icals


Regards


Ralf




--------------DA7AEC8859148A06B9B141DA
Content-Type: application/pgp-keys;
 name="pEpkey.asc"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="pEpkey.asc"

-----BEGIN PGP PUBLIC KEY BLOCK-----

mQENBFvSz9ABCAC/D3VOv9UiDxS9rLwc2SYOKj7kg5ERpKULorWII7QcIc8PC5xt
OlxRxI8sg15y8JvtrPo8FJG9RfDiwbqrRSL4nzlIui960c/SM9ayaXR9Q8YPRV93
PVZH94tdMdnO65tsMYmuwMtrN6DOokyT9snS++NHjH7KG2SnGu6lsonLF+Q1oxY4
c+yHZpRcHekTIKU1kuBGq5z/2WvdKq+mmpXOyZMDUDcjta0SsZTWCjbEhvDR69ks
+HleY2okRL+7oIjjwxscikGEU/w60AMl7K+js1sVCImaU/iknNw6zooOqttIQ2D5
TgvMSOhb2J9M4adUWWIjvu34rjzkA29fBJ/ZABEBAAG0HlJhbGYgTGFuZyA8bGFu
Z0BiMS1zeXN0ZW1zLmRlPokBVAQTAQgAPhYhBDyjTDPbiozTL6xj+U/BHU5Zc3Iw
BQJb0s/RAhsDBQkB4TOABQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEE/BHU5Z
c3IwGQUH/ity/TiyE0hPR40lAVxRp6DSmiMXj4N1ZNxKpvkZpvrJGFA8N0qmxQlj
uaVb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YU1OhSovkVtNFSn5+lOMiBwtTA==
=oyfV
-----END PGP PUBLIC KEY BLOCK-----

--------------DA7AEC8859148A06B9B141DA
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-- 
kronolith mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]

--------------DA7AEC8859148A06B9B141DA--