Hi, I´m currently working on a chess focused skin.
Here's a creendump on how i want it to end up looking
The buttons all work, so i only have 2 "hard" jobs to do.... however, this is my first (ambitious) try to make a skin in rainmeter so i need some help.
I want to get the "game of the day" and the "opening of the day" from chess.com
I need helt extracting the chessboard and pieces and the "headline" that says which game or opening it is.
But i have no clue where to start
Help anyone?
I will of course release the skin as soon as it´s done...free of charge and all...
It is currently April 28th, 2024, 4:50 am
Getting chess board from website
-
- Posts: 19
- Joined: September 7th, 2011, 8:10 am
Getting chess board from website
Last edited by smurfier on December 14th, 2011, 3:31 am, edited 1 time in total.
Reason: Added HSimg tags.
Reason: Added HSimg tags.
-
- Posts: 1175
- Joined: June 9th, 2010, 5:56 pm
- Location: Locks heath, UK
Re: Getting chess board from website
Start with Rainmeter 101 and move on to calcs and the webparser plugin I guess, I have not tackled or seem similar in Rainmeter. I'm sure there are other approaches such as lua (cough) but that melts my brain currently...
-
- Posts: 19
- Joined: September 7th, 2011, 8:10 am
Re: Getting chess board from website
Thanks.
Been looking through the webparser section and found a tutorial on how to get certains information from a site.
Unfortunately i have just discovered that the site where i want to get the "opening of the day" from uses a new url pr day / opening so i guess its simply not possible ?
Been looking through the webparser section and found a tutorial on how to get certains information from a site.
Unfortunately i have just discovered that the site where i want to get the "opening of the day" from uses a new url pr day / opening so i guess its simply not possible ?
-
- Posts: 1173
- Joined: January 22nd, 2011, 4:23 pm
- Location: GMT +8
Re: Getting chess board from website
It is actually very possible. You can use the following to get to the correct url each day (based on the tip shown here) :bredal187 wrote:Thanks.
Unfortunately i have just discovered that the site where i want to get the "opening of the day" from uses a new url pr day / opening so i guess its simply not possible ?
Code: Select all
[mOpeningOTDpage]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=3600
Url=http://www.chess.com/games/
RegExp="(?siU)>Opening of the Day</a>.*<a href="(.*)" id="
[mOpeningOTD]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=3605
Url=http://www.chess.com/games[mOpeningOTDpage]
RegExp= "<-Whatever you want to get->"
P.S. It might help if you could re-post the image showing what you are trying to achieve.
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: Getting chess board from website
I don't believe that would work, since you can't use dynamic variables with plugins. You'd need to use some variation on this method to get the result from the first measure into the URL in the second one.Mordasius wrote:Code: Select all
[mOpeningOTDpage] Measure=Plugin Plugin=Plugins\WebParser.dll UpdateRate=3600 Url=http://www.chess.com/games/ RegExp="(?siU)>Opening of the Day</a>.*<a href="(.*)" id=" [mOpeningOTD] Measure=Plugin Plugin=Plugins\WebParser.dll UpdateRate=3605 Url=http://www.chess.com/games[mOpeningOTDpage] RegExp= "<-Whatever you want to get->"
-
- Posts: 1173
- Joined: January 22nd, 2011, 4:23 pm
- Location: GMT +8
Re: Getting chess board from website
You're right as usual. I should have tested it before posting What is needed is something like:Kaelri wrote:I don't believe that would work, since you can't use dynamic variables with plugins. You'd need to use some variation on this method to get the result from the first measure into the URL in the second one.
Code: Select all
[Variables]
OpeningPage=Unknown Page
[mGetURL]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=3600
Url=http://www.chess.com/games/
RegExp="(?siU)>Opening of the Day</a>.*<a href="(.*)" id="
StringIndex=1
FinishAction=!Execute [!WriteKeyValue Variables "OpeningPage" "[mGetURL]"] [!WriteKeyValue mGetURL Disabled 1] [!Refresh]
Disabled=0
[mGetOpening]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=3605
Url=http://www.chess.com/#OpeningPage#
RegExp="(?siU)<title.*>(.*)- Openings.*</title>"
StringIndex=1
[TodaysOpeningName]
Meter=STRING
MeasureName=mGetOpening
FontColor=FFFFFFDD
FontFace=Trebuchet MS
FontSize=10
W=600
H=18
Text="Today's Opening: %1"
-
- Posts: 19
- Joined: September 7th, 2011, 8:10 am
Re: Getting chess board from website
Been trying to figure out how all this works but must admit i've come to the conclussion i suck :/
Thx for the feedback though
Thx for the feedback though
-
- Posts: 1
- Joined: December 14th, 2011, 3:24 am
Re: Getting chess board from website
I think you would probably have to build a way to represent the pieces within rainmeter. So you would have to have images of each piece which would be positioned based on the move list which would have to be parsed and iterated with a button on the custom skin. Assuming you had the data parsed you could start by making a chessboard in rainmeter.
-
- Moderator
- Posts: 1931
- Joined: January 29th, 2010, 1:43 am
- Location: Willmar, MN
Re: Getting chess board from website
Please do not grave dig old topics.dgee wrote:I think you would probably have to build a way to represent the pieces within rainmeter. So you would have to have images of each piece which would be positioned based on the move list which would have to be parsed and iterated with a button on the custom skin. Assuming you had the data parsed you could start by making a chessboard in rainmeter.
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 . . .
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 . . .