It is currently March 19th, 2024, 5:24 am

Enigma Google Calendar Patch

A package of skins with a "theme" or by a single author
User avatar
RabidZebra
Posts: 1
Joined: October 25th, 2018, 10:41 pm

Re: Enigma Google Calendar Patch

Post by RabidZebra »

eclectic-tech wrote: July 29th, 2018, 1:58 am Wow! I haven't look at this for over 6 months... more rust on my coding skill than I thought, so I took a break. :oops:

I may find some time to look deeper, but for the near future, it is what it is... a semi-working script. :yawn:
Same issue for me. School calendar works great but my personal calendar doesn't pull any events. Looking forward to a solution someday! :-)
senha1k2
Posts: 1
Joined: December 25th, 2018, 2:16 am

Re: Enigma Google Calendar Patch

Post by senha1k2 »

It is possible to stay in the calendar 5 days before ?

exemple
today is 25 and event of day 20 stay in calendar
User avatar
pds
Posts: 79
Joined: April 12th, 2014, 12:52 pm
Location: Slovakia

Re: Enigma Google Calendar Patch

Post by pds »

How can i change Date language to another language ? For example to slovak. "FormatLocale=sk-SK"
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5364
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Enigma Google Calendar Patch

Post by eclectic-tech »

pds wrote: January 23rd, 2019, 9:09 am How can i change Date language to another language ? For example to slovak. "FormatLocale=sk-SK"
I do not think that can be done easily. The feeds and script work with system dates and times.

@ senha1k2 Past Items are removed by default
User avatar
balala
Rainmeter Sage
Posts: 16091
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Enigma Google Calendar Patch

Post by balala »

pds wrote: January 23rd, 2019, 9:09 am How can i change Date language to another language ? For example to slovak. "FormatLocale=sk-SK"
Although indeed not extremely easy, nor impossible isn't. You probably have to pass those dates through some String measures and make there a substitution. As eclectic-tech said, the FormatLocale option won't work in this case.
For example, add the following variables into the [Variables] section:

Code: Select all

[Variables]
...
DateSubstitute="(?siU)Jan":"Ian","(?siU)Feb":"Feb","(?siU)Mar":"Mar","(?siU)Apr":"Apr","(?siU)May":"Mai","(?siU)Jun":"Iun","(?siU)Jul":"Iul","(?siU)Aug":"Aug","(?siU)Sep":"Sep","(?siU)Oct":"Oct","(?siU)Nov":"Nov","(?siU)Dec":"Dec","(?siU)Sunday":"Duminica","(?siU)Monday":"Luni","(?siU)Tuesday":"Marti","(?siU)Wednesday":"Miercuri","(?siU)Thursday":"Joi","(?siU)Friday":"Vineri","(?siU)Saturday":"Sambata"
Here I translated the name of the months and days into Romanian, but obviously you will have to modify the option, to have them translated into Slovak.
Then add a this kind of option for each "event" (I hope those can be called events):

Code: Select all

[MeasureWhen1]
Measure=String
String=#Item1Date#
RegExpSubstitute=1
Substitute=#DateSubstitute#
DynamicVariables=1
Finally add a MeasureName option and modify the Text option into the [ItemWhen1] String meter:

Code: Select all

[ItemWhen1]
Meter=STRING
MeasureName=MeasureWhen1
Group=FeedData
MeterStyle=StyleReaderSubtext
Text=%1
Obviously you have to add 16 such String measure and have to modify the appropriate 16 String meters.
But finally I believe it can be done.
User avatar
pds
Posts: 79
Joined: April 12th, 2014, 12:52 pm
Location: Slovakia

Re: Enigma Google Calendar Patch

Post by pds »

THX balala . I try this and it works also. I had to change TS format in lua scrip too.

Code: Select all

[cas1]
Measure=Time
TimeStamp=#Item1Date#
TimeStampFormat=%a, %d. %B %Y %H:%M
TimeStampLocale=en-US
FormatLocale=sk-SK
Format=%a, %d. %B. %Y %H:%M
DynamicVariables=1
Group=FeedData
User avatar
balala
Rainmeter Sage
Posts: 16091
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Enigma Google Calendar Patch

Post by balala »

pds wrote: January 24th, 2019, 8:14 am THX balala . I try this and it works also. I had to change TS format in lua scrip too.
Yes, another approach of the same problem. Congratulations. :thumbup:
User avatar
pds
Posts: 79
Joined: April 12th, 2014, 12:52 pm
Location: Slovakia

Re: Enigma Google Calendar Patch

Post by pds »

And what about add in to lua script how many days remains ? It will be cool :)
sbingha5
Posts: 2
Joined: February 4th, 2019, 1:38 pm

Re: Enigma Google Calendar Patch

Post by sbingha5 »

I have been using and slightly modifying the Google Calendar skin https://forum.rainmeter.net/download/file.php?id=15635, and I am wondering if someone knows a way to have it show start and end times of events? I have been trying to figure it out, but I've made no progress. Any help is greatly appreciated!
User avatar
pds
Posts: 79
Joined: April 12th, 2014, 12:52 pm
Location: Slovakia

Re: Enigma Google Calendar Patch

Post by pds »

my solution :

add new variable #ItemXRem#

Code: Select all

if Error then
		-- ERROR; QUEUE MESSAGES
		Queue['FeedTitle']   = Error.Title
		Queue['FeedLink']    = Error.Link
		Queue['Item1Title']  = Error.Description
		Queue['Item1Link']   = Error.Link
		Queue['Item1Desc']   = ''
		Queue['Item1Date']   = ''
		Queue['Item1Rem']    = ''                --add
		Queue['Item1Unread'] = 0

		for i = 2, MinItems do
			Queue['Item'..i..'Title']   = ''
			Queue['Item'..i..'Link']    = ''
			Queue['Item'..i..'Desc']    = ''
			Queue['Item'..i..'Date']    = ''
			Queue['Item'..i..'Rem']     = ''		  --add
			Queue['Item'..i..'Unread']  = 0
		end
	else
		-- NO ERROR; QUEUE FEED
		Queue['FeedTitle'] = Feed.Title
		Queue['FeedLink']  = Feed.Link or ''
        
		for i = 1, math.max(#Feed, MinItems) do
			local Item = Feed[i] or {}
		
		if Item.Date ~= nil then	
	      rozdiel = math.floor(os.difftime(Item.Date,os.time())/86400)			--add
   --      print (i.." test"..Item.Date.." "..os.time())          
	      if rozdiel == 0 then							  				--add
	        roz = 'Dnes'												--add  TODAY
  	  		 else
   	   	  if rozdiel == 1 then 
      		  roz = 'Zajtra'									    			--add TOMMORROW
         	  else
        	  		 if rozdiel < 5 then 
         	    roz = 'Za '..rozdiel..' dni'
            	 else roz = 'Za '..rozdiel..' dní'
         	  	 end
      	  	  end
   	    end
   	    else
   	    roz = ''
       end

			Queue['Item'..i..'Title']   = Item.Title  or ''
			Queue['Item'..i..'Link']    = Item.Link   or Feed.Link or ''
			Queue['Item'..i..'Desc']    = Item.Desc   or ''
			Queue['Item'..i..'Unread']  = Item.Unread or ''
         Queue['Item'..i..'Rem']     = roz  or ''														--add
			Queue['Item'..i..'Date']    = Item.Date and os.date(Timestamp, Item.Date) or ''

Post Reply