It is currently April 27th, 2024, 7:24 pm

Enigma Google Calendar Patch

A package of skins with a "theme" or by a single author
ss4max
Posts: 2
Joined: June 12th, 2023, 4:18 am

Re: Enigma Google Calendar Patch

Post by ss4max »

After doing all things up to
shoek wrote: June 11th, 2023, 11:20 pm Thanks to @helder065 and his updated Reader.lua code, I was able to get this working.
However, I had to modify his new code with the following at line 107

Code: Select all

 if (Item.Title and string.len(Item.Title) == 1) then
 Item.Title = RawItem:match('DESCRIPTION:(.-)\n') or nil
 elseif (Item.Title) then
 Item.Title = Item.Title:gsub('\\', '')
 end
I also had to remove the query params from ReaderURL1 as noted in a previous post

Finally, not sure if it is necessary, but I update my INI's WebParserSubstitute to what was noted in a previous post

Thank you to everyone helping to keep this skin alive!
Only some of my yearly events show up and none of my weekly/single events show up. All events are untitled.
Image
helder065
Posts: 18
Joined: June 7th, 2023, 2:20 pm
Location: France

Re: Enigma Google Calendar Patch

Post by helder065 »

ss4max wrote: June 12th, 2023, 4:44 am After doing all things up to


Only some of my yearly events show up and none of my weekly/single events show up. All events are untitled.
Image
Hi @ss4max,
maybe you remove the previous line : Item.Title = RawItem:match('SUMMARY:(.-)\r\n') or nil

Code: Select all

			if (t == 'iCalendar') then
				Item.Title  = RawItem:match('SUMMARY:(.-)\r\n') or nil
				if (Item.Title and string.len(Item.Title) == 1) then
					Item.Title = RawItem:match('DESCRIPTION:(.-)\r\n') or nil
				elseif (Item.Title) then
					Item.Title = Item.Title:gsub('\\', '')
				end
			else
				Item.Title  = RawItem:match('<title.->(.-)</title>') or nil
			end
helder065
Posts: 18
Joined: June 7th, 2023, 2:20 pm
Location: France

Re: Enigma Google Calendar Patch

Post by helder065 »

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
You do not have the required permissions to view the files attached to this post.
emirena
Posts: 3
Joined: June 17th, 2023, 5:06 pm

Re: Enigma Google Calendar Patch

Post by emirena »

hi - i just had this issue occur and updated my reader.lua with what @helder065 shared.

However I had tinkered with both my reader gcal.ini and enigma separate gcalendar.ini - which skin does this .lua fix? Can someone provide a clean/fixed version of the appropriate .ini file?

Neither skin is funcitoning, both still say invalid feed format.

Also, the new .ics format frrom google is "basic.ics" not "full.ics" - is this OK? I had already been using the .ics link and then this month the function broke.
helder065
Posts: 18
Joined: June 7th, 2023, 2:20 pm
Location: France

Re: Enigma Google Calendar Patch

Post by helder065 »

Hi emirena,

the reader.lua is for the enigma separate gcalendar.ini
i didn't try it with the suite

go to first post :https://forum.rainmeter.net/viewtopic.php?t=27623#p143476
I'm using GoogleCalendar_1.2018.01.09.rmskin

if you got invalid feed format from your googleagenda \..... \basic.ics
basic.ics must be your secret adress
check this previous post https://forum.rainmeter.net/viewtopic.php?t=27623&start=70#p215583

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.



regards,
helder065
emirena
Posts: 3
Joined: June 17th, 2023, 5:06 pm

Re: Enigma Google Calendar Patch

Post by emirena »

helder065 wrote: June 17th, 2023, 5:45 pm Hi emirena,

the reader.lua is for the enigma separate gcalendar.ini
i didn't try it with the suite

go to first post :https://forum.rainmeter.net/viewtopic.php?t=27623#p143476
I'm using GoogleCalendar_1.2018.01.09.rmskin

if you got invalid feed format from your googleagenda \..... \basic.ics
basic.ics must be your secret adress
check this previous post https://forum.rainmeter.net/viewtopic.php?t=27623&start=70#p215583

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.



regards,
helder065
Thanks! I just downloaded the googlecalendar .rmskin patch from linked post and ran it. My GCalendar.ini current and back up already have edits. Can you please share a clean, or fixed version of the gcalendar.ini? I assume running the .rmskin patch should have updated all the other files that need be edited?

mine is still not working - .ini contents:

Code: Select all

[Variables]
;-----------------------
; FEEDS

; GoogleCalendar1=https://calendar.google.com/calendar/ical/.../full.ics
GoogleCalendar1=https://calendar.google.com/calendar/ical/emmatlangdon%40gmail.com/private-97febd1964bb75770c42f913a14bdbff/basic.ics
;GoogleCalendar2=https://calendar.google.com/calendar/ical/ht3jlfaac5lfd6263ulfh4tql8%40group.calendar.google.com/public/full.ics
;GoogleCalendar3=https://calendar.google.com/calendar/ical/
the enigma @resources reader.lua should be altered, or kept untouched? I assume untouched and this folder is for the suite, not the GCalendar skin we're trying to fix?
helder065
Posts: 18
Joined: June 7th, 2023, 2:20 pm
Location: France

Re: Enigma Google Calendar Patch

Post by helder065 »

emirena wrote: June 17th, 2023, 5:56 pm Thanks! I just downloaded the googlecalendar .rmskin patch from linked post and ran it. My GCalendar.ini current and back up already have edits. Can you please share a clean, or fixed version of the gcalendar.ini? I assume running the .rmskin patch should have updated all the other files that need be edited?

mine is still not working - .ini contents:

Code: Select all

[Variables]
;-----------------------
; FEEDS

; GoogleCalendar1=https://calendar.google.com/calendar/ical/.../full.ics
GoogleCalendar1=https://calendar.google.com/calendar/ical/emmatlangdon%40gmail.com/private-97febd1964bb75770c42f913a14bdbff/basic.ics
;GoogleCalendar2=https://calendar.google.com/calendar/ical/ht3jlfaac5lfd6263ulfh4tql8%40group.calendar.google.com/public/full.ics
;GoogleCalendar3=https://calendar.google.com/calendar/ical/
the enigma @resources reader.lua should be altered, or kept untouched? I assume untouched and this folder is for the suite, not the GCalendar skin we're trying to fix?
the reader.lua file must be replaced with the last written (2023-06-17)

With no offense i used your address into my skin
Image
Image
it's working perfectly

Check if you removed from GCalendar.ini in ReaderURL1 ...... (?futureevents=true&singleevents=true&orderby=starttime&sortorder=a)

Code: Select all

GoogleCalendarWriteEvents=1
CurrentFeed=0

; 1~3 tabs
NumberOfTabs=3
; 1~8 items
NumOfItems=8
ReaderURL1=#GoogleCalendar1#
;?futureevents=true&singleevents=true&orderby=starttime&sortorder=a                        <----- removed set as comment in new line
ReaderURL2=#GoogleCalendar2#
;?futureevents=true&singleevents=true&orderby=starttime&sortorder=a                        <----- removed set as comment in new line
ReaderURL3=#GoogleCalendar3#?futureevents=true&singleevents=true&orderby=starttime&sortorder=a
ReaderUpdateRate=3000
ReaderWriteEvents=#GoogleCalendarWriteEvents#
ReaderEventFile=#@#User\Calendars\GoogleCalendar1.xml|#@#User\Calendars\GoogleCalendar2.xml|#@#User\Calendars\GoogleCalendar3.xml
helder065
Posts: 18
Joined: June 7th, 2023, 2:20 pm
Location: France

Re: Enigma Google Calendar Patch

Post by helder065 »

Hi again emirena;
I just create a package with your address
GoogleCalendar_2023-06-17.rmskin
Regards,
helder065
You do not have the required permissions to view the files attached to this post.
emirena
Posts: 3
Joined: June 17th, 2023, 5:06 pm

Re: Enigma Google Calendar Patch

Post by emirena »

helder065 wrote: June 17th, 2023, 6:38 pm Hi again emirena;
I just create a package with your address

GoogleCalendar_2023-06-17.rmskin

Regards,
helder065
Thank you SO MUCH for your time and generosity in doing this! It worked perfectly. I also needed to update rainmeter :) Merci beaucoup!!
helder065
Posts: 18
Joined: June 7th, 2023, 2:20 pm
Location: France

Re: Enigma Google Calendar Patch

Post by helder065 »

emirena wrote: June 18th, 2023, 3:52 am Thank you SO MUCH for your time and generosity in doing this! It worked perfectly. I also needed to update rainmeter :) Merci beaucoup!!
Thank you for your comment emirena,

just a remind, for your privacy to :
- reinitialize your googleagenda secret adress iCal in your google agenda settings
Image

- and then set your new secret iCal adress after reinitialization in GCalendar.ini at line GoogleCalendar1=.....

Regards,

helder065