It is currently April 19th, 2024, 2:46 pm

Google Calendar Plugin

Share and get help with Plugins and Addons
ouiouimagicbox
Posts: 10
Joined: March 22nd, 2013, 10:46 am

Re: Google Calendar Plugin

Post by ouiouimagicbox »

NisseDILLIGAF wrote:I can't figure out how to make a condition for all day event...
should i make a Calc measure that checks [mGcal1_Start] ??
For the moment there is no way to check wether an event is all day or not. But since I'm a very new user of Rainmeter (just 1 week), maybe I missed something in the docs...

NisseDILLIGAF wrote:well, I've been trying to get my head around how the plugin works..
I know, I need to write some documentation. And the fact that the measure are made with some reflection in the code does not help... ;-)
Oui-Oui
NisseDILLIGAF
Posts: 20
Joined: May 31st, 2011, 7:15 am

Re: Google Calendar Plugin

Post by NisseDILLIGAF »

A quick workaround would be to add 'Substitute="00:00":"Allday"'
but if there is an event that starts at 00:00 then it would be an all day event..

Code: Select all

[mGcal{0}_Start]
Measure=Plugin
Plugin=GCal.dll
ParentName=mGcal
Substitute="00:00":"Allday"
I'll use this for now :)
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Google Calendar Plugin

Post by poiru »

I don't think you should generate include files in the plugin. I think you should instead consider a parent-child approach like in this example.
ouiouimagicbox
Posts: 10
Joined: March 22nd, 2013, 10:46 am

Re: Google Calendar Plugin

Post by ouiouimagicbox »

poiru wrote:I don't think you should generate include files in the plugin. I think you should instead consider a parent-child approach like in this example.
I already use the "parent - child" pattern : the parent retrieve the events once and children retrieve specific field on specific event (for exemple "the Start field on event 3"). ;-)

I generate the include files in the plugin because there is no way to make loop in skins (or I did not see it ?) and because those files are huge if you want to display 50 events (it's the same block repeated 50 times). Plus they are only generated during the "Reload" not during the "Update" (don't need to write the files on every update).

A small precision : the include files don't contain any data, they just contain simple measures and meters and you can skip this generating process (leave the "Path" parameters blank).

If you have any idea on how to do it in a simplier way, I take it. :-)
Oui-Oui
ouiouimagicbox
Posts: 10
Joined: March 22nd, 2013, 10:46 am

Re: Google Calendar Plugin

Post by ouiouimagicbox »

Hi !

I have just released a new version with support for "all day events".

The solution was to expose this property and then use some substitute to build a custom date format for all day events. Here is an example :

Code: Select all

[mGcal{0}_IsAllDayTDF]
Measure=Plugin
Plugin=GCal.dll
ParentName=mGcal
Property=IsAllDay
Substitute="1":"'all day'","0":"HH:mm"

[mGcal{0}_Start]
Measure=Plugin
Plugin=GCal.dll
ParentName=mGcal
Property=Start
TodayDateFormat=[mGcal{0}_IsAllDayTDF]
DynamicVariables=1
The package can be found on the first post.
Oui-Oui
NisseDILLIGAF
Posts: 20
Joined: May 31st, 2011, 7:15 am

Re: Google Calendar Plugin

Post by NisseDILLIGAF »

Thanx...
all day is working great... I added WeekDateFormat to [mGcal{0}_Start] to get it as I want :)
EDIT: just noticed that the weekday is missing in week if I do this...

Code: Select all

[mGcal{0}_Start]
Measure=Plugin
Plugin=GCal.dll
ParentName=mGcal
Property=Start
TodayDateFormat=[mGcal{0}_IsAllDayTDF]
WeekDateFormat=[mGcal{0}_IsAllDayTDF]
DynamicVariables=1
EDIT.. fixed :)

Code: Select all

[mGcal{0}_IsAllDayTDF]
Measure=Plugin
Plugin=GCal.dll
ParentName=mGcal
Property=IsAllDay
Substitute="1":"'all day'","0":"HH:mm"

[mGcal{0}_IsAllDayTDFWeek]
Measure=Plugin
Plugin=GCal.dll
ParentName=mGcal
Property=IsAllDay
Substitute="1":"ddd 'all day'","0":"ddd HH:mm"

[mGcal{0}_Start]
Measure=Plugin
Plugin=GCal.dll
ParentName=mGcal
Property=Start
TodayDateFormat=[mGcal{0}_IsAllDayTDF]
WeekDateFormat=[mGcal{0}_IsAllDayTDFWeek]
DynamicVariables=1
rkkoszewski
Posts: 13
Joined: November 18th, 2014, 12:48 am

Re: Google Calendar Plugin

Post by rkkoszewski »

I think this has been deprecated by Google. Any posibility to have API v3 implemented?

Debug info:

Code: Select all

DBUG (00:04:13.687) : GCal.dll: Retrieving calendar [en.uk%23holiday%40group.v.calendar.google.com/public]
ERRO (00:04:13.796) : GCal.dll: Cannot update events : Error en el servidor remoto: (403) Prohibido.
Greetings.
ouiouimagicbox
Posts: 10
Joined: March 22nd, 2013, 10:46 am

Re: Google Calendar Plugin

Post by ouiouimagicbox »

Hi,

I have worked on a API v3 implementation and it seems quite stable. However, the v3 need some private authentication tokens and I can't give mine off course ;-)

I will try to commit the v3 version ASAP but I need to move these tokens on the configuration section so anyone could use it.
Oui-Oui
ouiouimagicbox
Posts: 10
Joined: March 22nd, 2013, 10:46 am

Re: Google Calendar Plugin

Post by ouiouimagicbox »

I have just commit the code to Github with the Google API v3 support.
A new rmskin package is available in my first post. Sorry by there's only a 64 bits version (can't build for 32 bits don't know why and too busy to find out).

There are 4 new variables in Variables.inc file :

mGcal.GoogleClientId : Google Client ID
mGcal.GoogleClientSecret : Google client secret key
mGcal.GoogleAppName : Google app name
mGcal.GoogleUserName : Google user name (your gmail account)

You just have to get a new client id / secret. Follow this tutorial : https://cube3x.com/how-to-get-client-id-client-secret-and-api-key-of-google-application/
Oui-Oui
Cotosoti
Posts: 1
Joined: May 1st, 2015, 7:56 pm

Re: Google Calendar Plugin

Post by Cotosoti »

Having DL'd the PGCal 1.1.0 and double clicking to install it, I get an error message stating "The Skin Packager tool must be used to create valid .rmskin packages".

Anyone else get this error?