Toon app: Kalender

Forum about forum-provided applications on Toon

Moderators: marcelr, TheHogNL, Toonz

Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Kalender

Post 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",
member of the Toon Software Collective
jazzper
Starting Member
Starting Member
Posts: 2
Joined: Sat Feb 06, 2021 9:28 pm

Re: Toon app: Kalender

Post 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
Ridder
Starting Member
Starting Member
Posts: 4
Joined: Sun Mar 07, 2021 10:28 pm

Re: Toon app: Kalender

Post 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
eelcova
Starting Member
Starting Member
Posts: 1
Joined: Thu Aug 19, 2021 7:01 pm

Re: Toon app: Kalender

Post 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?
markismus
Starting Member
Starting Member
Posts: 11
Joined: Tue Oct 08, 2019 2:41 pm

Re: Toon app: Kalender OpenSourced

Post 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.
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Kalender

Post 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.
member of the Toon Software Collective
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Kalender

Post 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
member of the Toon Software Collective
markismus
Starting Member
Starting Member
Posts: 11
Joined: Tue Oct 08, 2019 2:41 pm

Re: Toon app: Kalender

Post 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";
}
markismus
Starting Member
Starting Member
Posts: 11
Joined: Tue Oct 08, 2019 2:41 pm

Re: Toon app: Kalender

Post 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.
Last edited by markismus on Tue Oct 05, 2021 8:54 pm, edited 1 time in total.
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Kalender

Post 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?
member of the Toon Software Collective
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Kalender OpenSourced

Post 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/.....
member of the Toon Software Collective
markismus
Starting Member
Starting Member
Posts: 11
Joined: Tue Oct 08, 2019 2:41 pm

Re: Toon app: Kalender OpenSourced

Post 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!
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Kalender

Post 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
member of the Toon Software Collective
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Kalender

Post 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
member of the Toon Software Collective
gert848
Starting Member
Starting Member
Posts: 9
Joined: Sun Mar 22, 2020 7:12 pm

Re: Toon app: Kalender

Post by gert848 »

Thanks Toonz,

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


Greats Gert :)
Post Reply

Return to “Toon Apps”