It is currently April 19th, 2024, 9:52 pm

LuaRainRSS

RSS, ATOM and other feeds, GMail, Stocks, any information retrieved from the internet
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

LuaRainRSS

Post by jsmorley »

RSS feed of the Rainmeter forums. See Settings.inc for important information.
LuaRainRSS_3.0.rmskin
1.jpg
This is really intended for Rainmeter Forum nerds... It can not only flag "new" posts in the last XX minutes, but flag posts created by "you" and flag forum names or post subjects with keywords you want to "watch".
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5397
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: LuaRainRSS

Post by eclectic-tech »

I had to create 2 missing variables in the settings.ini, but then it works great! :D

Code: Select all

MyName={MyForumUserName}
MyPassword={MyForumPassword}
Thanks for this, I will definitely be using it!
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: LuaRainRSS

Post by jsmorley »

eclectic-tech wrote:I had to create 2 missing variables in the settings.ini, but then it works great! :D

Code: Select all

MyName={MyForumUserName}
MyPassword={MyForumPassword}
Thanks for this, I will definitely be using it!
Glad you like it.

You should not have had to "create" any variables in Settings.inc, but just "changed" the ones that are there:

Code: Select all

; Change DoMyName to "1" and set MyName and MyPassword to flag "your" posts.
DoMyName=0
MyName=XXXXXX
MyPassword=XXXXXX
MyColor=255,222,161,255
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5397
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: LuaRainRSS

Post by eclectic-tech »

I Need More Coffee this morning... I was looking at the top for them and skimmed the rest!! :)

My apology,thanks again!
User avatar
FreeRaider
Posts: 826
Joined: November 20th, 2012, 11:58 pm

Re: LuaRainRSS

Post by FreeRaider »

Thank you jsmorley
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan

Re: LuaRainRSS

Post by dgrace »

That is cool! :thumbup:

dave
User avatar
NighthawkSLO
Posts: 21
Joined: October 22nd, 2014, 7:11 pm

Re: LuaRainRSS

Post by NighthawkSLO »

I couldn't get this to work and it took me a long time to finally find the issue: The TimeStamp function doesn't take into account the possibility of zhours and zminutes not existing and then the whole year, month, day, ... fails entirely.

Proposed solution

Code: Select all

function TimeStamp(itemDate)
	
	-- feed date format: 2015-03-14T15:06:40-05:00

	local year, month, day, hour, min, sec =		
	string.match(itemDate, "(%d%d%d%d)-(%d%d)-(%d%d)T(%d%d):(%d%d):(%d%d)")

	local zhours, zminutes = string.match(itemDate, "%d+-%d+-%d+T%d+:%d+:%d+(.-):(%d%d)")

	if not zhours then zhours = 0 end
	if not zminutes then zminutes = 0 end
	
	local localTime = os.time({year=year, month=month, day=day, hour=hour, min=min, sec=sec, isdst=false})
	local utcTime = localTime - ((tonumber(zhours)*3600) + (tonumber(zminutes)*60))
	
	return utcTime

end
Last edited by NighthawkSLO on February 5th, 2016, 3:27 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: LuaRainRSS

Post by jsmorley »

NighthawkSLO wrote:I couldn't get this to work and it took me a long time to finally find the issue: The TimeStamp function doesn't take into account the possibility of zhours and zminutes not existing and then the whole year, month, day, ... fails entirely.
Huh. Never ran into that.

In User Control Panel in the forums, what do you have your TimeZone settings at?
1.jpg
I think your proposed solution looks ok, but I'd like to understand the circumstances...
You do not have the required permissions to view the files attached to this post.
User avatar
NighthawkSLO
Posts: 21
Joined: October 22nd, 2014, 7:11 pm

Re: LuaRainRSS

Post by NighthawkSLO »

jsmorley wrote:Huh. Never ran into that.

In User Control Panel in the forums, what do you have your TimeZone settings at?
I didn't set it, now it's at UTC+01:00 like it should...

I guess I should really work on my profile.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: LuaRainRSS

Post by jsmorley »

Well, I will implement your proposed solution anyway. I didn't think the board would ever return a date/time string without the timezone info, even if it was just 00:00 for GMT, but I guess it can...

Updated the .rmskin in the first post...