Chiripa wrote: ↑April 12th, 2021, 1:46 am
if you are right it is very huge so I use php to shorten the code and make it almost alone. And I am also like that I think about doing something and I give it and I give it but the bad thing is that I never finish it!
Yes, it's huge, but not as huge as I thought - they don't have all the leagues, at least for the league ID interval I checked out (i.e. from 30 to 87), using my not complete, but functionally iterative skin, that can navigate through leagues using the arrows above:
Less Teams.jpg
Football Super Lig Turkey.jpg
Football England Championship.jpg
As you can see, the skin adapts to the number of teams in the league, is completely configurable (you can change its dimensions, limit the table to just a part of the skin using the margins, increase or reduce the space between elements, eliminate a column, or press any element in the skin and it will animate, although there currently isn't any function assigned to those actions, other than the arrows at the top) and it looks similar to yours.
While navigating through the leagues for the first time, I naturally noticed that some things don't quite work as intended for the moment. For example, some "leagues" actually contain multiple "sub-leagues", like the international ones, where groups (e.g. A, B, C, etc.) are stored as "leagues" in the JSON, so it looks like I'll have to create another two, smaller arrows below, to navigate the groups of an international tournament. In one or two cases the regex "failed" and I got a long text in the title, probably because the global pattern needs a little refinement for these fringe cases, nothing catastrophic though. There is also a known bug where Rainmeter crashes after a random number of refreshes of the skin, but I got an idea about where the culprit might be, and I'll probably address it someday.
Obviously, I didn't get yet to the fixtures - I didn't push too hard on it and I first wanted to make sure the table(s) work fine. I'm happy with the progress so far, and the rest isn't much different from what it has already been done, it's just a matter of slightly different regexes and other iterations and panels. I'll probably take it even easier from now on, it's not like I want to make a full fledged skin out of it and release it, it's more like an exercise to see what can come out of it, but I wanted to show you the result so far.
If anyone is interested...
Variables.inc, placed in @Resources folder of the skin:
Code: Select all
[Variables]
; League Overview Site
LeagueOverviewSite=https://www.fotmob.com/leagues?id=[#LeagueID]&tab=overview&type=league
; League ID; MinLeagueID, MaxLeagueID
LeagueID=87
MinLeagueID=0
MaxLeagueID=100
; Various Patterns
TrimUnwanted='(?:^\s*[#"\[]|[\]"]\s*$)':""
Cleaner="(?:^[^[\x200B]].*|.*[^[\x200B]]$)":"","(?:^[\x200B]|[\x200B]$)":"","(?:^\\\d+|\\\d+$)":""
; Level 4 Patterns
RankData=(?siU)^.*"title":(.*),"color":(.*),"indices":(\[.*\])(?:,.*$|$)
TeamData=(?siU)^.*"qualColor":(.*),"idx":(.*),"name":(.*),"id":(.*),"pageUrl":(.*),"played":(.*),"wins":(.*),"draws":(.*),"losses":(.*),"scoresStr":(.*),"goalConDiff":(.*),"pts":(.*),"deduction":(.*)(?:,.*$|$)
; Level 3 Patterns
Item=(?(?=.*\{).*\{(.*)\})
; Level 2 Patterns
Legend=(?siU)^.*#Item##Item##Item##Item##Item##Item##Item##Item##Item##Item#.*$
Table=(?siU)^.*#Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item##Item#.*$
; Level 1 Patterns
Fixtures=(?(?=.*"fixtures":\[\{).*"fixtures":\[\{(.*)\}\])
News=(?(?=.*"news":\[\{).*"news":\[(\{.*\})\])
TableData=(?(?=.*"tableData":\{).*"tableData":\{.*"tables":\[\{.*"legend":\[(\{.*\})\].*"table":\[(\{.*\})\].*\}\})
TopPlayers=(?(?=.*"topPlayers":\{).*"topPlayers":\{([^\{\[\]\}]*\[.*\][^\{\[\]\}]*)\})
; Football Pattern
LeagueOverview=(?siU)^.*\{.*"details":\{.*"id":(.*),.*"name":(.*),.*"country":(.*)\}#Fixtures##News##TableData##TopPlayers#.*\}.*$
; Visual Configuration (BW, BH = Background Width, Height; SW = Stroke Width; CR = Corner Radius; TH, HH = Title, Header Height; Col..Chr = Chars Per Column)
BW=600
BH=600
SW=4
CR=32
TH=32
HH=32
Padding=2
LMargin=16
TMargin=16
RMargin=16
BMargin=16
HoverScale=1.15
Col01Chr=4
Col02Chr=4
Col03Chr=22
Col04Chr=4
Col05Chr=4
Col06Chr=4
Col07Chr=4
Col08Chr=11
Col09Chr=6
Col10Chr=5
Col11Chr=5
RowChars=(#Col01Chr#+#Col02Chr#+#Col03Chr#+#Col04Chr#+#Col05Chr#+#Col06Chr#+#Col07Chr#+#Col08Chr#+#Col09Chr#+#Col10Chr#+#Col11Chr#)
RowCount=0
TextSize=10
TextFace=Comic Sans MS
ArrowFactor=1.8
TitleFactor=1.2
BackColor=0,0,0,128
PushColor=108,108,108,128
StroColor=128,128,128,192
TextColor=255,255,255,255
EffeColor=0,0,0,255
HexaAlpha=44
ArrowHoverColor=255,128,0,255
ArrowPressColor=255,96,0,255
Football.ini, placed in the skin folder:
Football.rar
You do not have the required permissions to view the files attached to this post.