It is currently March 29th, 2024, 11:55 am

Help with parsing html

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with parsing html

Post by balala »

Youkai1977 wrote: April 9th, 2021, 9:15 am I have now read through your last postings and what balala wrote at the end I have also almost thought. I will have to use a separate meter per [mRSSItem].
Too bad, I thought when I had discovered a few weeks ago the thing with the InlinePattern my skins in the length to tamp properly to be able to save many meters.
In fact the code using five string meters instead of one, is not much more complicated or longer. I rewrote a few things to get it working, here are the modifications:
  • In the newsfeed.ini file:
    • Replaced the [!ShowMeter NewsFeed] bang of the FinishAction option of the [mRSS] measure with [!ShowMeterGroup "FEED"] (also added further String meters beaside [NewsFeed], all having set the Group=FEED option, that's why the FEED group has to be shown, not only the NewsFeed meter - see below).
    • Replaced the EndValue=-[NewsFeed:W] option of the [mXPos] measure with EndValue=(100-[NewsFeed:W]-[NewsFeed2:W]-[NewsFeed3:W]-[NewsFeed4:W]-[NewsFeed5:W]).
    • Replaced the [NewsFeed] meter with the following one and added the next five meters ([NewsFeed2] - [NewsFeed5]):

      Code: Select all

      [NewsFeed]
      Meter=STRING
      MeterStyle=StNEWS
      X=[mXPos]r
      Y=r
      MeasureName=mRSSItem1
      FontColor=#Color1##Alpha1#
      
      [NewsFeed2]
      Meter=STRING
      MeterStyle=StNEWS
      X=8R
      Y=r
      MeasureName=mRSSItem2
      FontColor=#Color2##Alpha1#
      
      [NewsFeed3]
      Meter=STRING
      MeterStyle=StNEWS
      X=8R
      Y=r
      MeasureName=mRSSItem3
      FontColor=#Color1##Alpha1#
      
      [NewsFeed4]
      Meter=STRING
      MeterStyle=StNEWS
      X=8R
      Y=r
      MeasureName=mRSSItem4
      FontColor=#Color2##Alpha1#
      
      [NewsFeed5]
      Meter=STRING
      MeterStyle=StNEWS
      X=8R
      Y=r
      MeasureName=mRSSItem5
      FontColor=#Color1##Alpha1#
      Text=[\x2022][\x2022][\x2022]  %1  [\x2022][\x2022][\x2022]
  • In the newsfeeddata.inc file:
    All modifications have been done into the [StNEWS] section:
    • Removed the InlineSetting2 and InlinePattern2 options.
    • Replaced the InlineSetting and InlinePattern options with the following ones:

      Code: Select all

      [StNEWS]
      ...
      InlineSetting=Color | #Color5##Alpha1#
      InlinePattern=•
      ...
    • Replaced the Text option with this: Text=[\x2022][\x2022][\x2022] %1.
    • Removed the FontColor option.
If interesetd please try out this and let me know how does it work.
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Help with parsing html

Post by Youkai1977 »

Sorry for the late reply from my side. Have a lot on my mind right now.
Therefore now also only a short answer...

I will look at your tip the next few days in peace and implement little by little.
All in all, it should not be difficult, since my old NewsFeed was actually built exactly so. So per feed an own meter.

But the current skin is then a little different. So that I can implement your tip, which I have seen now so when skimming, not 100% easy. This mainly concerns the FEED group.
Because with it still other Measures & meters are connected. So that I have to be careful when I implement your tip.
But as I said, I look at times in peace, and then of course give feedback :thumbup:
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with parsing html

Post by balala »

Youkai1977 wrote: April 12th, 2021, 6:53 am Sorry for the late reply from my side. Have a lot on my mind right now.
Therefore now also only a short answer...

I will look at your tip the next few days in peace and implement little by little.
All in all, it should not be difficult, since my old NewsFeed was actually built exactly so. So per feed an own meter.

But the current skin is then a little different. So that I can implement your tip, which I have seen now so when skimming, not 100% easy. This mainly concerns the FEED group.
Because with it still other Measures & meters are connected. So that I have to be careful when I implement your tip.
But as I said, I look at times in peace, and then of course give feedback :thumbup:
Alright. The skin does work as far as I can tell, so let me know if you try it.
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Help with parsing html

Post by Youkai1977 »

So, has taken a few days Sorry, had some around the ears. Therefore, I'm not doing much in terms of Rainmeter at the moment.

But it is done. I have completely adopted your tip (with a few modifications) and it seems to work.
But I can only say more in a few days, when the NewsFeed-Skin has to prove its practicality.

Too bad that the actual idea with ONLY one meter and the InlineSetting/InlinePattern did not work flawlessly. Because for the sake of clarity, such as smaller code I would have liked it better.
But well, that Rainmeter wants to be in some places more than it can probably ultimately, shows me since conversion start of my suite, unfortunately in many places.
Sure, the one or the other may be due to my ignorance, but alone now only on my NewsFeed skin related, there you can see what I mean.

The changes mentioned refer to the following:

Your suggestion: EndValue=(100-[NewsFeed:W]-[NewsFeed2:W]-[NewsFeed3:W]-[NewsFeed4:W]-[NewsFeed5:W])

My implementation: EndValue=(([HEADNAME:W] + 33)-[NewsFeed:W]-[NewsFeed2:W]-[NewsFeed3:W]-[NewsFeed4:W]-[NewsFeed5:W])

So I have covered (as it currently seems) exactly the range between NewsFeed window width and the actual width of all 5 NewsFeeds.

I also made a few changes to the groups to better control when which area gets an update.

In this sense, thank you again for your support. :thumbup: :bow:
If nothing more comes here, the feed probably finally runs as desired.
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with parsing html

Post by balala »

Youkai1977 wrote: April 20th, 2021, 7:45 pm If nothing more comes here, the feed probably finally runs as desired.
Alright, I'm glad. Test it as long as you want, then please let me know how does it behaves.