It is currently March 29th, 2024, 1:29 pm

Enigma Google Calendar Patch

A package of skins with a "theme" or by a single author
Ruff_hi
Posts: 19
Joined: August 21st, 2018, 1:30 pm

Re: Enigma Google Calendar Patch

Post by Ruff_hi »

Thanks for this! I have been looking for a while ... took a break and tried to write my own. Got nowhere, really really fast.

Anyway ... I would prefer to have my calendar looking like ...

Code: Select all

Wed Oct 7th
   1pm  Lunch

Thu Oct 8th
   7pm  Dinner
I managed to swap the date (when) and item (what) around but still haven't separated the date and time. I am assuming that it is in the 'Reader.lua' file (somewhere) ... but I couldn't locate the code after a quick look.

Can you point me to what I need to mod?

That said ... what I have works. Now I just need to remember to put the key items into my calendar!
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Enigma Google Calendar Patch

Post by CodeCode »

You might look for the keyword 'timestamp' that determines the format of the time and/or date. In the Reader.lua script file.

Depending where you change it will affect what you see in the skin output.

Sorry cant be more specific, i am also figuring things out from scratch knowhow.

The Title is fixed so that is best place for putting in the actual time of day manually.
The date can also be changed but that will be in the 'timestamp' part/s.

Mine currently looks like this:
Capture.JPG
You do not have the required permissions to view the files attached to this post.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
Ruff_hi
Posts: 19
Joined: August 21st, 2018, 1:30 pm

Re: Enigma Google Calendar Patch

Post by Ruff_hi »

Thx. I was able to shave the hh:mm am/pm off the date. No luck adding the time to the title.

I can add the time in the appointment title in google cal ... but that is inelegant. I will do that as a stop gap and see if I can get lau to push the time as well as the title.
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Enigma Google Calendar Patch

Post by CodeCode »

Ruff_hi wrote: October 6th, 2020, 1:34 am Thx. I was able to shave the hh:mm am/pm off the date. No luck adding the time to the title.

I can add the time in the appointment title in google cal ... but that is inelegant. I will do that as a stop gap and see if I can get lau to push the time as well as the title.
Pls, let me know if you get that figured out.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
Ruff_hi
Posts: 19
Joined: August 21st, 2018, 1:30 pm

Re: Enigma Google Calendar Patch

Post by Ruff_hi »

How do you get birthday's to appear? Google lifts birthdays from your contacts ... and throws them on your calendar. You do have the option to show / not show the birthdays ... but they won't appear in the Rainmeter version. Are they a different feed?
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Enigma Google Calendar Patch

Post by CodeCode »

If you mean personal bdays then there is no feed. If it is famous bdays then it gets too complicated for me.

In the case of personal bdays you have to edit them one by one in google then save them again for them to show up in your ical skin.

Obviously they only occur once a year, so hypothetically they'll remain until they pass then you'd have to reenter them a resave them again.

That seems to be the level the RM ical is able to handle since it has not been updated in some 2-odd years.

Then as the last step, refresh the RM ical. After that they should appear and remain. If not then I am at a loss since I have no working knowledge of lua or using lua to capture specific data from internet ical. (yet someday this may actually change. lol)
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
Ruff_hi
Posts: 19
Joined: August 21st, 2018, 1:30 pm

Re: Enigma Google Calendar Patch

Post by Ruff_hi »

Played around with it a little bit more. I was able to add another element to the item array in the lua file ...

Code: Select all

table.insert(Feeds, {
			Measure     = SKIN:GetMeasure(MeasureName),
			MeasureName = MeasureName,
			Raw         = nil,
			Type        = nil,
			Title       = nil,
			Time        = nil,
			Link        = nil,
			Error       = nil
			})
I added Time and I set it to my initials in the locations where the title was set.

Then in the ini file, I added ...

Code: Select all

[ItemWhat1]
Meter=STRING
Group=FeedData
#MeterStyle=StyleReaderText | StyleReaderTextSubheading | StyleReaderTextFirst
MeterStyle=StyleReaderText | StyleReaderTextSubheading
Text=#Item1Time# #Item1Title#
... the 'time' to the front of the title (ie the description of the appointment) and ... it displayed.

Now I just have to figure out how to populate my Time variable with the real starting time of the appointment :).

Looking at it as I write this up, there is no DATE in the feeds array. It 'magically' appears in the Item collection (is that the right word).

All of the date formatting is down in one function [function IdentifyDate(s, t)] in the lau file ... I will also ask it to return the time. Maybe tomorrow. Maybe this weekend.
Ruff_hi
Posts: 19
Joined: August 21st, 2018, 1:30 pm

Re: Enigma Google Calendar Patch

Post by Ruff_hi »

Success. I made some adjustments based on my above musings and was able to extract the time of the appointment from the date (naturally!) and drop it in the displayed calendar.

Here is how my google calendar currently looks.
Screenshot 2020-10-16 073858.JPG
If I have two appointments on the same day, it will repeat the date. I can live with that ... but I would prefer it to list them under the same date.

I will tidy up my code, run a compare against the original and post it here later. Maybe today, probably over the weekend.
You do not have the required permissions to view the files attached to this post.
Ruff_hi
Posts: 19
Joined: August 21st, 2018, 1:30 pm

Re: Enigma Google Calendar Patch

Post by Ruff_hi »

Here you go ... here is the code that I am using.

I changed a few items from the original (background) but nothing here is really mine.
You do not have the required permissions to view the files attached to this post.
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Enigma Google Calendar Patch

Post by CodeCode »

Ruff_hi wrote: October 17th, 2020, 3:46 pm Here you go ... here is the code that I am using.

I changed a few items from the original (background) but nothing here is really mine.
Thanks for these changes! Nice addition to this calendar feed reader. :thumbup:
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.