It is currently August 5th, 2020, 1:47 pm

Reader

Discuss the use of Lua in Script measures.
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 911
Joined: September 6th, 2011, 6:34 am

Re: Reader

Post by MerlinTheRed »

I just noticed, when parsing the rainmeter forum rss feed, the script does not strip the cdata tags in the item title.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
Kaelri
Developer
Posts: 1739
Joined: July 25th, 2009, 4:47 am

Re: Reader

Post by Kaelri »

MerlinTheRed wrote:I just noticed, when parsing the rainmeter forum rss feed, the script does not strip the cdata tags in the item title.
You're right, the script itself doesn't do that. I've just been using Substitute="<![CDATA[":"","]]>":"" on the WebParser. I'll move it to the script, though; it's a common enough tag that adding the Substitute by hand would be annoying.
Alex Becherer

Re: Reader

Post by Alex Becherer »

just an idea:

how about adding

Code: Select all

Substitute="#CRLF#":" "
to avoid line breaks. some feeds have them, for example:
http://www.shanghaidaily.com/rss/latest/
User avatar
Kaelri
Developer
Posts: 1739
Joined: July 25th, 2009, 4:47 am

Re: Reader

Post by Kaelri »

Alex Becherer wrote:just an idea:

how about adding

Code: Select all

Substitute="#CRLF#":" "
to avoid line breaks. some feeds have them, for example:
http://www.shanghaidaily.com/rss/latest/
Added on the script side. Thanks for pointing this out. :)
Alex Becherer

Re: Reader

Post by Alex Becherer »

another thing to add to WebParserSubstitute (to avoid the display of question marks for non-breaking space with some fonts):

Code: Select all

Substitute="‎":""
important: the ini has to be Unicode encoded.
else there will be Substitute="?":""

please see this thread for more info: http://rainmeter.net/forum/viewtopic.php?f=5&t=13639
User avatar
Kaelri
Developer
Posts: 1739
Joined: July 25th, 2009, 4:47 am

Re: Reader

Post by Kaelri »

I replied to the aforementioned thread. Your solution works for now, but I'm going to try and get this addressed from the Lua side of things.
Alex Becherer

Re: Reader

Post by Alex Becherer »

the script just stopped working for me with the new Rainmeter version: 2.4 beta (r1673)

i get this error:
Script: File not valid in [MeasureReader]
other lua scripts work.
User avatar
Kaelri
Developer
Posts: 1739
Joined: July 25th, 2009, 4:47 am

Re: Reader

Post by Kaelri »

Alex Becherer wrote:the script just stopped working for me with the new Rainmeter version: 2.4 beta (r1673)

i get this error: other lua scripts work.
What is the complete path of the script file in this instance? (I suspect the issue is related to this.)
Alex Becherer

Re: Reader

Post by Alex Becherer »

Code: Select all

[MeasureReader]
Measure=Script
ScriptFile="#@#includes\Reader.lua"
MeasureName=MeasureFeed|MeasureFeed2|MeasureFeed3
MinItems=5
MaxItems=5
complete path is:

Code: Select all

C:\Users\Alex\Documents\Rainmeter\Skins\Sphynx\@RESOURCES\Includes\Reader.lua
what does confuse me is that the other lua scripts in the same folder do work.
using the full path in the section does return the same error.


btw: the example EveReader skin in post number 1 of this thread returns the same error.
User avatar
Kaelri
Developer
Posts: 1739
Joined: July 25th, 2009, 4:47 am

Re: Reader

Post by Kaelri »

This was indeed a bug in today's beta, and has now been fixed. Grab the updated beta from the homepage. Sorry about that; thanks for reporting. :)