It is currently June 22nd, 2024, 2:50 pm

Enigma Google Calendar Patch

A package of skins with a "theme" or by a single author
helder065
Posts: 18
Joined: June 7th, 2023, 2:20 pm
Location: France

Re: Enigma Google Calendar Patch

Post by helder065 »

Hi,

just added some minor improvement from last reader.lua (2023-06-17) version to continue showing RSS feeds and sort event latest news on top for RSS feeds.
and fix a bug on monthly event.

New version reader.lua 2023-06-18 attached to post
Reader.zip


helder065
You do not have the required permissions to view the files attached to this post.
shoek
Posts: 32
Joined: March 10th, 2017, 1:47 am

Re: Enigma Google Calendar Patch

Post by shoek »

helder065 wrote: June 18th, 2023, 3:49 pm Hi,

just added some minor improvement from last reader.lua (2023-06-17) version to continue showing RSS feeds and sort event latest news on top for RSS feeds.
and fix a bug on monthly event.

New version reader.lua 2023-06-18 attached to post
Reader.zip



helder065
This is great helder065! Thank you for your work on this!

Can you tell me if it supports a weekly event that occurs on certain weekdays, such as Mon, Wed, Fri?
RRULE:FREQ=WEEKLY;WKST=MO;COUNT=1;BYDAY=MO,WE,FR

Thanks,
-Steve
helder065
Posts: 18
Joined: June 7th, 2023, 2:20 pm
Location: France

Re: Enigma Google Calendar Patch

Post by helder065 »

shoek wrote: June 18th, 2023, 11:13 pm This is great helder065! Thank you for your work on this!

Can you tell me if it supports a weekly event that occurs on certain weekdays, such as Mon, Wed, Fri?
RRULE:FREQ=WEEKLY;WKST=MO;COUNT=1;BYDAY=MO,WE,FR

Thanks,
-Steve
Hi Steve,
by default value of WKST is MO as define in RFC 5545 https://datatracker.ietf.org/doc/html/rfc5545
the WKST is not implemented into reader.lua script ; maybe for a future update
in weekly for multiple BYDAY=MO,WE,FR ; Only the next event ready to start is displayed. When the event starts (after ReaderUpdateRate value in second in GCalendar.ini) it displays the second event and so on.

If you need to have the 3 days events displayed you have to split into 3 differents events.

Regards,

helder065
ss4max
Posts: 2
Joined: June 12th, 2023, 4:18 am

Re: Enigma Google Calendar Patch

Post by ss4max »

helder065 wrote: June 17th, 2023, 1:02 pm Hi all,

major update on the reader.lua code to be more efficient with RRULE arguments without needing to convert repeated events into single events like mentionned in previous post.

update 2023-06-17 Reader-2023-06-17.zip

UPDATES
-Added RRULES : DAILY, WEEKLY, MONTHLY, YEARLY,
-Added 2 DEBUG option for identify more easily where code is bugged (option are set to false by default to avoid long rainmeter logs)
-- FORDEBUG option is more the compute event is the main debugging logs
-- ADVDEBUG option is more the input feed debugging (for rare case)

-- TODO : ADD BYMONTHDAY function
-- TODO : ADD BYYEARDAY function
-- TODO : ADD EXDATE function

-Limitation
-- CASE MONTHLY BYDAY : only first arg is computed
-- FREQ=HOURLY, MINUTELY, or SECONDLY are not computed.

-Atom and RSS are not modified from original code

-------
Things to do manually :
Edit the file reader.lua and config your timestamp format return from Output() -> Goto line 384 to 389
comment with -- or uncomment remove -- at line beginning

Code: Select all

	--CONFIG------- HERE SET YOUR LOCAL TIMESTAMP EXPORT TO GCALENDAR skin--------------
	-- remove '--' or define your personal Timestamp
	--local Timestamp = SELF:GetOption('Timestamp', '%I:%M %p %A %B %d')		--08:00 PM Monday June 05
	--local Timestamp = SELF:GetOption('Timestamp', '%H:%M %a %d %b')		--20:00 Mon 05 Jun
	--local Timestamp = SELF:GetOption('Timestamp', '%Y %H:%M %a %d %b')		--2023 20:00 Mon 05 Jun 
	--local Timestamp = SELF:GetOption('Timestamp', '%y %H:%M %a %d %b')		--23 20:00 Mon 05 Jun
	local Timestamp = SELF:GetOption('Timestamp', '%H:%M %a %d %b')			--20:00 Mon 05 Jun	<-- I use this one
	--print("debug 368 ! Ouput () ! check timestamp", Timestamp)
	
	------Reminder lua tags for personal timestamp--------
--[[ 	
		%a	abbreviated weekday name (e.g., Wed)
		%A	full weekday name (e.g., Wednesday)
		%b	abbreviated month name (e.g., Sep)
		%B	full month name (e.g., September)
		%c	date and time (e.g., 09/16/98 23:48:10)
		%d	day of the month (16) [01-31]
		%H	hour, using a 24-hour clock (23) [00-23]
		%I	hour, using a 12-hour clock (11) [01-12]
		%M	minute (48) [00-59]
		%m	month (09) [01-12]
		%p	either "am" or "pm" (pm)
		%S	second (10) [00-61]
		%w	weekday (3) [0-6 = Sunday-Saturday]
		%x	date (e.g., 09/16/98)
		%X	time (e.g., 23:48:10)
		%Y	full year (1998)
		%y	two-digit year (98) [00-99]
		%%	the character `%´	
	 ]]
	-------------------------------------------------
Thanks @kaelri & @eclectic-tech for this skin and all users that comment and allow debug and upgrade the reader.lua in this forum.

Regards,

helder065
This fixed everything for me. Thank you so much!
helder065
Posts: 18
Joined: June 7th, 2023, 2:20 pm
Location: France

Re: Enigma Google Calendar Patch

Post by helder065 »

Hi,

minor update on reader.lua
-fixed monthly returning nextmonth = (month-1)
-fixed exit loop statements

Replace your Reader.lua in YOUR_PATH\Rainmeter\Skins\GoogleCalendar\@Resources\Measures

Reader-20230621.zip
helder065
You do not have the required permissions to view the files attached to this post.
markpud
Posts: 9
Joined: December 11th, 2017, 6:35 pm

Re: Enigma Google Calendar Patch

Post by markpud »

Hi.. I have been using this skin for a long time and it's great, thank you.
In recent weeks a couple of shared calendars I was using have stopped loading, instead I just see "Invalid feed format. Could not identify a valid feed format".

The ICS files look OK if I open them, and another calendar I have is working perfectly. So possibly Google changed something with the accessibility of shared calendars?

One of the non-working link is: https://calendar.google.com/calendar/ical/m50fs4d4pi7vnj8bothdr0m4euusksgp%40import.calendar.google.com/public/basic.ics

Rainmeter is updated with 4.5.17.3700 (64-bit)
I've now updated to the latest reader.lua too.

Appreciate any help you can offer
helder065
Posts: 18
Joined: June 7th, 2023, 2:20 pm
Location: France

Re: Enigma Google Calendar Patch

Post by helder065 »

markpud wrote: June 25th, 2023, 11:06 am Hi.. I have been using this skin for a long time and it's great, thank you.
In recent weeks a couple of shared calendars I was using have stopped loading, instead I just see "Invalid feed format. Could not identify a valid feed format".

The ICS files look OK if I open them, and another calendar I have is working perfectly. So possibly Google changed something with the accessibility of shared calendars?

One of the non-working link is: https://calendar.google.com/calendar/ical/m50fs4d4pi7vnj8bothdr0m4euusksgp%40import.calendar.google.com/public/basic.ics

Rainmeter is updated with 4.5.17.3700 (64-bit)
I've now updated to the latest reader.lua too.

Appreciate any help you can offer
I markpud, solution was given in previous post you should just set correctly ReaderURLs in GCalendar.ini file
helder065 wrote: June 7th, 2023, 2:42 pm Hi,
Since few days, i got "Invalid Feed Format" from only my google calendars (tab1 and 2).
google returning an error 500 html page.

It seems that the readerURL configured in Gcalendar.ini is the cause of the problem
I'm sharing my solution

Mycalendars config

Code: Select all

GoogleCalendar1=https://calendar.google.com/calendar/ical/myID%40gmail.com/private-keynumber/basic.ics
GoogleCalendar2=https://calendar.google.com/calendar/ical/mysubID%40group.calendar.google.com/private-keynumber/basic.ics
GoogleCalendar3=https://fr.ftp.opendatasoft.com/openscol/fr-en-calendrier-scolaire/Zone-C.ics
I just remove the request part (?futureevents=true&singleevents=true&orderby=starttime&sortorder=a) in GCalendar.ini for the two google calendar
ReaderURL1 and ReaderURL2 like this

Code: Select all

ReaderURL1=#GoogleCalendar1#
ReaderURL2=#GoogleCalendar2#
ReaderURL3=#GoogleCalendar3#?futureevents=true&singleevents=true&orderby=starttime&sortorder=a
Now the 3 tabs works fine.

Cordially
i just set your Agenda URL and is working fine
Image

Regards,
helder065
markpud
Posts: 9
Joined: December 11th, 2017, 6:35 pm

Re: Enigma Google Calendar Patch

Post by markpud »

helder065 wrote: June 25th, 2023, 11:43 am I markpud, solution was given in previous post you should just set correctly ReaderURLs in GCalendar.ini file


i just set your Agenda URL and is working fine
Image

Regards,
helder065
Hey, thanks very much.. Apologies I didn't read back far enough to see this. All working nicely again :)
Spaldo
Posts: 4
Joined: January 16th, 2023, 11:56 am

Re: Enigma Google Calendar Patch

Post by Spaldo »

I just wanted to jump on and say thanks for the updated reader as well as the solution posted for the invalid feed format. This has my calendar going again. For anyone reading this, the first time it look a little while to process then it is good :)
dblevins
Posts: 2
Joined: February 5th, 2016, 1:45 am

Re: Enigma Google Calendar Patch

Post by dblevins »

I just thought replacing my ATnotes with my Google calendar as a Rainmeter widget but this string is too long for me to follow (as I don't write for Rainmeter). Can anyone just post the link to aRainmeter widget for the Google Calendar that doesn't need "fixing" .
Thanks.