Page 17 of 19

Re: Toon app: Kalender

Posted: Sun Feb 07, 2021 2:21 pm
by Toonz
this is not an official json format, you can put it al on one row, you should not use a comma to start a new line.
you are also missing the closing quotes after the third calendar url.

example:

Code: Select all

   "DimTileExtended",
    :,
    "Yes",
must be:

Code: Select all

   "DimTileExtended":"Yes",
or if you prefer:

Code: Select all

   "DimTileExtended"
    :
    "Yes",

Re: Toon app: Kalender

Posted: Tue Feb 09, 2021 2:20 pm
by jazzper
Toonz wrote:this is not an official json format, you can put it al on one row, you should not use a comma to start a new line.
you are also missing the closing quotes after the third calendar url.

example:

Code: Select all

   "DimTileExtended",
    :,
    "Yes",
must be:

Code: Select all

   "DimTileExtended":"Yes",
or if you prefer:

Code: Select all

   "DimTileExtended"
    :
    "Yes",
Ahhh thanks for a push in the right direction!

Verstuurd vanaf mijn MI 3W met Tapatalk

Re: Toon app: Kalender

Posted: Wed Mar 10, 2021 6:31 pm
by Ridder
Just got a rooted Toon and installed the calendar app from the ToonStore.
I only have some holidays now on Toon.
Is it possible to import my own calendar without coding....just enter some url in the app???

Maybe this has been answered before....but I couldn't see the trees through the forest :D

Re: Toon app: Kalender

Posted: Thu Aug 19, 2021 7:05 pm
by eelcova
I have replaced the Holiday calendar with my personal ics-url in my userSettings.json file, but the app still shows Holiday calendar, even after reboot.
What am I doing wrong?

Re: Toon app: Kalender OpenSourced

Posted: Tue Oct 05, 2021 3:48 pm
by markismus
I finally got around to making the Toon Kalendar fully opensourced. It's now working independent of Google and iCloud and whatnot.

Steps to get it working:
1.- I've defined a local path in the app, e.g. "file:///mnt/data/tsc/myCalendarRadicale.ics".

2.- I've installed Radicale on my server and made a calendar and logged in via the webinterface to get the url to the calendar.

3.- I've made a simple script to retrieve the calendar file from a WebCal server, e.g. /root/getRadicale.sh:

Code: Select all

rm /mnt/data/tsc/myCalendarRadicale.ics; 
curl --user 'Username:Password' 'url' --anyauth > /mnt/data/tsc/myCalendarRadicale.ics
and put in the /root directory and made it executable with

Code: Select all

chmod +a /root/getRadicale.sh
4.- I've installed cron and made a 10 minute job to sync the calendar file: (crontab uses VI, so use 'i' for insert text and 'ZZ' for saving)

Code: Select all

# /root/update_rooted -o
# opkg install cron
# crontab -e
>*/10 * * * * /root/getRadicale.sh
Now I am able to make an new event on my Android Phone in the Etar app, sync it with DAVx5 and have it appear in the Toon Kalender in 10 minutes.

Another approach
I also tried to change the url in the Kalender app to include the username and password. WebDAV seems to use the format

Code: Select all

http://username/password/server:port/.....
However, it didn't work.

A lot of work
Getting everything up and running took rather a lot of work. To make it easier for others to get it running, it would be nice if you could for instance let the script execute the curl-command and follow it with a file:///... internally.

Re: Toon app: Kalender

Posted: Tue Oct 05, 2021 5:16 pm
by Toonz
Nice work, but 'too much' for the average user I think :) .

Not sure what you ask me to do by the way in the Toon app itself.
Using crontab to schedule your script is a good solution (you cannot simply run scripts from the Toon QML application).
In the app settings you can refer to your own downloaded calendar file, that is already working fine today.

Re: Toon app: Kalender

Posted: Tue Oct 05, 2021 5:18 pm
by Toonz
Hi all,

version 1.1.12 of the Kalender app is available in the ToonStore.
Changelog:
- an option has been added to the settings screen to set the refresh cycle for the calendar in minutes (min 10, default setting is 60 mins).
Calendar will be refreshed after the end of the current appointment also.

N.B. Old logic was that the calendar was refreshed every 6 hours and at the end of the active appointment (whichever is sooner).

Kind regardz,

Toonz

Re: Toon app: Kalender

Posted: Tue Oct 05, 2021 5:29 pm
by markismus
What I would like to do, but can't since I mostly program Perl nowadays, is recognize a given http-string as a curl-command. Execute that curl-command in the shell. Recognize the name of file generated or append it if it's missing and generate a file-string to read it into the Kalender app.
E.g. in Perl:

Code: Select all

if( $String=~ m~^curl~ ){ 
    if( $String =~ m~>(?<ics-filename>.+$){
        $ice-filename = $+{ics-filename};
        $command = $String;
    }
    else{
        $ics-filename = "/mnt/data/tsc/retrieved_calendar.ics";
        $command = $String . ">$ics-filename";
    }
    unlink ($ics-filename);
    `$command`;
    $String = "file:///$ics-filename";
}

Re: Toon app: Kalender

Posted: Tue Oct 05, 2021 7:46 pm
by markismus
I realize that having the shell execute a command is harder is Javascript. Apparently, the question has been raised before: execSync with the option shell.
However, I wonder whether this is implemented by Quby's version of Javascript.

Re: Toon app: Kalender

Posted: Tue Oct 05, 2021 8:43 pm
by Toonz
Isn't execSync part of Node.js? This isn't supported on Toon (too limited resources).
With the new app version above you can keep running your script with crontab and the app will pick it up within 10 minutes.
Isn't that close enough to what you want to achieve?

Re: Toon app: Kalender OpenSourced

Posted: Tue Oct 05, 2021 8:48 pm
by Toonz
markismus wrote: Another approach
I also tried to change the url in the Kalender app to include the username and password. WebDAV seems to use the format

Code: Select all

http://username/password/server:port/.....
However, it didn't work.
shouldn't this be: http://username:password@server:port/.....

Re: Toon app: Kalender OpenSourced

Posted: Tue Oct 05, 2021 9:05 pm
by markismus
Toonz wrote:
markismus wrote: Another approach
I also tried to change the url in the Kalender app to include the username and password. WebDAV seems to use the format

Code: Select all

http://username/password/server:port/.....
However, it didn't work.
shouldn't this be: http://username:password@server:port/.....
Yes! Works!

Re: Toon app: Kalender

Posted: Mon Nov 01, 2021 9:41 pm
by Toonz
Hi all,

version 1.1.14 is available in the ToonStore.
Changelog:
- long appointment titles are now truncated on the tile (to stay within the tile limits)

Kind regardz,

Toonz

Re: Toon app: Kalender

Posted: Fri Dec 31, 2021 4:48 pm
by Toonz
Hi all,

version 1.1.5 will be available in the ToonStore shortly.
Changelog:
- in the settings screen you can easily add and remove public calendars from a github repository (currently a few Formula1 calendars are added).

If you want other public calendars to be added , just drop the link to the ICS file here or send me a PM with the link.
Ideas: calendars for the Olympics or other sports games.....
I can instantly add these to the github repository (no new app release needed for this).

Kind regardz,

Toonz

Re: Toon app: Kalender

Posted: Sun Jan 02, 2022 2:10 pm
by gert848
Thanks Toonz,

Nice work when i have new calenders i let you know.


Greats Gert :)