It is currently April 24th, 2024, 9:03 am

Reader

Discuss the use of Lua in Script measures.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: [Proof of Concept] Universal Feed Reader

Post by Kaelri »

Yes, I'd say that's reasonable. :)

Try adding the following inside the ParseSpecialCharacters function:

Code: Select all

function ParseSpecialCharacters(sString)
	sString = string.gsub(sString, '\"', '')
	if string.match(sString, 'Google Reader') then
		sString = string.match(sString, '"(.-)" via .- in Google Reader')
	end
	return sString
end
User avatar
Benjamin Linus
Posts: 163
Joined: July 12th, 2009, 4:05 pm
Location: The Island

Re: [Proof of Concept] Universal Feed Reader

Post by Benjamin Linus »

No, that just broke the feed/s altogether.
Not to worry, thanks as always.
Image
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: [Proof of Concept] Universal Feed Reader

Post by Kaelri »

Hmph. I'll take a look using one of my own Google Reader feeds, then - they might be doing something evil. But there's no reason why this shouldn't be soluble.
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: [Proof of Concept] Universal Feed Reader

Post by Seahorse »

Solved... 8-)
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: [Proof of Concept] Universal Feed Reader

Post by smurfier »

You can simplify a couple of your functions.

Code: Select all

function SwitchToNext()
	iCurrentFeed = iCurrentFeed%iNumberOfFeeds + 1
	SKIN:Bang('!SetVariable "'..sVariablePrefix..'CurrentFeed" "'..iCurrentFeed..'"')
	Update()
end

function SwitchToPrevious()
	iCurrentFeed = iCurrentFeed - 1 + (iCurrentFeed ==1 and iNumberOfFeeds or 0)
	SKIN:Bang('!SetVariable "'..sVariablePrefix..'CurrentFeed" "'..iCurrentFeed..'"')
	Update()
end
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: [Proof of Concept] Universal Feed Reader

Post by Kaelri »

Thanks. (Someday I'm going to stop faking it and relearn all those math operators that I forgot after freshman-year Calculus.)
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: [Proof of Concept] Universal Feed Reader

Post by KreAch3R »

Hi Kaelri,

I really like your Evereader, so I installed it and customized it to my needs (as you can see in the screenshot). It works perfectly, but the in the About section you can read this:

Image

How can I solve that error:matching? I have seen it displaying Success! a couple of times, and I can't understand yet the pattern at which the output changes.

Thanks. :)
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: [Proof of Concept] Universal Feed Reader

Post by Kaelri »

There's no actual problem, fortunately. This happens because the Script measures are only updated once every 10 minutes. And the first time they run is before the WebParser measures have finished downloading your feeds - so there is, for a few milliseconds, a genuine matching error, and that message doesn't get updated until the next update, ten minutes later. (Every other time the script runs - either when you press one of the buttons, or when the WebParser measures finish - it's called by a !CommandMeasure bang, which means the measure value does not update.)

If it really bothers you, you can change the script measures from "UpdateDivider=600" to "Disabled=1". Then they'll just show up as "0.0" in the About window.
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: [Proof of Concept] Universal Feed Reader

Post by KreAch3R »

Given that there is no functional problem, I have no problem with it either. :) Thanks a lot for the super fast reply!
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
ravisurdhar
Posts: 8
Joined: August 16th, 2011, 4:39 pm

Re: [Proof of Concept] Universal Feed Reader

Post by ravisurdhar »

Hey, this looks cool...nice work! Any way it could be adapted to display entries from multiple RSS/XML/ical/whatever feeds in the same window, instead of cycling between each feed source?