[kronolith] What means "a:0:{}"

Ralf Lang lang at b1-systems.de
Fri Apr 5 06:26:06 UTC 2019


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



-------------- next part --------------
A non-text attachment was scrubbed...
Name: pEpkey.asc
Type: application/pgp-keys
Size: 1757 bytes
Desc: not available
URL: <https://lists.horde.org/archives/kronolith/attachments/20190405/9dbf8c41/attachment.bin>


More information about the kronolith mailing list